Skip to content

Commit 3dc4880

Browse files
authored
Switch back to setuptools, refresh dependencies (#263)
With dependency-groups and uv locks, the last reasons to adhere to poetry have gone away. - Update github actions versions - Update CI to match
1 parent 5f7ab73 commit 3dc4880

File tree

7 files changed

+887
-1163
lines changed

7 files changed

+887
-1163
lines changed

.github/workflows/build_and_test.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ jobs:
77
build:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v3
10+
- uses: actions/checkout@v4
1111
- name: Set up Python
1212
uses: actions/setup-python@v4
1313
with:
14-
python-version: 3.11
14+
python-version: 3.13
1515
- name: Install dependencies
1616
run: |
1717
python -m pip install --upgrade pip
@@ -20,7 +20,7 @@ jobs:
2020
run: |
2121
python -m build
2222
pip install dist/*.whl
23-
- uses: actions/upload-artifact@v3
23+
- uses: actions/upload-artifact@v4
2424
with:
2525
path: ./dist/*
2626

@@ -29,11 +29,11 @@ jobs:
2929
runs-on: ubuntu-latest
3030
strategy:
3131
matrix:
32-
python-version: ["3.10", "3.11", "3.12"]
32+
python-version: ["3.11", "3.12", "3.13"]
3333

3434
steps:
35-
- uses: actions/checkout@v3
36-
- uses: actions/download-artifact@v3
35+
- uses: actions/checkout@v4
36+
- uses: actions/download-artifact@v4
3737
with:
3838
name: artifact
3939
path: dist
@@ -45,7 +45,7 @@ jobs:
4545
- name: Install dependencies
4646
run: |
4747
python -m pip install --upgrade pip
48-
pip install pytest dist/*.whl -r requirements_dev.txt pytest-md pytest-emoji
48+
pip install dist/*.whl -r requirements_dev.txt pytest-md pytest-emoji
4949
- name: Run pytest
5050
uses: pavelzw/pytest-action@b09a85cd1831cbaae76125fcae4a1e4b137ef026 # v2.1.3
5151
with:
@@ -70,7 +70,7 @@ jobs:
7070
permissions:
7171
id-token: write
7272
steps:
73-
- uses: actions/download-artifact@v3
73+
- uses: actions/download-artifact@v4
7474
with:
7575
name: artifact
7676
path: dist

.pre-commit-config.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ci:
22
autoupdate_schedule: quarterly
3-
skip: [poetry-lock]
3+
skip: [uv-lock]
44

55
repos:
66
# Syntax validation and some basic sanity checks
@@ -32,10 +32,10 @@ repos:
3232
- types-requests
3333
- types-pyyaml
3434

35-
- repo: https://github.com/python-poetry/poetry
36-
rev: 1.8.0
35+
- repo: https://github.com/astral-sh/uv-pre-commit
36+
rev: 0.7.13
3737
hooks:
38-
- id: poetry-lock
39-
- id: poetry-export
40-
additional_dependencies: [poetry-plugin-export]
41-
args: [-o, requirements_dev.txt, --with=dev, --without-hashes]
38+
- id: uv-lock
39+
- id: uv-export
40+
args: [--all-groups, -q, -o, requirements_dev.txt, --no-hashes, --no-emit-project]
41+
files: uv.lock|pyproject.toml|.pre-commit-config.yaml

HISTORY.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
History
33
=======
44

5+
Unreleased
6+
----------
7+
- Minimum supported python is now 3.11.
8+
- Switch python packaging backend back to setuptools. (`#263 <https://github.com/DiamondLightSource/python-zocalo/pull/263>`_)
9+
510
1.2.0 (2024-11-14)
611
------------------
712
* Support newer versions of workflows package. (`#260 <https://github.com/DiamondLightSource/python-zocalo/pull/260>`_)

poetry.lock

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

pyproject.toml

Lines changed: 35 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,41 @@
1-
[tool.poetry]
1+
[build-system]
2+
requires = ["setuptools"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
26
name = "zocalo"
37
version = "1.2.0"
48
description = "Infrastructure components for automated data processing at Diamond Light Source"
5-
authors = ["Nicholas Devenish <[email protected]>"]
9+
authors = [{ name = "Nicholas Devenish", email = "[email protected]" }]
10+
requires-python = ">=3.11"
611
readme = "README.rst"
7-
classifiers = [
8-
"Development Status :: 5 - Production/Stable",
9-
"Intended Audience :: Developers",
10-
"License :: OSI Approved :: BSD License",
11-
"Programming Language :: Python :: 3",
12-
"Operating System :: OS Independent",
13-
"Topic :: Software Development :: Libraries :: Python Modules",
12+
dependencies = [
13+
"pyyaml",
14+
"graypy",
15+
"marshmallow",
16+
"requests",
17+
"pydantic>=2,<3",
18+
"workflows>=3.0",
1419
]
1520

16-
[tool.poetry.dependencies]
17-
python = "^3.10"
18-
pyyaml = "^6.0"
19-
graypy = "^2.0"
20-
marshmallow = "^3.19"
21-
requests = "^2.31"
22-
pydantic = "^2"
23-
workflows = ">=3.0"
24-
25-
[tool.poetry.group.dev.dependencies]
26-
pytest = "^8.2.2"
27-
pytest-mock = "^3.14.0"
28-
pytest-cov = "^5.0.0"
29-
requests-mock = "^1.12.1"
30-
31-
[tool.poetry.group.docs]
32-
optional = true
33-
34-
[tool.poetry.group.docs.dependencies]
35-
sphinx = "^6"
36-
sphinx-rtd-theme = "^1.2"
21+
[dependency-groups]
22+
dev = [
23+
"pytest>=8.2.2",
24+
"pytest-mock>=3.14",
25+
"pytest-cov>=5",
26+
"requests-mock>=1.12",
27+
]
28+
docs = ["sphinx>=6,<7", "sphinx-rtd-theme~=1.2"]
3729

38-
[build-system]
39-
requires = ["poetry-core"]
40-
build-backend = "poetry.core.masonry.api"
4130

42-
[tool.poetry.urls]
31+
[project.urls]
4332
Bug-Tracker = "https://github.com/DiamondLightSource/python-zocalo/issues"
4433
Changelog = "https://github.com/DiamondLightSource/python-zocalo/blob/main/HISTORY.rst"
4534
Documentation = "https://github.com/DiamondLightSource/python-zocalo"
4635
Download = "https://github.com/DiamondLightSource/python-zocalo/releases"
4736
GitHub = "https://github.com/DiamondLightSource/python-zocalo"
4837

49-
[tool.poetry.scripts]
38+
[project.scripts]
5039
"zocalo.configure_rabbitmq" = "zocalo.cli.configure_rabbitmq:run"
5140
"zocalo.dlq_check" = "zocalo.cli.dlq_check:run"
5241
"zocalo.dlq_purge" = "zocalo.cli.dlq_purge:run"
@@ -58,11 +47,13 @@ GitHub = "https://github.com/DiamondLightSource/python-zocalo"
5847
"zocalo.shutdown" = "zocalo.cli.shutdown:run"
5948
"zocalo.wrap" = "zocalo.cli.wrap:run"
6049

61-
[tool.poetry.plugins]
62-
"libtbx.precommit" = { zocalo = "zocalo" }
63-
"zocalo.wrappers" = { dummy = "zocalo.wrapper:DummyWrapper" }
50+
[project.entry-points."libtbx.precommit"]
51+
zocalo = "zocalo"
6452

65-
[tool.poetry.plugins."libtbx.dispatcher.script"]
53+
[project.entry-points."zocalo.wrappers"]
54+
dummy = "zocalo.wrapper:DummyWrapper"
55+
56+
[project.entry-points."libtbx.dispatcher.script"]
6657
"zocalo.configure_rabbitmq" = "zocalo.configure_rabbitmq"
6758
"zocalo.dlq_check" = "zocalo.dlq_check"
6859
"zocalo.dlq_purge" = "zocalo.dlq_purge"
@@ -73,13 +64,13 @@ GitHub = "https://github.com/DiamondLightSource/python-zocalo"
7364
"zocalo.shutdown" = "zocalo.shutdown"
7465
"zocalo.wrap" = "zocalo.wrap"
7566

76-
[tool.poetry.plugins."workflows.services"]
67+
[project.entry-points."workflows.services"]
7768
Dispatcher = "zocalo.service.dispatcher:Dispatcher"
7869
JSONLines = "zocalo.service.jsonlines:JSONLines"
7970
Mailer = "zocalo.service.mailer:Mailer"
8071
Schlockmeister = "zocalo.service.schlockmeister:Schlockmeister"
8172

82-
[tool.poetry.plugins."zocalo.configuration.plugins"]
73+
[project.entry-points."zocalo.configuration.plugins"]
8374
graylog = "zocalo.configuration.plugin_graylog:Graylog"
8475
jmx = "zocalo.configuration.plugin_jmx:JMX"
8576
logging = "zocalo.configuration.plugin_logging:Logging"
@@ -89,6 +80,9 @@ iris = "zocalo.configuration.plugin_slurm:Slurm"
8980
smtp = "zocalo.configuration.plugin_smtp:SMTP"
9081
storage = "zocalo.configuration.plugin_storage:Storage"
9182

83+
[tool.uv]
84+
default-groups = ["dev", "docs"]
85+
9286
[tool.pytest.ini_options]
9387
required_plugins = "pytest-mock requests-mock"
9488
testpaths = ["tests"]

requirements_dev.txt

Lines changed: 106 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,106 @@
1-
annotated-types==0.7.0 ; python_version >= "3.10" and python_version < "4.0"
2-
bidict==0.23.1 ; python_version >= "3.10" and python_version < "4.0"
3-
certifi==2024.8.30 ; python_version >= "3.10" and python_version < "4.0"
4-
charset-normalizer==3.4.0 ; python_version >= "3.10" and python_version < "4.0"
5-
colorama==0.4.6 ; python_version >= "3.10" and python_version < "4.0" and sys_platform == "win32"
6-
coverage[toml]==7.6.4 ; python_version >= "3.10" and python_version < "4.0"
7-
docopt==0.6.2 ; python_version >= "3.10" and python_version < "4.0"
8-
exceptiongroup==1.2.2 ; python_version >= "3.10" and python_version < "3.11"
9-
graypy==2.1.0 ; python_version >= "3.10" and python_version < "4.0"
10-
idna==3.10 ; python_version >= "3.10" and python_version < "4.0"
11-
iniconfig==2.0.0 ; python_version >= "3.10" and python_version < "4.0"
12-
marshmallow==3.23.1 ; python_version >= "3.10" and python_version < "4.0"
13-
packaging==24.2 ; python_version >= "3.10" and python_version < "4.0"
14-
pika==1.3.2 ; python_version >= "3.10" and python_version < "4.0"
15-
pluggy==1.5.0 ; python_version >= "3.10" and python_version < "4.0"
16-
pydantic-core==2.23.4 ; python_version >= "3.10" and python_version < "4.0"
17-
pydantic==2.9.2 ; python_version >= "3.10" and python_version < "4.0"
18-
pytest-cov==5.0.0 ; python_version >= "3.10" and python_version < "4.0"
19-
pytest-mock==3.14.0 ; python_version >= "3.10" and python_version < "4.0"
20-
pytest==8.3.3 ; python_version >= "3.10" and python_version < "4.0"
21-
pyyaml==6.0.2 ; python_version >= "3.10" and python_version < "4.0"
22-
requests-mock==1.12.1 ; python_version >= "3.10" and python_version < "4.0"
23-
requests==2.32.3 ; python_version >= "3.10" and python_version < "4.0"
24-
setuptools==75.5.0 ; python_version >= "3.10" and python_version < "4.0"
25-
stomp-py==8.2.0 ; python_version >= "3.10" and python_version < "4.0"
26-
tomli==2.1.0 ; python_version >= "3.10" and python_full_version <= "3.11.0a6"
27-
typing-extensions==4.12.2 ; python_version >= "3.10" and python_version < "4.0"
28-
urllib3==2.2.3 ; python_version >= "3.10" and python_version < "4.0"
29-
websocket-client==1.8.0 ; python_version >= "3.10" and python_version < "4.0"
30-
workflows==3.1 ; python_version >= "3.10" and python_version < "4.0"
1+
# This file was autogenerated by uv via the following command:
2+
# uv export --all-groups -o requirements_dev.txt --no-hashes --no-emit-project
3+
alabaster==0.7.16
4+
# via sphinx
5+
annotated-types==0.7.0
6+
# via pydantic
7+
babel==2.16.0
8+
# via sphinx
9+
bidict==0.23.1
10+
# via workflows
11+
certifi==2024.8.30
12+
# via requests
13+
charset-normalizer==3.4.0
14+
# via requests
15+
colorama==0.4.6 ; sys_platform == 'win32'
16+
# via
17+
# pytest
18+
# sphinx
19+
coverage==7.6.4
20+
# via pytest-cov
21+
docopt==0.6.2
22+
# via stomp-py
23+
docutils==0.18.1
24+
# via
25+
# sphinx
26+
# sphinx-rtd-theme
27+
graypy==2.1.0
28+
# via zocalo
29+
idna==3.10
30+
# via requests
31+
imagesize==1.4.1
32+
# via sphinx
33+
iniconfig==2.0.0
34+
# via pytest
35+
jinja2==3.1.4
36+
# via sphinx
37+
markupsafe==3.0.2
38+
# via jinja2
39+
marshmallow==3.23.1
40+
# via zocalo
41+
packaging==24.2
42+
# via
43+
# marshmallow
44+
# pytest
45+
# sphinx
46+
pika==1.3.2
47+
# via workflows
48+
pluggy==1.5.0
49+
# via pytest
50+
pydantic==2.9.2
51+
# via zocalo
52+
pydantic-core==2.23.4
53+
# via pydantic
54+
pygments==2.18.0
55+
# via sphinx
56+
pytest==8.3.3
57+
# via
58+
# pytest-cov
59+
# pytest-mock
60+
pytest-cov==5.0.0
61+
pytest-mock==3.14.0
62+
pyyaml==6.0.2
63+
# via zocalo
64+
requests==2.32.3
65+
# via
66+
# requests-mock
67+
# sphinx
68+
# zocalo
69+
requests-mock==1.12.1
70+
setuptools==75.5.0
71+
# via workflows
72+
snowballstemmer==2.2.0
73+
# via sphinx
74+
sphinx==6.2.1
75+
# via
76+
# sphinx-rtd-theme
77+
# sphinxcontrib-jquery
78+
sphinx-rtd-theme==1.3.0
79+
sphinxcontrib-applehelp==2.0.0
80+
# via sphinx
81+
sphinxcontrib-devhelp==2.0.0
82+
# via sphinx
83+
sphinxcontrib-htmlhelp==2.1.0
84+
# via sphinx
85+
sphinxcontrib-jquery==4.1
86+
# via sphinx-rtd-theme
87+
sphinxcontrib-jsmath==1.0.1
88+
# via sphinx
89+
sphinxcontrib-qthelp==2.0.0
90+
# via sphinx
91+
sphinxcontrib-serializinghtml==2.0.0
92+
# via sphinx
93+
stomp-py==8.2.0
94+
# via workflows
95+
tomli==2.1.0 ; python_full_version <= '3.11'
96+
# via coverage
97+
typing-extensions==4.12.2
98+
# via
99+
# pydantic
100+
# pydantic-core
101+
urllib3==2.2.3
102+
# via requests
103+
websocket-client==1.8.0
104+
# via stomp-py
105+
workflows==3.1
106+
# via zocalo

0 commit comments

Comments
 (0)