From 4a841c3756840a2879ebad9d488b10dbc81bbd76 Mon Sep 17 00:00:00 2001 From: Henry Wright Date: Fri, 18 Jul 2025 10:53:30 +0100 Subject: [PATCH 1/4] update manifest --- MANIFEST.in | 106 +++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 96 insertions(+), 10 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 027c7daa..30409e1a 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,16 +1,102 @@ -exclude .cirrus.yml -exclude .coveragerc +# A generic template for "MANIFEST.in" files in Scitools repos. +# NOTE: most of this can't be duplicated as-is into any given repo, but suggests +# guidelines + structure. +# For the syntax of "MANIFEST.in" files, see: +# https://setuptools.pypa.io/en/latest/userguide/miscellaneous.html#using-manifest-in + +# General principles +# - enable user to build locally, as well as in CI +# - make it ignore temporary files generated by dev processes, e.g. coverage checks +# - encode typical decisions, e.g. whether we package docs, requirements etc + +#--------- +# SECTION: main code sources +# +recursive-include src *.py .nc .txt + # principles: + # - *no* "prune" command is used + # - use "include-recursive", by relevant file extensions + # hints: + # - top-level dir is typically "src", but maybe "lib" or + # - default package rules mean we generally don't actually *need* a statement + # - but it's better to be explicit + # - extension filetypes are typically sources (*.py) + # - might also need testdata files, e.g. *.nc, *.npy *.npz + # - also possibly non-python, e.g. *.pyx for Cython + + +#--------- +# SECTION: docs +prune docs +# and if required ... include ONLY docs source files. +# E.G. recursive-include docs *.rst *.inc + # principles: + # - use prune to ignore everything (optionally: except the docs sources) + # hints: + # - most projects don't want to package the docs, but some currently do (cf-units). + + +#--------- +# SECTION: requirements +prune requirements +recursive-include requirements *.txt + # principles: + # include just requirements-level info, not lock files + # hints: + # - not all projects include requirements, but they can be drawn in anyway by dynamic dependencies + # in the setuptools build process, linked via config in pyproject.toml + # - for some repos, the *.txt are actually lockfiles. This probably needs fixing. + + +#--------- +# SECTION: root files exclude .flake8 -prune .github +exclude .git-blame-ignore-revs +exclude .git_archival.txt +exclude .gitattributes exclude .gitignore +exclude .lycheeignore +exclude .mailmap exclude .pre-commit-config.yaml exclude .readthedocs.yml -include CHANGELOG.md +exclude .ruff.toml +exclude CHANGES include CITATION.cff -prune benchmarks +exclude CODE_OF_CONDUCT.md +include COPYING +include COPYING.LESSER +include LICENSE +exclude Makefile exclude codecov.yml -prune docs -recursive-include src *.py *.txt -recursive-exclude src *.nc -exclude noxfile.py -prune requirements +include noxfile.py + # principles: + # - *ANY* file in the root should be explicitly "include"- or "exclude"-d + # - EXCEPT (possibly) those covered by setuptools default rules (see above link) + # - including : README.md/.rst; pyproject.toml; setup.py/.cfg + # - N.B. a GHA "ci-manifest" check, if used, will check all this + # - the above are typical ones : given in sorted order + # - NB many will (eventually) be templated, but that is a separate issue + # - probably, this section can be included as *boilerplate* + # - i.e. it doesn't matter if some of the files mentioned don't exist + + +#--------- +# SECTION: generic exclusions +# (1) top-level directories to omit entirely +prune .github +prune .nox +prune .tox +prune .coverage +# (2) top-level files to omit +exclude .coveragerc +# (3) file types (path patterns) to skip everywhere +global-exclude *.py[cod] +global-exclude __pycache__ + # principles: + # - common directories, files and file-types to be generally ignored + # - all outside version control, temporary non-coding output and cache data + # produced by dev processes, automation or user tools + # - by having this section LAST, it can remove files which might have been added by + # previous sections -- such as python compiler cache files + # - can include this section as **boilerplate** : + # - won't all exist in every repo, but including them all does no harm From faaf579e4f0d49985787fc13931949ac8485f712 Mon Sep 17 00:00:00 2001 From: Henry Wright Date: Fri, 18 Jul 2025 10:58:49 +0100 Subject: [PATCH 2/4] fix manifest ci --- MANIFEST.in | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index 30409e1a..05fb373b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -12,7 +12,7 @@ #--------- # SECTION: main code sources # -recursive-include src *.py .nc .txt +recursive-include src *.py *.nc *.txt # principles: # - *no* "prune" command is used # - use "include-recursive", by relevant file extensions @@ -60,6 +60,7 @@ exclude .mailmap exclude .pre-commit-config.yaml exclude .readthedocs.yml exclude .ruff.toml +include CHANGELOG.md exclude CHANGES include CITATION.cff exclude CODE_OF_CONDUCT.md @@ -100,3 +101,10 @@ global-exclude __pycache__ # previous sections -- such as python compiler cache files # - can include this section as **boilerplate** : # - won't all exist in every repo, but including them all does no harm + + +# +#================================= +# Local Iris-ESMF-Regrid-specific settings +# +prune benchmarks From 4169a910e05324a091385019aa490374c955574f Mon Sep 17 00:00:00 2001 From: Henry Wright Date: Fri, 18 Jul 2025 15:01:29 +0100 Subject: [PATCH 3/4] review comments --- MANIFEST.in | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 05fb373b..a8545c8b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -25,17 +25,6 @@ recursive-include src *.py *.nc *.txt # - also possibly non-python, e.g. *.pyx for Cython -#--------- -# SECTION: docs -prune docs -# and if required ... include ONLY docs source files. -# E.G. recursive-include docs *.rst *.inc - # principles: - # - use prune to ignore everything (optionally: except the docs sources) - # hints: - # - most projects don't want to package the docs, but some currently do (cf-units). - - #--------- # SECTION: requirements prune requirements @@ -45,7 +34,6 @@ recursive-include requirements *.txt # hints: # - not all projects include requirements, but they can be drawn in anyway by dynamic dependencies # in the setuptools build process, linked via config in pyproject.toml - # - for some repos, the *.txt are actually lockfiles. This probably needs fixing. #--------- @@ -88,6 +76,7 @@ prune .github prune .nox prune .tox prune .coverage +prune docs # (2) top-level files to omit exclude .coveragerc # (3) file types (path patterns) to skip everywhere @@ -108,3 +97,4 @@ global-exclude __pycache__ # Local Iris-ESMF-Regrid-specific settings # prune benchmarks +exclude .ruff.toml From e23b1e1f53d02612ec2ca37fa9d2dd2e5d1421f0 Mon Sep 17 00:00:00 2001 From: Henry Wright Date: Fri, 18 Jul 2025 15:06:38 +0100 Subject: [PATCH 4/4] Incorperate SciTools/.github#183 --- MANIFEST.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index a8545c8b..d08cefa7 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -48,16 +48,20 @@ exclude .mailmap exclude .pre-commit-config.yaml exclude .readthedocs.yml exclude .ruff.toml -include CHANGELOG.md exclude CHANGES +include CHANGELOG.md include CITATION.cff exclude CODE_OF_CONDUCT.md +exclude CONTRIBUTING.md include COPYING include COPYING.LESSER +include INSTALL include LICENSE exclude Makefile exclude codecov.yml include noxfile.py +include tox.ini +exclude pixi.lock # principles: # - *ANY* file in the root should be explicitly "include"- or "exclude"-d # - EXCEPT (possibly) those covered by setuptools default rules (see above link)