eschanet / simplify

Create and validate simplified likelihoods from full likelihoods.
BSD 3-Clause "New" or "Revised" License
6 stars 2 forks source link

build: Revise MANIFEST.in strategy to properly use prune #14

Closed matthewfeickert closed 2 years ago

matthewfeickert commented 2 years ago

c.f. https://github.com/scikit-hep/pyhf/pull/1449 for additional context

As an example of why this is needed, pulling the latest sdist from TestPyPI shows that files not in the MANIFEST.in are getting added to the sdist as prune * no longer works how we used to think it did.

$ curl -sLO https://test-files.pythonhosted.org/packages/4a/d3/562acaa4f82b9f8905939e3133582b374bce65641155ff6e3cf1fa195fad/simplify-0.1.10.dev27.tar.gz
$ python -m tarfile --list simplify-0.1.10.dev27.tar.gz 
simplify-0.1.10.dev27/ 
simplify-0.1.10.dev27/CONTRIBUTING.md 
simplify-0.1.10.dev27/LICENSE 
simplify-0.1.10.dev27/MANIFEST.in 
simplify-0.1.10.dev27/PKG-INFO 
simplify-0.1.10.dev27/README.md 
simplify-0.1.10.dev27/codecov.yml 
simplify-0.1.10.dev27/pyproject.toml 
simplify-0.1.10.dev27/setup.cfg 
simplify-0.1.10.dev27/setup.py 
simplify-0.1.10.dev27/src/ 
simplify-0.1.10.dev27/src/simplify/ 
simplify-0.1.10.dev27/src/simplify/__init__.py 
simplify-0.1.10.dev27/src/simplify/_version.py 
simplify-0.1.10.dev27/src/simplify/benchmark.py 
simplify-0.1.10.dev27/src/simplify/cli/ 
simplify-0.1.10.dev27/src/simplify/cli/__init__.py 
simplify-0.1.10.dev27/src/simplify/configuration.py 
simplify-0.1.10.dev27/src/simplify/exceptions.py 
simplify-0.1.10.dev27/src/simplify/fitter.py 
simplify-0.1.10.dev27/src/simplify/helpers/ 
simplify-0.1.10.dev27/src/simplify/helpers/__init__.py 
simplify-0.1.10.dev27/src/simplify/helpers/plotting.py 
simplify-0.1.10.dev27/src/simplify/model_tools.py 
simplify-0.1.10.dev27/src/simplify/plot.py 
simplify-0.1.10.dev27/src/simplify/simplified.py 
simplify-0.1.10.dev27/src/simplify/yields.py 
simplify-0.1.10.dev27/src/simplify.egg-info/ 
simplify-0.1.10.dev27/src/simplify.egg-info/PKG-INFO 
simplify-0.1.10.dev27/src/simplify.egg-info/SOURCES.txt 
simplify-0.1.10.dev27/src/simplify.egg-info/dependency_links.txt 
simplify-0.1.10.dev27/src/simplify.egg-info/entry_points.txt 
simplify-0.1.10.dev27/src/simplify.egg-info/requires.txt 
simplify-0.1.10.dev27/src/simplify.egg-info/top_level.txt 
root@0b62dca977c7:/# 
* Remove global exclude of dotfiles from MANIFEST.in to avoid potential problems with build systems
   - c.f. https://github.com/scikit-build/scikit-build/issues/537
* Use `prune **` to remove all files from the sdist
   - c.f. https://packaging.python.org/guides/using-manifest-in/#manifest-in-commands
   - "Setuptools also has undocumented support for ** matching zero or more characters including forward slash, backslash, and colon."
* Manually include all "default" files for a sdist in MANIFEST.in
   - c.f. https://packaging.python.org/guides/using-manifest-in/#how-files-are-included-in-an-sdist
* Add list of sdist and wheel contents to package publishing CI
   - Allow for easier checking of the sdist and wheel contents in CI logs
codecov-commenter commented 2 years ago

Codecov Report

Merging #14 (af4092e) into master (d551d26) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #14   +/-   ##
=======================================
  Coverage   94.60%   94.60%           
=======================================
  Files           7        7           
  Lines         482      482           
  Branches       82       82           
=======================================
  Hits          456      456           
  Misses         23       23           
  Partials        3        3           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d551d26...af4092e. Read the comment docs.