From 976133bdff959509e2f58d75ca9043c1658ef3e4 Mon Sep 17 00:00:00 2001 From: Andrea Blengino Date: Wed, 10 Apr 2024 22:16:25 +0200 Subject: [PATCH 1/4] BUG: split package building in order to avoid invalid versions --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f0c8ce6..a4b1d6b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,8 @@ jobs: - name: Build package run: | - python -m build + python -m build --sdist + python -m build --wheel - name: Publish to PyPI run: | From 9ca55cec10ff8e37d769310558276edc5103c755 Mon Sep 17 00:00:00 2001 From: Andrea Blengino Date: Wed, 10 Apr 2024 22:23:08 +0200 Subject: [PATCH 2/4] TST: make test workflow building more robust --- .github/workflows/linux_test.yml | 10 +++++----- .github/workflows/macos_test.yml | 10 +++++----- .github/workflows/windows_test.yml | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/linux_test.yml b/.github/workflows/linux_test.yml index 378ab4c..84e8776 100644 --- a/.github/workflows/linux_test.yml +++ b/.github/workflows/linux_test.yml @@ -22,11 +22,7 @@ jobs: - name: Build package run: | - python -m build - - - name: Install build package - run: | - pip install .[test] + python -m build --wheel - name: Package differences computation run: | @@ -43,6 +39,10 @@ jobs: script: | core.setFailed('Compiled package different from source package.') + - name: Install build package + run: | + pip install .[test] + - name: Fetch uses: actions/checkout@master diff --git a/.github/workflows/macos_test.yml b/.github/workflows/macos_test.yml index 0acc735..5177b5b 100644 --- a/.github/workflows/macos_test.yml +++ b/.github/workflows/macos_test.yml @@ -22,11 +22,7 @@ jobs: - name: Build package run: | - python -m build - - - name: Install build package - run: | - pip install .[test] + python -m build --wheel - name: Package differences computation run: | @@ -43,6 +39,10 @@ jobs: script: | core.setFailed('Compiled package different from source package.') + - name: Install build package + run: | + pip install .[test] + - name: Fetch uses: actions/checkout@master diff --git a/.github/workflows/windows_test.yml b/.github/workflows/windows_test.yml index 3719678..44e51c7 100644 --- a/.github/workflows/windows_test.yml +++ b/.github/workflows/windows_test.yml @@ -22,11 +22,7 @@ jobs: - name: Build package run: | - python -m build - - - name: Install build package - run: | - pip install .[test] + python -m build --wheel - name: Package differences computation run: | @@ -43,6 +39,10 @@ jobs: script: | core.setFailed('Compiled package different from source package.') + - name: Install build package + run: | + pip install .[test] + - name: Fetch uses: actions/checkout@master From ba802b39fa4d0a2d89ef2dd65cd9387456ea299a Mon Sep 17 00:00:00 2001 From: Andrea Blengino Date: Wed, 10 Apr 2024 22:27:34 +0200 Subject: [PATCH 3/4] ENH: remove requirements references from .readthedocs and tox files --- .readthedocs.yaml | 3 +-- tox.ini | 7 ++----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 199fddd..bfda5aa 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -10,8 +10,7 @@ build: python: "3.9" jobs: post_create_environment: - - pip install . - - pip install -r requirements/docs.txt + - pip install .[doc] sphinx: configuration: docs/source/conf.py diff --git a/tox.ini b/tox.ini index 0e8e129..d15d9d4 100644 --- a/tox.ini +++ b/tox.ini @@ -3,12 +3,9 @@ envlist = py39,py310,py311,py312 skipsdist = True [testenv] -deps = - -rrequirements/common.txt - -rrequirements/tests.txt - commands = - python -m pytest --verbose --cov=gearpy --cov-report=html -nauto + python -m pip install .[test] + python -m pytest --verbose --cov=gearpy --cov-report=html -nauto -m spur_gear [pytest] python_files = test_* From 578c34a5dfd032c2338081050dabea52dc3ee57a Mon Sep 17 00:00:00 2001 From: Andrea Blengino Date: Wed, 10 Apr 2024 22:27:48 +0200 Subject: [PATCH 4/4] ENH: remove requirements files --- requirements/common.txt | 4 ---- requirements/dev.txt | 2 -- requirements/docs.txt | 3 --- requirements/tests.txt | 5 ----- 4 files changed, 14 deletions(-) delete mode 100644 requirements/common.txt delete mode 100644 requirements/dev.txt delete mode 100644 requirements/docs.txt delete mode 100644 requirements/tests.txt diff --git a/requirements/common.txt b/requirements/common.txt deleted file mode 100644 index 3db0059..0000000 --- a/requirements/common.txt +++ /dev/null @@ -1,4 +0,0 @@ -matplotlib==3.8.0 -numpy==1.26.0 -pandas==2.1.1 -scipy==1.11.3 diff --git a/requirements/dev.txt b/requirements/dev.txt deleted file mode 100644 index 34b0fd7..0000000 --- a/requirements/dev.txt +++ /dev/null @@ -1,2 +0,0 @@ -twine==4.0.2 -wheel==0.41.2 diff --git a/requirements/docs.txt b/requirements/docs.txt deleted file mode 100644 index 62797c6..0000000 --- a/requirements/docs.txt +++ /dev/null @@ -1,3 +0,0 @@ -furo==2023.9.10 -m2r2==0.3.3.post2 -sphinx==7.2.6 diff --git a/requirements/tests.txt b/requirements/tests.txt deleted file mode 100644 index 2e3627b..0000000 --- a/requirements/tests.txt +++ /dev/null @@ -1,5 +0,0 @@ -coverage==7.3.2 -hypothesis==6.88.1 -pytest==7.4.3 -pytest-cov==4.1.0 -pytest-xdist==3.3.1