feat(workspace): config-aware version check with YAML bypass#101
Merged
Conversation
This was referenced Apr 30, 2026
Merged
Merged
Merged
Collaborator
Author
|
Workspace PRs (paired with this library change):
All 7 add |
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
Extend
check_versionso workspace/library version mismatches surface on every script run (viacheck_version(__version__)calls landing in PyAutoFit, PyAutoGalaxy, and PyAutoLens), not justwelcome.py. The version is now read fromconfig/general.yaml'sversion.workspace_versionfirst — so the version travels with the user's config directory even when scripts are copy-pasted out of the workspace root — withversion.txtretained as a legacy fallback. A newversion.workspace_version_check: FalseYAML flag mirrors the existingpython_version_checkpattern and lets users onmain-branch workspace clones (where mismatches are expected becausemainupdates faster than releases) opt out without an env var.Tracking: #100
API Changes
check_versionis unchanged in signature but its resolution and bypass behaviour are extended:config/general.yaml→version.txt→ warn.version.workspace_version_check: Falseingeneral.yaml.main-branch case.See full details below.
Test Plan
pytest test_autoconf/test_workspace.py— 14 tests cover YAML source, bypass flag, fallback, mismatch, unparseable YAMLpytest test_autoconf/— full suite stays green/tmp→ warning text mentions YAML override andmainbranchworkspace_version: 2025.1.1.1in a tmp config) → error renders withmain-branch guidanceFull API Changes (for automation & release notes)
Changed Behaviour
autoconf.workspace.check_version(library_version, workspace_root=None)— now reads<workspace_root>/config/general.yaml'sversion.workspace_versionas the primary source, falling back to<workspace_root>/version.txt. Honoursversion.workspace_version_check: Falseingeneral.yamlas a bypass (in addition to the existingPYAUTO_SKIP_WORKSPACE_VERSION_CHECK=1env var). YAML wins if both sources exist and disagree. Warning and error messages rewritten to surface both bypass mechanisms and themain-branch use case.Migration
welcome.py, the new library__init__.pycalls landing in PyAutoFit/Galaxy/Lens) work unchanged.main-branch workspace clones who hit the new mismatch error should add toconfig/general.yaml:🤖 Generated with Claude Code