Skip to content

Data files not included when installing package from git #1

@tokamaster

Description

@tokamaster

Issue Description

Problem:
When installing fusionrate directly from git using pip (e.g., pip install git+https://github.com/PrincetonUniversity/fusionrate.git), the package installs successfully but the critical data files in the fusionrate/data/ directory are missing, causing runtime errors.

Error encountered:

FileNotFoundError: [Errno 2] No such file or directory: '/path/to/site-packages/fusionrate/data/ions.json'

Expected behavior:
The data files (ions.json, cross_section_fits.csv, etc.) should be included in the installed package since they are essential for the package functionality.

Current workaround:
Users must manually download and copy the data files to the installation directory, which is not a clean solution.

Root cause:
The package's build configuration (likely missing proper MANIFEST.in or incomplete pyproject.toml package data specification) doesn't include the data files when building/installing from source.

Suggested fix:
Update the package configuration to properly include data files. This typically involves:

Updating pyproject.toml/setup.py to include:

[tool.setuptools.package-data]
fusionrate = ["data/*.json", "data/*.csv"]

Environment:

  • Python: 3.13
  • Installation method: pip install git+https://github.com/PrincetonUniversity/fusionrate.git
  • OS: macOS (but likely affects all platforms)

This issue prevents users from installing fusionrate directly from the repository in clean environments or CI/CD pipelines.

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