feat: add get_frappe_repo_path with tests #275
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
This PR introduces a utility function
get_frappe_repo_pathto centralize and standardize how the Frappe repository path is determined across the project.π§ Changes
frappe_manager/paths.pycontaining:get_frappe_repo_path()β returns the repo path fromFRAPPE_REPO_PATHenvironment variable, defaults to./repos/frappe.frappe_manager/__init__.pyto use the new function instead of hardcoding the path.test/test_paths.pyto validate both default and custom env var behaviors.pyproject.tomlβ addedpytestas a dev dependency for testing.poetry.lockwith new dependencies.β Tests
./repos/frappewhenFRAPPE_REPO_PATHis not set.FRAPPE_REPO_PATHenvironment variable.pytest -q
2 passed in 3.00s
Notes
This change makes the repository path configurable and avoids hardcoded values.
Backward compatible: if FRAPPE_REPO_PATH is not set, defaults to ./repos/frappe.
Labels
Checklist
Closes #250