Repository navigation
CI use benchopt info --version to gate tests on min_benchopt_version - #63
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The compatibility gate compared versions with a bash lexicographic test:
<in[[ ]]is a string comparison, so once benchopt reaches 1.10.0 it is (wrongly) treated as older than1.2–1.9. Because theTeststep is guarded byif: compatible == 'true', every benchmark pinning one of thosemin_benchopt_versionvalues would silently skip its tests (green, not red) under benchopt 1.10.0.Change
Delegate the comparison to benchopt itself via the new
benchopt info <benchmark> --version(benchopt/benchopt#1009), which exits non-zero when the installed benchopt is too old:git(dev) builds: always compatible, as before.! benchopt info --help | grep -q -- '--version'clause makes benchopt < 1.10.0 (which lacks the flag) fall through tocompatible=true, so the test runs rather than being silently skipped.benchopt info --versiondecides.Merge after benchopt 1.10.0 is on PyPI — the
latestjob needs the new flag. The default matrix (latest+git) is covered; the fall-through handles any benchmark pinning an older benchopt.Depends on benchopt/benchopt#1009.