PolicyEngine / PolicyEngine/policyengine-taxsim
R package: use Config/reticulate for Python dependency declaration
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 17
- Forks
- 10
- Avg merge
- 15h 55m
- Merged PRs (30d)
- 1
Description
Summary
The R package currently manages Python dependencies manually in setup_policyengine() via custom reticulate::virtualenv_install() calls. We should also declare the Python dependency formally using the Config/reticulate field in DESCRIPTION, which is reticulate's standard mechanism.
Current state
setup_policyengine()manually creates a virtualenv and installspolicyengine-taxsimfrom GitHubpolicyengine_us_versionparam allows pinning a transitive dep, but this is a custom pattern- No
Config/reticulatefield inDESCRIPTION
Proposed change
Add to DESCRIPTION:
Config/reticulate:
list(
packages = list(
list(package = "policyengine-taxsim", pip = TRUE)
)
)
Limitations to investigate
Config/reticulatedoesn't natively supportgit+URLs — may need to use PyPI once we publish there- No standard way to pin transitive dependencies (e.g.
policyengine-us==1.555.0) viaConfig/reticulate— the custompolicyengine_us_versionparam may still be needed for that use case - Need to test interaction with the lazy auto-setup in
policyengine_calculate_taxes()
References
- reticulate: Python package installation
- Current implementation:
r-package/policyenginetaxsim/R/setup.R
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with r-package/policyenginetaxsim/R/setup.R and the DESCRIPTION file. Read setup_policyengine() and policyengine_calculate_taxes() to understand the current virtualenv setup and lazy auto-setup, then test how the proposed Config/reticulate declaration interacts with the GitHub dependency and policyengien_us_version. Done means the dependency is declared appropriately and the setup behavior is verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, r
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100