[#847] Fix Argyll version compared as string, not parsed version list - #876
Merged
Merged
Conversation
…n list DisplayCAL/gamap_settings.py, lut3d_settings.py, and ui/main_window.py all gated feature availability on `argyll_version >= "1.6"`-style raw string comparisons, which sort lexicographically instead of numerically (e.g. `"1.10.0" < "1.3.3"`). Argyll releases with a double-digit version component wrongly hid gamut-mapping intents/viewing conditions and 3D LUT options. Added `argyll_version_at_least()` in argyll.py, which compares parsed numeric version components, and switched all affected call sites to it.
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.
Summary
gamap_settings.py'sviewcond_items()/intent_items()comparedgetcfg("argyll.version")as a raw string (argyll_version < "1.3.3"), which sorts lexicographically instead of numerically, so"1.10.0" < "1.3.3"is wronglyTrueand hides gamut-mapping intents/viewing conditions for Argyll releases with a double-digit version component.lut3d_settings.py(compute_trc_visibility(),lut3d_encoding_codes(),lut3d_encoding_controls_visible()) andui/main_window.py(lut3d_format_items(),lut3d_rendering_intent_items()), which wrongly hid 3D LUT options (madVR format, clip-WTW encoding, "Perceptual, LUT proof" intent) the same way.argyll_version_at_least()toargyll.py, a shared helper that compares parsed numeric version components (via the existingparse_argyll_version_string()) instead of raw strings, and switched all affected call sites to it.Test plan
1.10.0(a version that sorted incorrectly under the old string comparison) totests/test_gamap_settings.py,tests/test_lut3d_settings.py, andtests/test_ui_main_window.py.pytest tests/test_gamap_settings.py tests/test_lut3d_settings.py tests/test_ui_main_window.py -n auto— 592 passed.ruff checkclean on all changed lines.