Skip to content

Generalize testing version comparison#3271

Merged
dopplershift merged 15 commits intoUnidata:mainfrom
dcamron:version-compare
Nov 14, 2023
Merged

Generalize testing version comparison#3271
dopplershift merged 15 commits intoUnidata:mainfrom
dcamron:version-compare

Conversation

@dcamron
Copy link
Copy Markdown
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 a team and kgoebber 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
Copy Markdown
Member

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

@dcamron
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

@dopplershift
Copy link
Copy Markdown
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
Copy Markdown
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.

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
@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.

3 participants