Exclude depletion chain xml files from the wheel and sdist - #39
Merged
Conversation
The chain xml files under src/openmc_data/depletion are tracked in git so that download_chain can fetch them from the github raw urls listed in urls_xml.py. They were also being picked up as package data, which took the 2.5.0 wheel to 210 MB and caused PyPI to reject the upload with a 400, the per file limit being 100 MB. Turn off include-package-data and list the json data files explicitly, which are the only data files read from the installed package (add_branching_ratios reads branching_ratios_*.json). Add a MANIFEST.in to keep the xml files out of the sdist as well. The wheel goes from 210 MB to 95 KB.
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.
The 2.5.0 release failed to upload to PyPI with a
400 Bad Request. The wheel was 210 MB, over the 100 MB per file limit (2.4.2 was 86.9 MB, so it had been close to the limit already and the newly added chains tipped it over).The chain xml files under
src/openmc_data/depletionare tracked in git sodownload_chaincan fetch them from the github raw urls inurls_xml.py. They were also being picked up as package data, sinceinclude-package-datadefaults to true for pyproject.toml based config and setuptools_scm adds every tracked file to the file finder. Nothing reads them from the installed package.include-package-data = falseplus an explicitpackage-dataentry for the json files, which are the only data files read at runtime (add_branching_ratiosreadsbranching_ratios_*.json)MANIFEST.into keep the xml out of the sdist tooChecked on a local build:
No
.xmlin either distribution, all five json files still present and loadable from site-packages after installing the wheel,twine checkpasses on both.Unrelated, the build also warns that the
project.licensetable form is deprecated and needs to be a SPDX string by 2027-Feb-18. Left alone here.