@@ -12,46 +12,42 @@ jobs:
1212 steps :
1313 - uses : actions/checkout@v3
1414 - name : Set up Python
15- uses : actions /setup-python@v3
15+ uses : astral-sh /setup-uv@v5
1616 with :
17- python-version : " 3.11 "
17+ python-version : " 3.13 "
1818 - name : Install dependencies
1919 run : |
20- python -m pip install --upgrade pip
21- pip install $(find . -name "requirement*" -type f -printf ' -r %p')
22- pip install pylint
20+ uv sync --all-extras
21+ uv pip install torch --index-url https://download.pytorch.org/whl/cpu
2322 - name : Analysing the code with pylint
2423 run : |
25- pylint -d C0301,R0913,W1202 $(git ls-files '*.py') --ignored-modules "rdkit" --max-positional-arguments 10
24+ uv run pylint -d C0301,R0913,W1202 $(git ls-files '*.py') --ignored-modules "rdkit" --max-positional-arguments 10
2625 mypy :
2726 runs-on : ubuntu-latest
2827 steps :
2928 - uses : actions/checkout@v3
3029 - name : Set up Python
31- uses : actions /setup-python@v3
30+ uses : astral-sh /setup-uv@v5
3231 with :
33- python-version : " 3.11 "
32+ python-version : " 3.13 "
3433 - name : Install dependencies
3534 run : |
36- python -m pip install --upgrade pip
37- pip install mypy
38- mypy . || exit_code=$?
39- mypy --install-types --non-interactive
35+ uv run mypy . || exit_code=$?
36+ uv run mypy --install-types --non-interactive
4037 - name : Analysing the code with mypy
4138 run : |
42- mypy --ignore-missing-imports --disallow-any-generics --disallow-untyped-defs --no-implicit-optional --disallow-incomplete-defs .
39+ uv run mypy --ignore-missing-imports --disallow-any-generics --disallow-untyped-defs --no-implicit-optional --disallow-incomplete-defs .
4340 pydocstyle :
4441 runs-on : ubuntu-latest
4542 steps :
4643 - uses : actions/checkout@v3
4744 - name : Set up Python
4845 uses : actions/setup-python@v3
4946 with :
50- python-version : " 3.11 "
47+ python-version : " 3.13 "
5148 - name : Install dependencies
5249 run : |
53- python -m pip install --upgrade pip
54- pip install pydocstyle
50+ python -m pip install pydocstyle
5551 - name : Analysing the code with pydocstyle
5652 run : |
5753 pydocstyle .
@@ -63,46 +59,28 @@ jobs:
6359 - name : Set up Python
6460 uses : actions/setup-python@v3
6561 with :
66- python-version : " 3.11 "
62+ python-version : " 3.13 "
6763 - name : Install dependencies
6864 run : |
69- python -m pip install --upgrade pip
70- pip install docsig
65+ python -m pip install docsig
7166 - name : Analysing the code with docsig
7267 run : |
7368 docsig --check-class-constructor --check-dunders --check-protected-class-methods --check-nested --check-overridden --check-protected .
7469
75- black :
76- runs-on : ubuntu-latest
77- steps :
78- - uses : actions/checkout@v3
79- - name : Set up Python
80- uses : actions/setup-python@v3
81- with :
82- python-version : " 3.11"
83- - name : Install dependencies
84- run : |
85- python -m pip install --upgrade pip
86- pip install black[jupyter]
87- - name : Analysing the code with black
88- run : |
89- black --check .
90-
9170 flake8 :
9271 runs-on : ubuntu-latest
9372 steps :
9473 - uses : actions/checkout@v3
9574 - name : Set up Python
9675 uses : actions/setup-python@v3
9776 with :
98- python-version : " 3.11 "
77+ python-version : " 3.13 "
9978 - name : Install dependencies
10079 run : |
101- python -m pip install --upgrade pip
102- pip install flake8
80+ python -m pip install flake8
10381 - name : Analysing the code with flake8
10482 run : |
105- flake8 --extend-ignore=D203,E203,E501,W503 .
83+ flake8 --extend-ignore=D203,E203,E501,W503 --extend-exclude .venv .
10684
10785 interrogate :
10886 runs-on : ubuntu-latest
@@ -111,11 +89,10 @@ jobs:
11189 - name : Set up Python
11290 uses : actions/setup-python@v3
11391 with :
114- python-version : " 3.11 "
92+ python-version : " 3.13 "
11593 - name : Install dependencies
11694 run : |
117- python -m pip install --upgrade pip
118- pip install interrogate
95+ python -m pip install interrogate
11996 - name : Analysing the code with interrogate
12097 run : |
12198 interrogate --ignore-overloaded-functions -vv .
@@ -127,46 +104,66 @@ jobs:
127104 - name : Set up Python
128105 uses : actions/setup-python@v3
129106 with :
130- python-version : " 3.11 "
107+ python-version : " 3.13 "
131108 - name : Install dependencies
132109 run : |
133- python -m pip install --upgrade pip
134- pip install bandit
110+ python -m pip install bandit
135111 - name : Analysing the code with bandit
136112 run : |
137- bandit -r --skip=B404,B603,B602 .
113+ bandit -r --skip=B404,B603,B602 -c pyproject.toml .
138114
139- isort :
115+ pyright :
140116 runs-on : ubuntu-latest
141117 steps :
142118 - uses : actions/checkout@v3
143119 - name : Set up Python
144- uses : actions /setup-python@v3
120+ uses : astral-sh /setup-uv@v5
145121 with :
146- python-version : " 3.11 "
147- - name : Install dependencies
122+ python-version : " 3.13 "
123+ - name : Analysing the code with pyright
148124 run : |
149- python -m pip install --upgrade pip
150- pip install isort
151- - name : Analysing the code with isort
125+ uv run --all-extras pyright .
126+
127+ ruff :
128+ runs-on : ubuntu-latest
129+ steps :
130+ - uses : actions/checkout@v3
131+ - name : Set up Python
132+ uses : astral-sh/setup-uv@v5
133+ with :
134+ python-version : " 3.13"
135+ - name : Analysing the code with ruff
136+ run : |
137+ uv run ruff check --config pyproject.toml
138+
139+ ruff-format :
140+ runs-on : ubuntu-latest
141+ steps :
142+ - uses : actions/checkout@v3
143+ - name : Set up Python
144+ uses : astral-sh/setup-uv@v5
145+ with :
146+ python-version : " 3.13"
147+ - name : Analysing the code with ruff
152148 run : |
153- isort --profile black --check-only .
149+ uvx ruff format --check
154150
155151 test_basis :
156152 needs :
157153 - pylint
158154 - mypy
159155 - pydocstyle
160156 - docsig
161- - black
162157 - flake8
163158 - interrogate
164159 - bandit
165- - isort
160+ - ruff
161+ - ruff-format
162+ - pyright
166163 runs-on : ubuntu-latest
167164 strategy :
168165 matrix :
169- python-version : ["3.10 ", "3.11 ", "3.12 "]
166+ python-version : ["3.11 ", "3.12 ", "3.13 "]
170167 steps :
171168 - uses : actions/checkout@v3
172169 - name : Set up Python ${{ matrix.python-version }}
@@ -189,39 +186,37 @@ jobs:
189186 needs :
190187 - test_basis
191188 runs-on : ubuntu-latest
189+ strategy :
190+ matrix :
191+ python-version : ["3.11", "3.12", "3.13"]
192192 steps :
193193 - uses : actions/checkout@v3
194- - name : Set up Python 3.11
195- uses : actions /setup-python@v3
194+ - name : Set up Python ${{ matrix.python-version }}
195+ uses : astral-sh /setup-uv@v5
196196 with :
197- python-version : " 3.11 "
197+ python-version : ${{ matrix.python-version }}
198198 - name : Install package
199199 run : |
200- python -m pip install --upgrade pip
201- pip install coverage
202- pip install torch
203- pip install .[chemprop]
200+ uv sync --all-extras
201+ uv pip install torch --index-url https://download.pytorch.org/whl/cpu
204202 - name : Run unit-tests for chemprop
205203 run : |
206204 # Run only the chemprop test suite.
207- coverage run --source=molpipeline,tests -m unittest discover test_extras/test_chemprop
205+ uv run coverage run --source=molpipeline,tests -m unittest discover test_extras/test_chemprop
208206 # Create a coverage report. Fail if the coverage is below 85%. Include only chemprop files in the report.
209- coverage report --fail-under=85 --include="*chemprop*","*/*chemprop*/*"
207+ uv run coverage report --fail-under=85 --include="*chemprop*","*/*chemprop*/*"
210208
211209 test_notebooks :
212210 needs :
213211 - test_basis
214212 runs-on : ubuntu-latest
215213 steps :
216214 - uses : actions/checkout@v3
217- - name : Set up Python 3.11
218- uses : actions/setup-python@v3
219- with :
220- python-version : " 3.11"
215+ - name : Set up Python 3.13
216+ uses : astral-sh/setup-uv@v5
221217 - name : Install package
222218 run : |
223- python -m pip install --upgrade pip
224- pip install .[notebooks]
219+ uv sync --all-extras
225220 - name : Run unit-tests for notebooks
226221 run : |
227- python test_extras/test_notebooks/test_notebooks.py --continue-on-failure
222+ uv run python test_extras/test_notebooks/test_notebooks.py --continue-on-failure
0 commit comments