Repository navigation
Ship the experimental CSVs in the wheel (fixes expdata on install) - #15
Merged
Merged
Conversation
`expdata.data_folder()` resolved the datasets as `<package>/../../data`, which is `site-packages/data` once installed and only ever existed in a source checkout. The wheel carried no data at all, and while the sdist did contain `data/`, it installed only `src/pyepisuite`, so it failed the same way. Every class in the module raised FileNotFoundError on any installed copy: HenryData, BoilingPointData, MeltingPointData, VaporPressureData, SolubilityData and logKowData. Broken since at least 1.1.0 - the tests never caught it because they run from the source tree, where the fallback path happens to resolve. - Map the eight runtime CSVs into the wheel at `pyepisuite/data/` via hatch force-include. data_folder() prefers that packaged copy and falls back to the repo-root `data/` for source checkouts, so editable installs and the notebooks keep working. Wheel: 30 KB -> 955 KB. - Trim the sdist, which was sweeping in the entire repo. Drops the .xls/.doc source material, the unread bcfbaf and waternt trees, and notebooks/docs/examples. 8.2 MB -> 1.1 MB. The eight CSVs stay, because the wheel build reads them out of the sdist. - Remove MANIFEST.in. It is a setuptools file; hatchling never read it. The 1.3.0 sdist contained notebooks/ and docs/, which it does not list. Verified: clean 3.12 venv from both the wheel and the sdist loads all six datasets; source checkout still resolves to the repo root; 88 tests pass. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
pip install pyepisuiteproduces a package where everyexpdataclass raisesFileNotFoundError. Reproduced against the 1.3.0 just published:Cause
expdata.data_folder()resolved the CSVs as<package>/../../data— that issite-packages/dataonce installed, a path that only exists in a source checkout.data/, but installs onlysrc/pyepisuite, so it failed identicallyMANIFEST.in: inert. It is a setuptools file and this project builds with hatchling, which never read it — the 1.3.0 sdist shippednotebooks/anddocs/, which the file does not listAffects
HenryData,BoilingPointData,MeltingPointData,VaporPressureData,SolubilityDataandlogKowData, and has been broken since at least 1.1.0. The tests never caught it because they run from the source tree, where the fallback path resolves.Fix
Only 8 of the ~15 MB in
data/are runtime data. Those are mapped into the wheel atpyepisuite/data/via[tool.hatch.build.targets.wheel.force-include], anddata_folder()prefers the packaged copy, falling back to the repo root for source checkouts — so editable installs and the data-cleanup notebooks keep working, and no files move.The sdist is also trimmed: it was sweeping in the whole repo. The eight CSVs stay, because the wheel build reads them out of the sdist.
Verification
Clean Python 3.12 venv, installed from the built artifacts:
HenryData().HLC('50-00-0')→3.37e-07data_folder()to the repo-rootdata/twine checkpasses on both artifactsVersion bumped to 1.3.1 — 1.3.0 is already on PyPI and can't be replaced.
🤖 Generated with Claude Code