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

Generalize testing version comparison #3271

Merged
merged 15 commits into from
Nov 14, 2023

Conversation

dcamron
Copy link
Member

@dcamron dcamron commented Nov 9, 2023

Expand our testing version comparison helper to support testing conditions for any dependency.

  • Fully documented

@dcamron dcamron added Type: Maintenance Updates and clean ups (but not wrong) Type: Enhancement Enhancement to existing functionality Area: Tests Affects tests labels Nov 9, 2023
@dcamron dcamron requested review from kgoebber and a team as code owners November 9, 2023 20:55
@dcamron dcamron requested review from dopplershift and removed request for a team November 9, 2023 20:55
@dopplershift
Copy link
Member

Given all the line length issues, how do we feel about version_before and version_equal?

tests/plots/test_skewt.py Fixed Show fixed Hide fixed
@dcamron
Copy link
Member Author

dcamron commented Nov 9, 2023

Given all the line length issues, how do we feel about version_before and version_equal?

I didn't see this before I cleaned up the lint. I don't feel strongly about the name either way!

@dopplershift
Copy link
Member

Looks like the new "strict" setting requires us to adjust the "fails" criteria for the moist_lapse fail test.

Also, let's go with the shorter names.

Copy link
Member

@dopplershift dopplershift left a comment

Choose a reason for hiding this comment

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

Really liking where this has gotten to in terms of relying on the metadata. Definitely a nice tool to have. Just some minor things to adjust and this can go in.

src/metpy/testing.py Outdated Show resolved Hide resolved
src/metpy/testing.py Outdated Show resolved Hide resolved
src/metpy/testing.py Outdated Show resolved Hide resolved
src/metpy/testing.py Outdated Show resolved Hide resolved
src/metpy/testing.py Show resolved Hide resolved
src/metpy/testing.py Outdated Show resolved Hide resolved
@dopplershift
Copy link
Member

Need to also rebase this on main to deal with the conflict (due to test_weighted_continuous_average_temperature having the line uncommented now).

Simplify one more time down to a single version comparison helper that
parses a package spec string and compares that spec to the currently
installed package.
@dcamron dcamron force-pushed the version-compare branch 4 times, most recently from eae8657 to 9859e93 Compare November 14, 2023 04:03
Add validation to requested package spec to fail if the spec is out of
date and irrelevant according to package metadata.
Copy link
Member

@dopplershift dopplershift left a comment

Choose a reason for hiding this comment

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

Minor nit and this is good to go.

tests/calc/test_thermo.py Outdated Show resolved Hide resolved
src/metpy/testing.py Outdated Show resolved Hide resolved
dcamron and others added 2 commits November 14, 2023 14:06
Co-authored-by: Ryan May <rmay31@gmail.com>
@dopplershift dopplershift merged commit 8d6a48b into Unidata:main Nov 14, 2023
34 checks passed
@github-actions github-actions bot added this to the November 2023 milestone Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Tests Affects tests Type: Enhancement Enhancement to existing functionality Type: Maintenance Updates and clean ups (but not wrong)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants