Skip to content

Replace R/rpy2 dependency with py-statmatch once ready #93

@MaxGhenis

Description

@MaxGhenis

Overview

Once the py-statmatch package is ready, we should replace all R/rpy2 dependencies with the pure Python implementation.

py-statmatch Repository

https://github.com/PolicyEngine/py-statmatch

Benefits

  1. No R installation required - Simplifies setup and CI/CD
  2. Better cross-platform compatibility - Works on all platforms without R
  3. Easier maintenance - Pure Python is easier to debug and maintain
  4. Faster CI builds - No need to install R and its dependencies
  5. Resolves documentation build issues - Fixes Fix JupyterBook 2.0 documentation build on GitHub Pages #92

Tasks

  • Complete py-statmatch implementation with full test coverage
  • Publish py-statmatch to PyPI
  • Replace microimpute.utils.statmatch_hotdeck with py-statmatch
  • Remove microimpute.utils.statmatch_python (temporary implementation)
  • Update all imports from rpy2 to py-statmatch
  • Remove rpy2 from optional dependencies in pyproject.toml
  • Update documentation notebooks to use py-statmatch
  • Update README and documentation

Code changes needed

  1. In microimpute/models/matching.py:

    • Replace R imports with from statmatch import nnd_hotdeck
  2. Remove these files:

    • microimpute/utils/statmatch_hotdeck.py
    • microimpute/utils/statmatch_python.py
    • microimpute/utils/import_helpers.py
  3. Update pyproject.toml:

    • Remove matching optional dependency group
    • Add py-statmatch to main dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions