Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for version string corner cases. #209

Merged
merged 2 commits into from
Jun 21, 2024
Merged

Conversation

weaverba137
Copy link
Member

This PR allows a wide variety of valid version strings to be parsed by desiutil.setup.get_version().

While developing this, it was discovered that desiutil.dust.ext_fitzpatrick() requires scipy, but this requirement had never been explicitly listed. It appears that previously, one or more of astropy, healpy or matplotlib would bring in a dependency on scipy, but more recent versions do not have that dependency, so scipy has to be installed explicitly.

@weaverba137 weaverba137 requested a review from sbailey June 21, 2024 15:22
@weaverba137 weaverba137 self-assigned this Jun 21, 2024
Copy link
Contributor

@sbailey sbailey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Support for corner case version strings + tests looks good.

Commentary on the optional scipy dependency:
If pytest is run in an environment without scipy installed, just one of the dust tests fail with an ImportError, and all of the others run and pass, which seems good. I had originally suggested that we intercept this case and explicitly skip the test that needed scipy, but a single failing test for an obvious reason (ModuleNotFoundError: No module named 'scipy') is clear and doesn't prevent other tests from being useful, so I like this too.

@sbailey sbailey merged commit 13adcde into main Jun 21, 2024
28 checks passed
@sbailey sbailey deleted the version-string-detection branch June 21, 2024 17:43
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