Repository navigation
fix: skip workspace version warning outside a workspace (no config/) - #192
Merged
Jammy2211 merged 1 commit intoOct 7, 2026
Merged
Conversation
check_version defaults workspace_root to the cwd and runs on every import of autofit/autogalaxy/autolens, so a plain script run from a data directory warned "Cannot verify the workspace ...". In the no-floor branch, return silently when the directory has no config/ (new _looks_like_workspace) as well as for source checkouts. A config/ with no version keys still warns. No walk-up to a parent directory. Reported by @HRSAstro in PyAutoLabs Discussion #13. Closes #191. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Jammy2211
deleted the
feature/workspace-version-warning-outside-workspace
branch
October 7, 2026 09:58
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
autonerves.workspace.check_versionruns on every import of autofit / autogalaxy / autolens withworkspace_rootdefaulting to the current working directory. Running a plain script from a data directory (no workspace at all) found no version floor and warned "Cannot verify the workspace ...". The no-floor branch now returns silently when the directory has noconfig/(new_looks_like_workspace) as well as for package source checkouts. A directory with aconfig/but no version keys and noversion.txt(a misconfigured workspace) still warns. There is deliberately no walk-up to a parent directory.Reported by external contributor @HRSAstro in https://github.com/orgs/PyAutoLabs/discussions/13 (comment PyAutoLabs/.github#13 (comment)).
Closes #191.
API Changes
None to the public API. One behaviour change:
check_versionno longer warns in the no-floor case whenworkspace_roothas noconfig/directory.See full details below.
Test Plan
test_missing_sources_without_config_dir_is_silentfails on unfixed source (red), passes after the fixtest_config_dir_without_general_yaml_or_version_txt_warnspasses (the misconfigured workspace still warns)test_missing_sources_warnsnow createsconfig/first and still warnspython -W always -c "import autofit"from a bare dir prints no warning; aftermkdir configit warns onceFull API Changes (for automation & release notes)
Added
autonerves.workspace._looks_like_workspace(root)(private):(root / "config").is_dir()Changed Behaviour
autonerves.workspace.check_version: when no floor is found (noconfig/general.yamlversion keys, noversion.txt), it returns silently ifworkspace_rootis a source checkout or has noconfig/directory. Previously only source checkouts were silent.autofit_workspace_developerandautolens_workspace_developerhave noconfig/and no floor, so running from their roots no longer emits the warning. Neither repo records a floor, so nothing was being checked there before either. Every other workspace root shipsconfig/and is unaffected.Migration
PYAUTO_SKIP_WORKSPACE_VERSION_CHECK=1.Tier: judge — merge mode: human /prm
Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code