Skip to content

Commit 07b740c

Browse files
committed
Use pip-compile to manage dependencies
1 parent e296e80 commit 07b740c

19 files changed

+1306
-48
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Dependencies
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '47 8 19 * *'
7+
8+
permissions:
9+
pull-requests: write
10+
# Note: DEPENDENCY_WORKFLOW_KEY is used, such that CI will be triggered on push
11+
12+
concurrency:
13+
group: ${{ github.workflow }}
14+
15+
jobs:
16+
update-dependencies:
17+
runs-on: ubuntu-24.04
18+
strategy:
19+
matrix:
20+
python-version: [ '3.9', '3.10', '3.11', '3.12' ]
21+
steps:
22+
- uses: actions/checkout@v4
23+
with:
24+
ssh-key: ${{ secrets.DEPENDENCY_WORKFLOW_KEY }}
25+
- uses: actions/setup-python@v5
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
- run: pip install pip-tools==7.4.1
29+
- name: Update dependencies
30+
run: |
31+
cd requirements
32+
pip-compile --upgrade --no-annotate -o examples-requirements-py${{ matrix.python-version }}.txt --all-extras ../pyproject.toml examples.in
33+
pip-compile --upgrade --no-annotate -o tests-requirements-py${{ matrix.python-version }}.txt examples-requirements-py${{ matrix.python-version }}.txt tests.in
34+
- name: Open PR
35+
uses: peter-evans/[email protected]
36+
with:
37+
commit-message: Dependency updates for Python ${{ matrix.python-version }}
38+
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
39+
branch: deps/py${{ matrix.python-version }}
40+
delete-branch: true
41+
title: Dependency updates for Python ${{ matrix.python-version }}
42+
labels: |
43+
dependencies
44+
body: |
45+
Dependency updates by pip-compile
46+
47+
update-dependencies-docs:
48+
runs-on: ubuntu-24.04
49+
steps:
50+
- uses: actions/checkout@v4
51+
with:
52+
ssh-key: ${{ secrets.DEPENDENCY_WORKFLOW_KEY }}
53+
- uses: actions/setup-python@v5
54+
with:
55+
python-version: '3.12'
56+
- run: pip install pip-tools==7.4.1
57+
- name: Update dependencies
58+
run: |
59+
cd requirements
60+
pip-compile --upgrade --no-annotate -o docs-requirements.txt examples-requirements-py3.12.txt docs.in
61+
- name: Open PR
62+
uses: peter-evans/[email protected]
63+
with:
64+
commit-message: Dependency updates for docs
65+
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
66+
branch: deps/docs
67+
delete-branch: true
68+
title: Dependency updates for docs
69+
labels: |
70+
dependencies
71+
body: |
72+
Dependency updates by pip-compile

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ jobs:
7373
python-version: '3.12'
7474
- name: Install dependencies
7575
run: |
76+
pip install -r requirements/docs-requirements.txt
7677
pip install -e .
77-
pip install -r docs/requirements.txt
7878
- name: Sphinx build
7979
run: |
8080
sphinx-build docs _build/html

.github/workflows/test.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,22 @@ jobs:
88
strategy:
99
matrix:
1010
python-version: [ '3.9', '3.10', '3.11', '3.12' ]
11-
dep-versions: [ '', '-numpy1' ]
11+
dep-versions: [ '', 'numpy1' ]
1212
exclude:
1313
- python-version: '3.12'
14-
dep-versions: '-numpy1'
14+
dep-versions: 'numpy1'
1515
steps:
1616
- uses: actions/checkout@v4
1717
- uses: actions/setup-python@v5
1818
with:
1919
python-version: ${{ matrix.python-version }}
2020
- name: Install dependencies
2121
run: |
22+
pip install -r requirements/tests-requirements-py${{ matrix.python-version }}.txt
23+
if [[ -n "${{ matrix.dep-versions }}" ]]; then
24+
pip install -r requirements/tests-requirements-var-${{ matrix.dep-versions }}.txt
25+
fi
2226
pip install -e .
23-
pip install -r tests/requirements.txt
24-
pip install -r tests/requirements${{ matrix.dep-versions }}.txt
2527
- name: Pytest
2628
run: |
2729
cd tests
@@ -36,8 +38,8 @@ jobs:
3638
python-version: '3.12'
3739
- name: Install dependencies
3840
run: |
41+
pip install -r requirements/docs-requirements.txt
3942
pip install -e .
40-
pip install -r docs/requirements.txt
4143
- name: Sphinx build
4244
run: |
4345
sphinx-build docs _build/html

docs/requirements.txt

Lines changed: 0 additions & 20 deletions
This file was deleted.

examples/requirements.txt

Lines changed: 0 additions & 16 deletions
This file was deleted.

requirements/docs-requirements.txt

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.12
3+
# by the following command:
4+
#
5+
# pip-compile --no-annotate --output-file=docs-requirements.txt docs.in examples-requirements-py3.12.txt
6+
#
7+
accessible-pygments==0.0.5
8+
alabaster==1.0.0
9+
anyio==4.6.0
10+
apeye==1.4.1
11+
apeye-core==1.1.5
12+
appdirs==1.4.4
13+
argon2-cffi==23.1.0
14+
argon2-cffi-bindings==21.2.0
15+
arrow==1.3.0
16+
astroid==3.3.2
17+
asttokens==2.4.1
18+
async-lru==2.0.4
19+
attrs==24.2.0
20+
autodocsumm==0.2.13
21+
babel==2.16.0
22+
beautifulsoup4==4.12.3
23+
bleach==6.1.0
24+
cachecontrol[filecache]==0.14.0
25+
certifi==2024.8.30
26+
cffi==1.17.1
27+
charset-normalizer==3.3.2
28+
click==8.1.7
29+
comm==0.2.2
30+
contourpy==1.3.0
31+
cssutils==2.11.1
32+
cycler==0.12.1
33+
cython==3.0.11
34+
debugpy==1.8.6
35+
decorator==5.1.1
36+
defusedxml==0.7.1
37+
dict2css==0.3.0.post1
38+
docutils==0.21.2
39+
domdf-python-tools==3.9.0
40+
executing==2.1.0
41+
fastjsonschema==2.20.0
42+
filelock==3.16.1
43+
flexcache==0.3
44+
flexparser==0.3.1
45+
fonttools==4.54.1
46+
fqdn==1.5.1
47+
greenlet==3.1.1
48+
h11==0.14.0
49+
html5lib==1.1
50+
httpcore==1.0.5
51+
httpx==0.27.2
52+
idna==3.10
53+
imagesize==1.4.1
54+
importlib-metadata==8.5.0
55+
ipykernel==6.29.5
56+
ipython==8.18.1
57+
isoduration==20.11.0
58+
jedi==0.19.1
59+
jinja2==3.1.4
60+
json5==0.9.25
61+
jsonpointer==3.0.0
62+
jsonschema[format-nongpl]==4.23.0
63+
jsonschema-specifications==2023.12.1
64+
jupyter-cache==1.0.0
65+
jupyter-client==8.6.3
66+
jupyter-core==5.7.2
67+
jupyter-events==0.10.0
68+
jupyter-lsp==2.2.5
69+
jupyter-server==2.14.2
70+
jupyter-server-terminals==0.5.3
71+
jupyterlab==4.2.5
72+
jupyterlab-pygments==0.3.0
73+
jupyterlab-server==2.27.3
74+
kiwisolver==1.4.7
75+
lark==1.2.2
76+
markdown-it-py==3.0.0
77+
markupsafe==2.1.5
78+
matplotlib==3.9.2
79+
matplotlib-inline==0.1.7
80+
mdit-py-plugins==0.4.2
81+
mdurl==0.1.2
82+
mistune==3.0.2
83+
more-itertools==10.5.0
84+
msgpack==1.1.0
85+
myst-nb==1.1.1
86+
myst-parser==4.0.0
87+
natsort==8.4.0
88+
nbclient==0.10.0
89+
nbconvert==7.16.4
90+
nbformat==5.10.4
91+
nest-asyncio==1.6.0
92+
notebook-shim==0.2.4
93+
numpy==2.0.2
94+
overrides==7.7.0
95+
packaging==24.1
96+
pandas==2.2.2
97+
pandocfilters==1.5.1
98+
parso==0.8.4
99+
pexpect==4.9.0
100+
pillow==10.4.0
101+
pint==0.24.3
102+
platformdirs==4.3.6
103+
pockets==0.9.1
104+
prometheus-client==0.21.0
105+
prompt-toolkit==3.0.48
106+
psutil==6.0.0
107+
ptyprocess==0.7.0
108+
pure-eval==0.2.3
109+
pycparser==2.22
110+
pydata-sphinx-theme==0.15.4
111+
pygments==2.18.0
112+
pyparsing==3.1.4
113+
python-dateutil==2.9.0.post0
114+
python-json-logger==2.0.7
115+
pytz==2024.2
116+
pyyaml==6.0.2
117+
pyzmq==26.2.0
118+
referencing==0.35.1
119+
requests==2.32.3
120+
rfc3339-validator==0.1.4
121+
rfc3986-validator==0.1.1
122+
rpds-py==0.20.0
123+
ruamel-yaml==0.18.6
124+
ruamel-yaml-clib==0.2.8
125+
scipy==1.13.1
126+
send2trash==1.8.3
127+
six==1.16.0
128+
sniffio==1.3.1
129+
snowballstemmer==2.2.0
130+
soupsieve==2.6
131+
sphinx==8.0.2
132+
sphinx-autoapi==3.3.1
133+
sphinx-autodoc-typehints==2.4.1
134+
sphinx-codeautolink==0.15.2
135+
sphinx-gallery==0.17.1
136+
sphinx-jinja2-compat==0.3.0
137+
sphinx-prompt==1.9.0
138+
sphinx-tabs==3.4.5
139+
sphinx-toolbox==3.8.0
140+
sphinxcontrib-applehelp==2.0.0
141+
sphinxcontrib-devhelp==2.0.0
142+
sphinxcontrib-htmlhelp==2.1.0
143+
sphinxcontrib-jsmath==1.0.1
144+
sphinxcontrib-napoleon==0.7
145+
sphinxcontrib-qthelp==2.0.0
146+
sphinxcontrib-serializinghtml==2.0.0
147+
sqlalchemy==2.0.35
148+
stack-data==0.6.3
149+
tabulate==0.9.0
150+
terminado==0.18.1
151+
tinycss2==1.3.0
152+
tornado==6.4.1
153+
tqdm==4.66.5
154+
traitlets==5.14.3
155+
types-python-dateutil==2.9.0.20240906
156+
typing-extensions==4.12.2
157+
tzdata==2024.2
158+
uri-template==1.3.0
159+
urllib3==2.2.3
160+
wcwidth==0.2.13
161+
webcolors==24.8.0
162+
webencodings==0.5.1
163+
websocket-client==1.8.0
164+
xcoll==0.5.1
165+
xdeps==0.6.3
166+
xfields==0.20.3
167+
xobjects==0.4.4
168+
xpart==0.18.6
169+
xsuite==0.16.5
170+
xtrack==0.66.1
171+
zipp==3.20.2
172+
173+
# The following packages are considered to be unsafe in a requirements file:
174+
# setuptools

requirements/docs.in

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
myst-nb
2+
pydata-sphinx-theme
3+
sphinx
4+
sphinx-autoapi
5+
sphinx-autodoc-typehints
6+
sphinx-codeautolink
7+
sphinx-gallery
8+
sphinx-jinja2-compat
9+
sphinx-prompt
10+
sphinx-tabs
11+
sphinx-toolbox
12+
sphinxcontrib-napoleon

0 commit comments

Comments
 (0)