Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Remove include of files always included by hatchling #2125

Merged
merged 2 commits into from
Mar 3, 2023

Conversation

matthewfeickert
Copy link
Member

@matthewfeickert matthewfeickert commented Mar 2, 2023

Description

From the hatchling docs

The following files are always included and cannot be excluded:

  • /pyproject.toml
  • /hatch.toml
  • /hatch_build.py
  • /.gitignore or /.hgignore
  • Any defined readme file
  • All defined license-files

This apparently also includes AUTHORS under "license-files".

While there is no explicit need to remove these includes, doing so avoids potential confusion when browsing the contents of an sdist (c.f. pypa/hatch#766).

Checklist Before Requesting Reviewer

  • Tests are passing
  • "WIP" removed from the title of the pull request
  • Selected an Assignee for the PR to be responsible for the log summary

Before Merging

For the PR Assignees:

  • Summarize commit messages into a comprehensive review of the PR
* From the hatchling docs

> The following files are always included and cannot be excluded:
> * /pyproject.toml
> * /hatch.toml
> * /hatch_build.py
> * /.gitignore or /.hgignore
> * Any defined readme file
> * All defined license-files

   - c.f. https://hatch.pypa.io/latest/plugins/builder/sdist/#default-file-selection

  This apparently also includes AUTHORS under "license-files".
* While there is no explicit need to remove these includes, doing so
  avoids potential confusion when browsing the contents of an sdist.
   - c.f. https://github.com/pypa/hatch/issues/766

@matthewfeickert matthewfeickert added build Changes that affect the build system or external dependencies chore Other changes that don't modify src or test files labels Mar 2, 2023
@matthewfeickert matthewfeickert self-assigned this Mar 2, 2023
@matthewfeickert matthewfeickert requested a review from kratsg March 2, 2023 03:36
@matthewfeickert
Copy link
Member Author

matthewfeickert commented Mar 2, 2023

$ python -m tarfile --list dist/pyhf-*.tar.gz
Without this PR:
pyhf-0.7.1.dev56/AUTHORS 
pyhf-0.7.1.dev56/CITATION.cff 
pyhf-0.7.1.dev56/LICENSE 
pyhf-0.7.1.dev56/README.rst 
pyhf-0.7.1.dev56/pyproject.toml 
pyhf-0.7.1.dev56/src/pyhf/__init__.py 
pyhf-0.7.1.dev56/src/pyhf/_version.py 
pyhf-0.7.1.dev56/src/pyhf/compat.py 
pyhf-0.7.1.dev56/src/pyhf/constraints.py 
pyhf-0.7.1.dev56/src/pyhf/events.py 
pyhf-0.7.1.dev56/src/pyhf/mixins.py 
pyhf-0.7.1.dev56/src/pyhf/patchset.py 
pyhf-0.7.1.dev56/src/pyhf/pdf.py 
pyhf-0.7.1.dev56/src/pyhf/probability.py 
pyhf-0.7.1.dev56/src/pyhf/readxml.py 
pyhf-0.7.1.dev56/src/pyhf/simplemodels.py 
pyhf-0.7.1.dev56/src/pyhf/typing.py 
pyhf-0.7.1.dev56/src/pyhf/utils.py 
pyhf-0.7.1.dev56/src/pyhf/workspace.py 
pyhf-0.7.1.dev56/src/pyhf/writexml.py 
pyhf-0.7.1.dev56/src/pyhf/cli/__init__.py 
pyhf-0.7.1.dev56/src/pyhf/cli/cli.py 
pyhf-0.7.1.dev56/src/pyhf/cli/complete.py 
pyhf-0.7.1.dev56/src/pyhf/cli/infer.py 
pyhf-0.7.1.dev56/src/pyhf/cli/patchset.py 
pyhf-0.7.1.dev56/src/pyhf/cli/rootio.py 
pyhf-0.7.1.dev56/src/pyhf/cli/spec.py 
pyhf-0.7.1.dev56/src/pyhf/contrib/__init__.py 
pyhf-0.7.1.dev56/src/pyhf/contrib/cli.py 
pyhf-0.7.1.dev56/src/pyhf/contrib/utils.py 
pyhf-0.7.1.dev56/src/pyhf/contrib/viz/__init__.py 
pyhf-0.7.1.dev56/src/pyhf/contrib/viz/brazil.py 
pyhf-0.7.1.dev56/src/pyhf/data/citation.bib 
pyhf-0.7.1.dev56/src/pyhf/exceptions/__init__.py 
pyhf-0.7.1.dev56/src/pyhf/infer/__init__.py 
pyhf-0.7.1.dev56/src/pyhf/infer/calculators.py 
pyhf-0.7.1.dev56/src/pyhf/infer/mle.py 
pyhf-0.7.1.dev56/src/pyhf/infer/test_statistics.py 
pyhf-0.7.1.dev56/src/pyhf/infer/utils.py 
pyhf-0.7.1.dev56/src/pyhf/infer/intervals/__init__.py 
pyhf-0.7.1.dev56/src/pyhf/infer/intervals/upper_limits.py 
pyhf-0.7.1.dev56/src/pyhf/interpolators/__init__.py 
pyhf-0.7.1.dev56/src/pyhf/interpolators/code0.py 
pyhf-0.7.1.dev56/src/pyhf/interpolators/code1.py 
pyhf-0.7.1.dev56/src/pyhf/interpolators/code2.py 
pyhf-0.7.1.dev56/src/pyhf/interpolators/code4.py 
pyhf-0.7.1.dev56/src/pyhf/interpolators/code4p.py 
pyhf-0.7.1.dev56/src/pyhf/modifiers/__init__.py 
pyhf-0.7.1.dev56/src/pyhf/modifiers/histosys.py 
pyhf-0.7.1.dev56/src/pyhf/modifiers/lumi.py 
pyhf-0.7.1.dev56/src/pyhf/modifiers/normfactor.py 
pyhf-0.7.1.dev56/src/pyhf/modifiers/normsys.py 
pyhf-0.7.1.dev56/src/pyhf/modifiers/shapefactor.py 
pyhf-0.7.1.dev56/src/pyhf/modifiers/shapesys.py 
pyhf-0.7.1.dev56/src/pyhf/modifiers/staterror.py 
pyhf-0.7.1.dev56/src/pyhf/optimize/__init__.py 
pyhf-0.7.1.dev56/src/pyhf/optimize/common.py 
pyhf-0.7.1.dev56/src/pyhf/optimize/mixins.py 
pyhf-0.7.1.dev56/src/pyhf/optimize/opt_jax.py 
pyhf-0.7.1.dev56/src/pyhf/optimize/opt_minuit.py 
pyhf-0.7.1.dev56/src/pyhf/optimize/opt_numpy.py 
pyhf-0.7.1.dev56/src/pyhf/optimize/opt_pytorch.py 
pyhf-0.7.1.dev56/src/pyhf/optimize/opt_scipy.py 
pyhf-0.7.1.dev56/src/pyhf/optimize/opt_tflow.py 
pyhf-0.7.1.dev56/src/pyhf/parameters/__init__.py 
pyhf-0.7.1.dev56/src/pyhf/parameters/paramsets.py 
pyhf-0.7.1.dev56/src/pyhf/parameters/paramview.py 
pyhf-0.7.1.dev56/src/pyhf/parameters/utils.py 
pyhf-0.7.1.dev56/src/pyhf/schema/__init__.py 
pyhf-0.7.1.dev56/src/pyhf/schema/loader.py 
pyhf-0.7.1.dev56/src/pyhf/schema/validator.py 
pyhf-0.7.1.dev56/src/pyhf/schema/variables.py 
pyhf-0.7.1.dev56/src/pyhf/schemas/HistFactorySchema.dtd 
pyhf-0.7.1.dev56/src/pyhf/schemas/1.0.0/defs.json 
pyhf-0.7.1.dev56/src/pyhf/schemas/1.0.0/jsonpatch.json 
pyhf-0.7.1.dev56/src/pyhf/schemas/1.0.0/measurement.json 
pyhf-0.7.1.dev56/src/pyhf/schemas/1.0.0/model.json 
pyhf-0.7.1.dev56/src/pyhf/schemas/1.0.0/patchset.json 
pyhf-0.7.1.dev56/src/pyhf/schemas/1.0.0/workspace.json 
pyhf-0.7.1.dev56/src/pyhf/tensor/__init__.py 
pyhf-0.7.1.dev56/src/pyhf/tensor/common.py 
pyhf-0.7.1.dev56/src/pyhf/tensor/jax_backend.py 
pyhf-0.7.1.dev56/src/pyhf/tensor/manager.py 
pyhf-0.7.1.dev56/src/pyhf/tensor/numpy_backend.py 
pyhf-0.7.1.dev56/src/pyhf/tensor/pytorch_backend.py 
pyhf-0.7.1.dev56/src/pyhf/tensor/tensorflow_backend.py 
pyhf-0.7.1.dev56/.gitignore 
pyhf-0.7.1.dev56/AUTHORS 
pyhf-0.7.1.dev56/LICENSE 
pyhf-0.7.1.dev56/README.rst 
pyhf-0.7.1.dev56/pyproject.toml 
pyhf-0.7.1.dev56/PKG-INFO 
With this PR:
pyhf-0.7.1.dev54/CITATION.cff 
pyhf-0.7.1.dev54/src/pyhf/__init__.py 
pyhf-0.7.1.dev54/src/pyhf/_version.py 
pyhf-0.7.1.dev54/src/pyhf/compat.py 
pyhf-0.7.1.dev54/src/pyhf/constraints.py 
pyhf-0.7.1.dev54/src/pyhf/events.py 
pyhf-0.7.1.dev54/src/pyhf/mixins.py 
pyhf-0.7.1.dev54/src/pyhf/patchset.py 
pyhf-0.7.1.dev54/src/pyhf/pdf.py 
pyhf-0.7.1.dev54/src/pyhf/probability.py 
pyhf-0.7.1.dev54/src/pyhf/readxml.py 
pyhf-0.7.1.dev54/src/pyhf/simplemodels.py 
pyhf-0.7.1.dev54/src/pyhf/typing.py 
pyhf-0.7.1.dev54/src/pyhf/utils.py 
pyhf-0.7.1.dev54/src/pyhf/workspace.py 
pyhf-0.7.1.dev54/src/pyhf/writexml.py 
pyhf-0.7.1.dev54/src/pyhf/cli/__init__.py 
pyhf-0.7.1.dev54/src/pyhf/cli/cli.py 
pyhf-0.7.1.dev54/src/pyhf/cli/complete.py 
pyhf-0.7.1.dev54/src/pyhf/cli/infer.py 
pyhf-0.7.1.dev54/src/pyhf/cli/patchset.py 
pyhf-0.7.1.dev54/src/pyhf/cli/rootio.py 
pyhf-0.7.1.dev54/src/pyhf/cli/spec.py 
pyhf-0.7.1.dev54/src/pyhf/contrib/__init__.py 
pyhf-0.7.1.dev54/src/pyhf/contrib/cli.py 
pyhf-0.7.1.dev54/src/pyhf/contrib/utils.py 
pyhf-0.7.1.dev54/src/pyhf/contrib/viz/__init__.py 
pyhf-0.7.1.dev54/src/pyhf/contrib/viz/brazil.py 
pyhf-0.7.1.dev54/src/pyhf/data/citation.bib 
pyhf-0.7.1.dev54/src/pyhf/exceptions/__init__.py 
pyhf-0.7.1.dev54/src/pyhf/infer/__init__.py 
pyhf-0.7.1.dev54/src/pyhf/infer/calculators.py 
pyhf-0.7.1.dev54/src/pyhf/infer/mle.py 
pyhf-0.7.1.dev54/src/pyhf/infer/test_statistics.py 
pyhf-0.7.1.dev54/src/pyhf/infer/utils.py 
pyhf-0.7.1.dev54/src/pyhf/infer/intervals/__init__.py 
pyhf-0.7.1.dev54/src/pyhf/infer/intervals/upper_limits.py 
pyhf-0.7.1.dev54/src/pyhf/interpolators/__init__.py 
pyhf-0.7.1.dev54/src/pyhf/interpolators/code0.py 
pyhf-0.7.1.dev54/src/pyhf/interpolators/code1.py 
pyhf-0.7.1.dev54/src/pyhf/interpolators/code2.py 
pyhf-0.7.1.dev54/src/pyhf/interpolators/code4.py 
pyhf-0.7.1.dev54/src/pyhf/interpolators/code4p.py 
pyhf-0.7.1.dev54/src/pyhf/modifiers/__init__.py 
pyhf-0.7.1.dev54/src/pyhf/modifiers/histosys.py 
pyhf-0.7.1.dev54/src/pyhf/modifiers/lumi.py 
pyhf-0.7.1.dev54/src/pyhf/modifiers/normfactor.py 
pyhf-0.7.1.dev54/src/pyhf/modifiers/normsys.py 
pyhf-0.7.1.dev54/src/pyhf/modifiers/shapefactor.py 
pyhf-0.7.1.dev54/src/pyhf/modifiers/shapesys.py 
pyhf-0.7.1.dev54/src/pyhf/modifiers/staterror.py 
pyhf-0.7.1.dev54/src/pyhf/optimize/__init__.py 
pyhf-0.7.1.dev54/src/pyhf/optimize/common.py 
pyhf-0.7.1.dev54/src/pyhf/optimize/mixins.py 
pyhf-0.7.1.dev54/src/pyhf/optimize/opt_jax.py 
pyhf-0.7.1.dev54/src/pyhf/optimize/opt_minuit.py 
pyhf-0.7.1.dev54/src/pyhf/optimize/opt_numpy.py 
pyhf-0.7.1.dev54/src/pyhf/optimize/opt_pytorch.py 
pyhf-0.7.1.dev54/src/pyhf/optimize/opt_scipy.py 
pyhf-0.7.1.dev54/src/pyhf/optimize/opt_tflow.py 
pyhf-0.7.1.dev54/src/pyhf/parameters/__init__.py 
pyhf-0.7.1.dev54/src/pyhf/parameters/paramsets.py 
pyhf-0.7.1.dev54/src/pyhf/parameters/paramview.py 
pyhf-0.7.1.dev54/src/pyhf/parameters/utils.py 
pyhf-0.7.1.dev54/src/pyhf/schema/__init__.py 
pyhf-0.7.1.dev54/src/pyhf/schema/loader.py 
pyhf-0.7.1.dev54/src/pyhf/schema/validator.py 
pyhf-0.7.1.dev54/src/pyhf/schema/variables.py 
pyhf-0.7.1.dev54/src/pyhf/schemas/HistFactorySchema.dtd 
pyhf-0.7.1.dev54/src/pyhf/schemas/1.0.0/defs.json 
pyhf-0.7.1.dev54/src/pyhf/schemas/1.0.0/jsonpatch.json 
pyhf-0.7.1.dev54/src/pyhf/schemas/1.0.0/measurement.json 
pyhf-0.7.1.dev54/src/pyhf/schemas/1.0.0/model.json 
pyhf-0.7.1.dev54/src/pyhf/schemas/1.0.0/patchset.json 
pyhf-0.7.1.dev54/src/pyhf/schemas/1.0.0/workspace.json 
pyhf-0.7.1.dev54/src/pyhf/tensor/__init__.py 
pyhf-0.7.1.dev54/src/pyhf/tensor/common.py 
pyhf-0.7.1.dev54/src/pyhf/tensor/jax_backend.py 
pyhf-0.7.1.dev54/src/pyhf/tensor/manager.py 
pyhf-0.7.1.dev54/src/pyhf/tensor/numpy_backend.py 
pyhf-0.7.1.dev54/src/pyhf/tensor/pytorch_backend.py 
pyhf-0.7.1.dev54/src/pyhf/tensor/tensorflow_backend.py 
pyhf-0.7.1.dev54/.gitignore 
pyhf-0.7.1.dev54/AUTHORS 
pyhf-0.7.1.dev54/LICENSE 
pyhf-0.7.1.dev54/README.rst 
pyhf-0.7.1.dev54/pyproject.toml 
pyhf-0.7.1.dev54/PKG-INFO 

@codecov
Copy link

codecov bot commented Mar 2, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (5d6e70f) 98.30% compared to head (af9c4d0) 98.30%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2125   +/-   ##
=======================================
  Coverage   98.30%   98.30%           
=======================================
  Files          69       69           
  Lines        4531     4531           
  Branches      645      645           
=======================================
  Hits         4454     4454           
  Misses         45       45           
  Partials       32       32           
Flag Coverage Δ
contrib 97.88% <ø> (ø)
doctest 61.15% <ø> (ø)
unittests-3.10 96.31% <ø> (ø)
unittests-3.8 96.33% <ø> (ø)
unittests-3.9 96.35% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@matthewfeickert matthewfeickert force-pushed the build/avoid-duplicates-in-sdist branch from adbf024 to 2480153 Compare March 2, 2023 04:59
@matthewfeickert matthewfeickert force-pushed the build/avoid-duplicates-in-sdist branch from 2480153 to 28ffd89 Compare March 2, 2023 23:47
* From the hatchling docs

> The following files are always included and cannot be excluded:
> * /pyproject.toml
> * /hatch.toml
> * /hatch_build.py
> * /.gitignore or /.hgignore
> * Any defined readme file
> * All defined license-files

   - c.f. https://hatch.pypa.io/latest/plugins/builder/sdist/#default-file-selection

  This apparently also includes AUTHORS under "license-files".
* While there is no explicit need to remove these includes, doing so
  avoids potential confusion when browsing the contents of an sdist.
   - c.f. https://github.com/pypa/hatch/issues/ 766
@matthewfeickert matthewfeickert force-pushed the build/avoid-duplicates-in-sdist branch from 28ffd89 to af9c4d0 Compare March 3, 2023 06:53
@matthewfeickert
Copy link
Member Author

I'm going to approve and merge this myself. As always, PRs approved by a single core dev can be reverted as needed by the rest of the dev team.

@matthewfeickert matthewfeickert merged commit 64a9f21 into main Mar 3, 2023
@matthewfeickert matthewfeickert deleted the build/avoid-duplicates-in-sdist branch March 3, 2023 07:15
matthewfeickert added a commit that referenced this pull request Mar 31, 2023
* Backport PR #2095 to the release/v0.7.x branch for easier comparisons.
* Also backport components of:
    - PR #2072
    - PR #2099
    - PR #2100
    - PR #2119
    - PR #2125
    - PR #2145
* In filterwarnings ignore all DeprecationWarning on patch release branches
  (e.g. release/v0.7.x).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Changes that affect the build system or external dependencies chore Other changes that don't modify src or test files
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant