Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2937e21

Browse files
committedNov 2, 2024·
Remove unnecesary reqs files, fix versions
1 parent 85ae041 commit 2937e21

10 files changed

+20
-62
lines changed
 

‎.github/workflows/pytest.yml

+12-16
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,16 @@ jobs:
2323
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
2424
suffix: [''] # placeholder as an alternative to "-min"
2525
include:
26+
# run with minimal versions of dependencies just on one matrix job, where the coverage report will only get uploaded
2627
- os: ubuntu-latest
27-
# run with minimal versions of dependencies
28-
# this is also used to upload the coverage report
29-
python-version: "3.8"
28+
python-version: "3.8" # update to match lowest supported version
3029
suffix: -min
31-
exclude:
32-
- os: macos-latest
33-
# exclude this version because its PyYAML version does not work (only in macos)
34-
python-version: "3.8"
3530

3631
runs-on: ${{ matrix.os }}
3732
env:
38-
# Dev requirement filename, e.g., ci/requirements-py3.9-min.txt or ci/requirements-py3.9.txt
39-
# these are pip-compatible requirements files
40-
REQUIREMENTS: ci/requirements-py${{ matrix.python-version }}${{ matrix.suffix }}.txt
33+
# pip-compatible requirements file that specifies the minimal versions of dependencies
34+
# to test against. Makes sense only when running with the "-min" suffix.
35+
MIN_REQUIREMENTS: ci/requirements-pip-minimal.txt
4136

4237
steps:
4338
# Check out only a limited depth and then pull tags to save time
@@ -49,18 +44,19 @@ jobs:
4944
- name: Get tags
5045
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
5146

52-
- name: Install Python ${{ matrix.python-version }}${{ matrix.suffix }}
47+
- name: Install Python ${{ matrix.python-version }}
5348
uses: actions/setup-python@v5
5449
with:
5550
python-version: ${{ matrix.python-version }}
5651

57-
- name: Set up test requirements
58-
# sets versions of dependencies in the requirements file first to avoid installing newer versions
52+
- name: Set up test minimal requirements
53+
if: matrix.suffix == '-min'
54+
# install minimal versions of dependencies in the requirements file first to avoid installing newer versions automatically
5955
run: |
60-
pip install -r ${{ env.REQUIREMENTS }}
56+
pip install -r ${{ env.MIN_REQUIREMENTS }}
6157
pip freeze
6258
63-
- name: Set up environment
59+
- name: Set up tests environment
6460
run: |
6561
pip install .[test]
6662
pip freeze
@@ -73,7 +69,7 @@ jobs:
7369
- name: Upload coverage report
7470
uses: codecov/codecov-action@v4
7571
# only upload coverage report once, for the minimal version of dependencies
76-
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8' && matrix.suffix == '-min'
72+
if: matrix.os == 'ubuntu-latest' && matrix.suffix == '-min'
7773
with:
7874
fail_ci_if_error: true
7975
token: ${{ secrets.CODECOV_TOKEN }}

‎ci/requirements-pip-minimal.txt

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# pin here the minimal versions of the dependencies to run CI tests against
2+
matplotlib==3.5.0
3+
numpy==1.20.3
4+
pandas==1.5.0
5+
pvlib==0.8.1
6+
ruamel.yaml==0.15.100
7+
scipy==1.7.1

‎ci/requirements-py3.10.txt

-6
This file was deleted.

‎ci/requirements-py3.11.txt

-6
This file was deleted.

‎ci/requirements-py3.12.txt

-6
This file was deleted.

‎ci/requirements-py3.13.txt

-6
This file was deleted.

‎ci/requirements-py3.8-min.txt

-9
This file was deleted.

‎ci/requirements-py3.8.txt

-6
This file was deleted.

‎ci/requirements-py3.9.txt

-6
This file was deleted.

‎pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ dependencies = [
1010
"numpy>=1.20.3",
1111
"pandas>=1.5.0",
1212
"openpyxl",
13-
"pvlib>=0.8.0",
13+
"pvlib>=0.8.1",
1414
"ruamel.yaml>=0.15.0",
1515
"scipy>=1.7.1",
1616
]

0 commit comments

Comments
 (0)
Please sign in to comment.