Skip to content

Commit

Permalink
Fix setup of Python dependencies in python.yml Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
althonos committed Sep 3, 2024
1 parent 3fe7495 commit f5e345b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 27 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
cython ~=3.0
wheel
auditwheel <5.2
setuptools >=46.4.0
scikit-build-core
36 changes: 13 additions & 23 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,14 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Update pip
run: python -m pip install -U pip wheel setuptools
- name: Install Python requirements
run: python -m pip install -r .github/workflows/requirements.txt
- name: Install test requirements
run: python -m pip install -r pyrodigal/tests/requirements.txt
run: python -m pip install -r src/pyrodigal/tests/requirements.txt
- name: Build C extension in debug mode
run: python setup.py build_ext --inplace --debug
run: python -m pip install -e . --no-build-isolation -v
- name: Test without coverage
run: python -m unittest discover -vv
run: python -m unittest pyrodigal.tests -vv

test_osx:
name: Test (OSX)
Expand Down Expand Up @@ -123,16 +121,14 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Update pip
run: python -m pip install -U pip wheel setuptools
- name: Install Python requirements
run: python -m pip install -r .github/workflows/requirements.txt
- name: Install test requirements
run: python -m pip install -r pyrodigal/tests/requirements.txt
run: python -m pip install -r src/pyrodigal/tests/requirements.txt
- name: Build C extension in debug mode
run: python setup.py build_ext --inplace --debug --plat-name macos-x86_64
run: python -m pip install -e . --no-build-isolation -v
- name: Test without coverage
run: python -m unittest discover -vv
run: python -m unittest pyrodigal.tests -vv

test_windows:
name: Test (Windows)
Expand Down Expand Up @@ -186,16 +182,14 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Update pip
run: python -m pip install -U pip wheel setuptools
- name: Install Python requirements
run: python -m pip install -r .github/workflows/requirements.txt
- name: Install test requirements
run: python -m pip install -r pyrodigal/tests/requirements.txt
- name: Build C extension
run: python setup.py build_ext --inplace
run: python -m pip install -r src/pyrodigal/tests/requirements.txt
- name: Build C extension in debug mode
run: python -m pip install -e . --no-build-isolation -v
- name: Test without coverage
run: python -m unittest discover -vv
run: python -m unittest pyrodigal.tests -vv

coverage_linux:
name: Coverage (Linux)
Expand All @@ -219,20 +213,16 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Update pip
run: python -m pip install -U pip wheel setuptools
- name: Install Python requirements
run: python -m pip install -r .github/workflows/requirements.txt
- name: Install test requirements
run: python -m pip install -r pyrodigal/tests/requirements.txt
run: python -m pip install -r src/pyrodigal/tests/requirements.txt
- name: Install coverage package
run: python -m pip install -U coverage
- name: Build Prodigal with optimizations
run: python setup.py build_clib
- name: Build Cython extension in debug mode
run: python setup.py build_ext --inplace --debug
run: python -m pip install -e . --no-build-isolation -v
- name: Test with coverage
run: python -m coverage run -m unittest discover -vv
run: python -m coverage run -m unittest pyrodigal.tests -vv
- name: Report coverage
run: python -m coverage report
- name: Upload to Codecov
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ dependencies = [
"PyPI" = "https://pypi.org/project/pyrodigal"

[project.optional-dependencies]
test = ["importlib-resources ; python_version < '3.7'"]
test = ["importlib-resources ; python_version < '3.9'"]
isal = ["isal ~=1.1"]
lz4 = ["lz4 ~=4.0"]
zst = ["zstandard ~=0.22"]
Expand Down

0 comments on commit f5e345b

Please sign in to comment.