Skip to content

Conversation

@Shekhar0109
Copy link

@Shekhar0109 Shekhar0109 commented Aug 19, 2025

✨ Summary

This PR introduces a utility function get_frappe_repo_path to centralize and standardize how the Frappe repository path is determined across the project.


πŸ”§ Changes

  • Added frappe_manager/paths.py containing:
    • get_frappe_repo_path() β†’ returns the repo path from FRAPPE_REPO_PATH environment variable, defaults to ./repos/frappe.
  • Updated frappe_manager/__init__.py to use the new function instead of hardcoding the path.
  • Added unit tests in test/test_paths.py to validate both default and custom env var behaviors.
  • Updated pyproject.toml β†’ added pytest as a dev dependency for testing.
  • Regenerated poetry.lock with new dependencies.

βœ… Tests

  • Default Path Test β†’ ensures fallback to ./repos/frappe when FRAPPE_REPO_PATH is not set.
  • Custom Env Path Test β†’ ensures custom path is correctly picked from the FRAPPE_REPO_PATH environment variable.
  • All tests executed successfully:

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

  • enhancement
  • tests

Checklist

  • PR ready for review βœ…
  • Documentation updated βœ…
  • Tests added / updated βœ…

Closes #250

Copy link

@wasup-yash wasup-yash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR does not fully solve the reqested issue which is asked in the Issue description. (not official reviewer)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Frappe Repo Path

2 participants