fix: replace hardcoded absolute paths with dynamic paths refs #881#965
Open
ilayfalach wants to merge 2 commits into
Open
fix: replace hardcoded absolute paths with dynamic paths refs #881#965ilayfalach wants to merge 2 commits into
ilayfalach wants to merge 2 commits into
Conversation
… refs #881 Replace every live hardcoded /home/ilay* path with portable alternatives: - hera/tests/datalayer/DataHandler_gdal.py: use os.path.dirname(__file__) to locate the .hgt test file relative to the script itself. - hera/tests/dynamic_loading_tests_pack/test_experiment_cli_shortcuts.py: replace hardcoded /home/ilay/pyargos-master with os.environ.get("PYARGOS_PATH", "") so CI can inject the path without touching source code. - User/lowFrequency.ipynb: replace absolute parquet path with pathlib.Path("../../../data/lowfrequency/MASSADA.parquet") — CWD is set to the notebook directory by the test runner. - lowFreqToolKit_documentation.ipynb: replace hardcoded fallback paths in the _candidates list with os.path.abspath()-based relative paths. - User/Demography and toolkits/Demography notebooks: replace hardcoded shapefile paths with relative os.path.join() expressions from CWD; remove hardcoded _fallback variable. - Developer/Demography: remove hardcoded commented-out path, replace with env-var based comment pattern. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…aHandler_gdal.py File was removed in master (commit 79a53a3, "redundent files") by Lior. Our change (fixing hardcoded path) is superseded by the intentional deletion. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
/home/ilay*absolute paths in test files and Jupyter notebooks with dynamic/relative pathstest_notebooks.py,DataHandler_gdal.py,test_experiment_cli_shortcuts.py, and 4 Jupyter notebooks underdoc/jupyter/Test plan
pytest hera/tests/ -m "not notebook"— no regressionsCloses #881
🤖 Generated with Claude Code