From a7d656f71ae69d287233ee8dfc1d43dc20f64289 Mon Sep 17 00:00:00 2001 From: Jack Betteridge Date: Wed, 6 Aug 2025 20:21:37 +0100 Subject: [PATCH 1/2] install: Remove files and directories not needed for install --- MANIFEST.in | 13 +++++++++++-- pyproject.toml | 3 +-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 30465f96bb..1d80e3db97 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,7 +1,16 @@ -include versioneer.py -include devito/_version.py +# Explicitly include the requirements files include requirements.txt include requirements-optional.txt include requirements-testing.txt include requirements-mpi.txt include requirements-nvidia.txt + +# Exclude the Github, Binder and Docker directories +prune .github +prune binder +prune docker +# Exclude hidden files and YAML files +exclude .* *.yml + +# Exclude compiled and temporary files +global-exclude *~ *.py[cod] *.so diff --git a/pyproject.toml b/pyproject.toml index ca62ac370c..afa0c02704 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,8 +64,7 @@ extras = { file = ["requirements-optional.txt"] } [tool.setuptools.packages.find] where = ["."] -exclude = ["docs", "tests", "examples"] - +exclude = ["binder", "docker", "docs", "tests", "examples"] [tool.setuptools_scm] fallback_version = "0+untagged" From 791e269714e7fd9691ba2f5b674c4322ef709f31 Mon Sep 17 00:00:00 2001 From: mloubout Date: Wed, 6 Aug 2025 20:42:56 -0400 Subject: [PATCH 2/2] misc: quartodoc doesn't like lambda for docs --- devito/builtins/arithmetic.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/devito/builtins/arithmetic.py b/devito/builtins/arithmetic.py index 82a1be6ea6..350f5257bb 100644 --- a/devito/builtins/arithmetic.py +++ b/devito/builtins/arithmetic.py @@ -180,20 +180,28 @@ def inner(f, g): return f.dtype(n.data[0]) -red_doc = lambda func: f""" - Retrieve the {func}imum. +def mmin(f): + """ + Retrieve the minimum. Parameters ---------- f : array_like or Function Input operand. """ + return _reduce_func(f, np.min, dv.mpi.MPI.MIN) + +def mmax(f): + """ + Retrieve the maximum. -mmin = lambda f: _reduce_func(f, np.min, dv.mpi.MPI.MIN) -mmin.__doc__ = red_doc('min') -mmax = lambda f: _reduce_func(f, np.max, dv.mpi.MPI.MAX) -mmax.__doc__ = red_doc('max') + Parameters + ---------- + f : array_like or Function + Input operand. + """ + return _reduce_func(f, np.max, dv.mpi.MPI.MAX) @dv.switchconfig(log_level='ERROR')