diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1d38624c7f5ab68fccc007054bb08f1acbb5c57b..fc710b579a00769d1d5d0e2b893756f8f97766c1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,9 +24,15 @@ stages: - python -m pip install . - python -c "import bilby" - python -c "import bilby.core" + - python -c "import bilby.core.sampler" - python -c "import bilby.gw" + - python -c "import bilby.gw.detector" + - python -c "import bilby.gw.sampler" - python -c "import bilby.hyper" - python -c "import cli_bilby" + - for script in $(pip show -f bilby | grep "bin\/" | xargs -I {} basename {}); do + ${script} --help; + done # test basic setup on python2 basic-2.7: @@ -43,7 +49,7 @@ python-2.7: stage: test image: bilbydev/bilby-test-suite-python27 script: - - python setup.py install + - python -m pip install . # Run tests without finding coverage - pytest --ignore=test/utils_py3_test.py @@ -52,7 +58,7 @@ python-3.7: stage: test image: bilbydev/bilby-test-suite-python37 script: - - python setup.py install + - python -m pip install . # Run pyflakes - flake8 . @@ -80,7 +86,7 @@ scheduled-python-3.7: only: - schedules script: - - python setup.py install + - python -m pip install . # Run tests which are only done on schedule - pytest test/example_test.py diff --git a/cli_bilby/bilby_result.py b/cli_bilby/bilby_result.py index 237a9622e19389a8203f6ec4548324abc3879c51..e080309b20a0eb3639a665eca693c08e94dff063 100644 --- a/cli_bilby/bilby_result.py +++ b/cli_bilby/bilby_result.py @@ -47,7 +47,7 @@ def setup_command_line_args(): help="New label for output result object") parser.add_argument("-b", "--bayes", action='store_true', help="Print all Bayes factors.") - parser.add_argument("-p", "--print", nargs='+', default=None, + parser.add_argument("-p", "--print", nargs='+', default=None, dest="keys", help="Result dictionary keys to print.") parser.add_argument("--call", nargs='+', default=None, help="Result dictionary methods to call (no argument passing available).") @@ -98,7 +98,7 @@ def drop_to_ipython(results_list): def print_matches(results_list, args): for r in results_list: print("\nResult file: {}/{}".format(r.outdir, r.label)) - for key in args.print: + for key in args.keys: for attr in r.__dict__: if key in attr: print_line = [ @@ -113,7 +113,7 @@ def main(): if args.convert: for r in results_list: r.save_to_file(extension=args.convert, outdir=args.outdir) - if args.print is not None: + if args.keys is not None: print_matches(results_list, args) if args.call is not None: for r in results_list: