Skip to content

Fix --version when running as a script with conda dependencies#3

Merged
arpfennig merged 6 commits intomainfrom
dev
Mar 19, 2026
Merged

Fix --version when running as a script with conda dependencies#3
arpfennig merged 6 commits intomainfrom
dev

Conversation

@biermanr
Copy link
Copy Markdown
Contributor

Previously specified version in the pyproject.toml which worked for pip install longhap and then longhap --version but not for ./longhap.py --version because we were using importlib.

Now we specify __version__ in longhap.py and pyproject.toml version dynamically fetches it.

Updated github actions to build and run longhap as a package and as a script in a conda env on pushed to main and dev, but to only release to pypi on releases

arpfennig and others added 6 commits March 12, 2026 07:20
Added a DOI link to the citation in README.md
- `pip install longhap` then `longhap --version` was
  working, but `./longhap.py --version` was failing
  because it was expecting a package and using
  importlib

- fix is using __version__ in longhap.py and dynamic
  version in the pyproject.toml

- added tests in GHA which now runs on pushes to
  main and dev but only releases to pypi on release
@arpfennig arpfennig merged commit 00bfefd into main Mar 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants