fix: pathlib-refactor leftovers in HPC example_cpu.py#136
Merged
Conversation
Mirror of PyAutoLabs/autogalaxy_workspace's Cluster H fix. Four sites in scripts/guides/hpc/example_cpu.py: three Path(path.sep…) leftovers and one dataset_Path() identifier corrupted from dataset_path by PR #128's blanket os.path → pathlib substitution.
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
Mirror of PyAutoLabs/autogalaxy_workspace's Cluster H fix. The autolens HPC tutorial
scripts/guides/hpc/example_cpu.pycarries the exact same two classes of leftover typos from #128 (theos.path→pathlibrefactor):Path(path.sep…)at lines 58, 76, 94 —pathwas the oldos.pathimport, removed by refactor: replace os.path with pathlib in workspace scripts #128. Replaced withPath("/" …);pathlibnormalises/correctly on both POSIX and Windows, and the HPC scripts target SLURM-style absolute paths like/hpc/data/....dataset_Path()at line 291 — the case-insensitive substitution corrupted the variable namedataset_path(aPathinstance) intodataset_Pathand re-styled it as a callable. Replaced withdataset_path.The bug did not appear in the latest workspace test run because this script is listed in
config/build/no_run.yaml("HPC paths dont exist locally."), which pre-dates the typo. Verified post-fix that the script no longer raisesNameErrorand instead reaches the expected pre-existingConfigException: /hpc/home/hpc_username/hpc/config does not existat line 110 — i.e. exactly the failure modeno_run.yamldocuments. The skip entry is therefore left as-is.Scripts Changed
scripts/guides/hpc/example_cpu.py— threePath(path.sep …)→Path("/" …)at lines 58, 76, 94; onedataset_Path()→dataset_pathat line 291.Test Plan
PYAUTO_TEST_MODE=1 python scripts/guides/hpc/example_cpu.pyno longer raisesNameError; reaches the documentedConfigExceptionfor missing HPC paths (line 110), the very reason it remains skipped inno_run.yaml.grep -n "path\.sep\|dataset_Path" scripts/guides/hpc/returns no matches in this file.🤖 Generated with Claude Code