From 9724cf6f119afccb9b31e0bad35a8981f381cb09 Mon Sep 17 00:00:00 2001 From: Will Shanks Date: Mon, 3 Jun 2024 09:09:47 -0400 Subject: [PATCH] Use explicit package list and ensure it is tested in CI * In `pyproject.toml`, use an explicit package list instead of using the `find` directive. * In GitHub Actions workflow, do not use an editable install since that implicitly includes all modules below `uncertainties/` and we want to make sure we test the package in its installed form. --- .github/workflows/python-package.yml | 3 +-- pyproject.toml | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 94976812..ef05092b 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -28,8 +28,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install -e . - python -m pip install pytest pytest-cov numpy + python -m pip install .[arrays,test] - name: Test source code and docs run: | pytest --cov . --cov-report xml diff --git a/pyproject.toml b/pyproject.toml index 39636c6d..2ecaf429 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,9 +49,8 @@ classifiers = [ ] dependencies = [] -[tool.setuptools.packages.find] -include = ["uncertainties", "uncertainties.unumpy"] -exclude = ["doc", "test"] +[tool.setuptools] +packages = ["uncertainties", "uncertainties.unumpy"] [project.urls] Documentation = "http://uncertainties-python-package.readthedocs.io/"