Skip to content

Commit

Permalink
Merge pull request #24 from oresat/fix-script-install
Browse files Browse the repository at this point in the history
Fix installed scripts, add test
  • Loading branch information
ryanpdx authored Mar 7, 2024
2 parents b6bced6 + 2597b79 commit 0dbdf58
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,15 @@ jobs:

- name: Test building sphinx docs
run: make -C docs html

- name: Test installed scripts
run: |
pip install dist/*.whl
oresat-configs > /dev/null
oresat-gen-fw-files c3
oresat-gen-dcf c3
oresat-print-od c3 > /dev/null
oresat-gen-xtce
oresat-configs cards > /dev/null
oresat-configs pdo c3 --list > /dev/null
pip uninstall -y oresat-configs
10 changes: 9 additions & 1 deletion oresat_configs/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@
]


if __name__ == "__main__":
def oresat_configs():
"""Entry point for the top level script
Used in pyproject.toml, for generating the oresat-configs installed script
"""
parser = argparse.ArgumentParser(prog="oresat_configs")
parser.add_argument("--version", action="version", version="%(prog)s v" + __version__)
parser.set_defaults(func=lambda x: parser.print_help())
Expand All @@ -60,3 +64,7 @@

args = parser.parse_args()
args.func(args)


if __name__ == "__main__":
oresat_configs()

0 comments on commit 0dbdf58

Please sign in to comment.