From fd82dbfea55a0e1b1e161a24a2b8a00737bd8f45 Mon Sep 17 00:00:00 2001 From: Mark Conway Date: Sun, 10 May 2026 13:55:31 -0400 Subject: [PATCH] Make alphapy CLI exit 0 on success Two cosmetic-but-misleading bugs caused every successful run to exit with code 1, masking real failures in CI and local pipeline checks: 1. main() in alphapy_main.py ended with `return model`. The setuptools entry point wraps it as `sys.exit(main())`; sys.exit on a non-int non-None object stringifies to stderr and exits 1. No code calls main() programmatically (siblings use main_pipeline directly), so the return is vestigial. Drop it so main() returns None implicitly and sys.exit(None) yields exit 0. 2. plots.py had a top-level `print(__doc__)` which printed the literal string "None" on every import (the file's "docstring" is actually a comment block, so __doc__ is None). Pure noise, dead since 2013. Verified by running all three projects (kaggle, pizza, time-series) end-to-end with exit code 0 and no spurious "None" output. --- alphapy/alphapy_main.py | 3 --- alphapy/plots.py | 2 -- 2 files changed, 5 deletions(-) diff --git a/alphapy/alphapy_main.py b/alphapy/alphapy_main.py index 988bce9..257a7b4 100644 --- a/alphapy/alphapy_main.py +++ b/alphapy/alphapy_main.py @@ -708,9 +708,6 @@ def main(args=None): logger.info("AlphaPy End") logger.info('*'*80) - # Return the model - return model - # # MAIN PROGRAM diff --git a/alphapy/plots.py b/alphapy/plots.py index 8da6520..40ba3e9 100644 --- a/alphapy/plots.py +++ b/alphapy/plots.py @@ -48,8 +48,6 @@ # 2. Candlestick # -print(__doc__) - # # Imports