From d7a41369f58b877ba9302f15c15fa39972d07510 Mon Sep 17 00:00:00 2001 From: Henry Wright Date: Fri, 11 Jul 2025 14:29:12 +0100 Subject: [PATCH 1/5] allign manifest.in to template --- MANIFEST.in | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 61 insertions(+), 3 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 2633ac8..ef42e50 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,12 +1,70 @@ -prune .github +# NOTE: based on a generic template in Scitools/.github/templates/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 *.pyx + # 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: requirements prune requirements recursive-include requirements *.txt -recursive-include src *.py *.pyx -include CITATION.cff + # 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 exclude .gitignore exclude .pre-commit-config.yaml +include CITATION.cff +include LICENSE + # 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 +# (2) top-level files to omit exclude Dockerfile exclude codecov.yml exclude index.ipynb exclude summary.png +# (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 a089e3d39557397b8accdca0052312360fab5be5 Mon Sep 17 00:00:00 2001 From: Henry Wright Date: Fri, 18 Jul 2025 10:26:06 +0100 Subject: [PATCH 2/5] add boilerplate sections --- MANIFEST.in | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/MANIFEST.in b/MANIFEST.in index ef42e50..4b8f134 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -34,10 +34,24 @@ recursive-include requirements *.txt #--------- # SECTION: root files exclude .flake8 +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 +exclude .ruff.toml +exclude CHANGES include CITATION.cff +exclude CODE_OF_CONDUCT.md +include COPYING +include COPYING.LESSER include LICENSE +exclude Makefile +exclude codecov.yml +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) @@ -52,9 +66,13 @@ include LICENSE # 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 Dockerfile exclude codecov.yml +exclude .coveragerc exclude index.ipynb exclude summary.png # (3) file types (path patterns) to skip everywhere From 7904c73bd3eba8ee1fe005979a9e5cf7b3c0e97b Mon Sep 17 00:00:00 2001 From: Henry Wright Date: Fri, 18 Jul 2025 11:49:04 +0100 Subject: [PATCH 3/5] remove line --- MANIFEST.in | 1 - 1 file changed, 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index 4b8f134..dd0bdf0 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -23,7 +23,6 @@ recursive-include src *.py *.pyx #--------- # SECTION: requirements prune requirements -recursive-include requirements *.txt # principles: # include just requirements-level info, not lock files # hints: From 24b8e724e2056fad3787d7b5513e3acf0c65b956 Mon Sep 17 00:00:00 2001 From: Henry Wright Date: Fri, 18 Jul 2025 11:51:31 +0100 Subject: [PATCH 4/5] undo last commit --- MANIFEST.in | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST.in b/MANIFEST.in index dd0bdf0..4b8f134 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -23,6 +23,7 @@ recursive-include src *.py *.pyx #--------- # SECTION: requirements prune requirements +recursive-include requirements *.txt # principles: # include just requirements-level info, not lock files # hints: From 0bb53d02f220a8c6a4995b5a5360d6d1c19b50e0 Mon Sep 17 00:00:00 2001 From: Henry Wright Date: Fri, 18 Jul 2025 15:23:22 +0100 Subject: [PATCH 5/5] Incorperate SciTools/.github#183 --- MANIFEST.in | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 4b8f134..6621a96 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -8,7 +8,7 @@ #--------- # SECTION: main code sources # -recursive-include src *.py *.pyx +recursive-include src *.c *.py *.pyx *.so # principles: # - *no* "prune" command is used # - use "include-recursive", by relevant file extensions @@ -29,7 +29,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. #--------- # SECTION: root files @@ -69,12 +68,9 @@ prune .github prune .nox prune .tox prune .coverage +prune docs # (2) top-level files to omit -exclude Dockerfile -exclude codecov.yml exclude .coveragerc -exclude index.ipynb -exclude summary.png # (3) file types (path patterns) to skip everywhere global-exclude *.py[cod] global-exclude __pycache__ @@ -86,3 +82,11 @@ 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 Python-Stratify-specific settings +# +exclude Dockerfile +exclude index.ipynb +exclude summary.png