Skip to content

Commit 7b4b423

Browse files
committed
Merge branch 'main' into contrib_config
2 parents 6faf68c + 82912eb commit 7b4b423

17 files changed

+4733
-699
lines changed

.bumpversion.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.30.2
2+
current_version = 0.32.0
33
commit = True
44
tag = True
55

.github/workflows/build_and_test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Install dependencies
1616
run: |
1717
python -m pip install --upgrade pip
18-
pip install pytest build
18+
pip install build
1919
- name: Build distribution
2020
run: |
2121
python -m build
@@ -29,7 +29,7 @@ jobs:
2929
runs-on: ubuntu-latest
3030
strategy:
3131
matrix:
32-
python-version: ["3.8", "3.9", "3.10", "3.11"]
32+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
3333

3434
steps:
3535
- uses: actions/checkout@v3

.pre-commit-config.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,11 @@ repos:
3434
- types-requests
3535
- types-pkg_resources
3636
- types-pyyaml
37+
38+
- repo: https://github.com/python-poetry/poetry
39+
rev: 1.8.0
40+
additional_dependencies: ["poetry-plugin-export"]
41+
hooks:
42+
- id: poetry-lock
43+
- id: poetry-export
44+
args: [-o, requirements_dev.txt, --with=dev, --without-hashes]

HISTORY.rst

+6-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ History
55
Unreleased
66
----------
77
* Add example rabbitmq configuration and user files to ``contrib/`` (`#245 <https://github.com/DiamondLightSource/python-zocalo/pull/245>`_)
8-
* ``zocalo.configure_rabbitmq``: Show explicit error when VHost not created. (`#241 <https://github.com/DiamondLightSource/python-zocalo/pull/241>`_)
8+
* Switch python packaging backend to poetry.
9+
10+
0.32.0 (2024-04-05)
11+
-------------------
12+
* Upgrade to Slurm REST API v0.0.40. (`#248 <https://github.com/DiamondLightSource/python-zocalo/pull/248>`_)
13+
* ``zocalo.configure_rabbitmq``: Show explicit error when VHost not created. (`#241 <https://github.com/DiamondLightSource/python-zocalo/pull/241>`_).
914

1015
0.30.2 (2023-09-06)
1116
-------------------

docs/conf.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@
5151

5252
# General information about the project.
5353
project = "Zocalo"
54-
copyright = "2020, Diamond Light Source"
54+
copyright = "2024, Diamond Light Source"
5555
author = "Scientific Software"
5656

5757
# The version info for the project you're documenting, acts as replacement
5858
# for |version| and |release|, also used in various other places throughout
5959
# the built documents.
6060
#
6161
# The short X.Y version.
62-
version = "0.30.2"
62+
version = "0.32.0"
6363
# The full version, including alpha/beta/rc tags.
6464
release = version
6565

poetry.lock

+1,088
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+51-51
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,68 @@
1-
[build-system]
2-
requires = ["setuptools>=68.0"]
3-
build-backend = "setuptools.build_meta"
4-
5-
[project]
1+
[tool.poetry]
62
name = "zocalo"
7-
version = "0.30.2"
3+
version = "0.32.0"
84
description = "Infrastructure components for automated data processing at Diamond Light Source"
5+
authors = ["Nicholas Devenish <[email protected]>"]
96
readme = "README.rst"
10-
requires-python = ">=3.8"
11-
license = { file = "LICENSE" }
12-
authors = [
13-
{ name = "Diamond Light Source - Data Analysis Group", email = "[email protected]" },
14-
]
157
classifiers = [
16-
"Development Status :: 4 - Beta",
8+
"Development Status :: 5 - Production/Stable",
179
"Intended Audience :: Developers",
1810
"License :: OSI Approved :: BSD License",
1911
"Programming Language :: Python :: 3",
20-
"Programming Language :: Python :: 3.8",
21-
"Programming Language :: Python :: 3.9",
22-
"Programming Language :: Python :: 3.10",
23-
"Programming Language :: Python :: 3.11",
2412
"Operating System :: OS Independent",
2513
"Topic :: Software Development :: Libraries :: Python Modules",
2614
]
27-
dependencies = [
28-
"PyYAML",
29-
"graypy>=1.0",
30-
"marshmallow",
31-
"requests",
32-
"pydantic<2",
33-
"setuptools",
34-
"workflows>=2.14",
35-
]
3615

37-
[project.urls]
16+
[tool.poetry.dependencies]
17+
python = "^3.8"
18+
pyyaml = "^6.0"
19+
graypy = "^2.0"
20+
marshmallow = "^3.19"
21+
requests = "^2.31"
22+
pydantic = "^2"
23+
workflows = "^2.27"
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"
37+
38+
[build-system]
39+
requires = ["poetry-core"]
40+
build-backend = "poetry.core.masonry.api"
41+
42+
[tool.poetry.urls]
3843
Bug-Tracker = "https://github.com/DiamondLightSource/python-zocalo/issues"
3944
Changelog = "https://github.com/DiamondLightSource/python-zocalo/blob/main/HISTORY.rst"
4045
Documentation = "https://github.com/DiamondLightSource/python-zocalo"
4146
Download = "https://github.com/DiamondLightSource/python-zocalo/releases"
4247
GitHub = "https://github.com/DiamondLightSource/python-zocalo"
4348

44-
[project.entry-points]
49+
[tool.poetry.scripts]
50+
"zocalo.configure_rabbitmq" = "zocalo.cli.configure_rabbitmq:run"
51+
"zocalo.dlq_check" = "zocalo.cli.dlq_check:run"
52+
"zocalo.dlq_purge" = "zocalo.cli.dlq_purge:run"
53+
"zocalo.dlq_reinject" = "zocalo.cli.dlq_reinject:run"
54+
"zocalo.go" = "zocalo.cli.go:run"
55+
"zocalo.pickup" = "zocalo.cli.pickup:run"
56+
"zocalo.queue_drain" = "zocalo.cli.queue_drain:run"
57+
"zocalo.service" = "zocalo.service:start_service"
58+
"zocalo.shutdown" = "zocalo.cli.shutdown:run"
59+
"zocalo.wrap" = "zocalo.cli.wrap:run"
60+
61+
[tool.poetry.plugins]
4562
"libtbx.precommit" = { zocalo = "zocalo" }
4663
"zocalo.wrappers" = { dummy = "zocalo.wrapper:DummyWrapper" }
4764

48-
[project.entry-points."libtbx.dispatcher.script"]
65+
[tool.poetry.plugins."libtbx.dispatcher.script"]
4966
"zocalo.configure_rabbitmq" = "zocalo.configure_rabbitmq"
5067
"zocalo.dlq_check" = "zocalo.dlq_check"
5168
"zocalo.dlq_purge" = "zocalo.dlq_purge"
@@ -56,46 +73,33 @@ GitHub = "https://github.com/DiamondLightSource/python-zocalo"
5673
"zocalo.shutdown" = "zocalo.shutdown"
5774
"zocalo.wrap" = "zocalo.wrap"
5875

59-
[project.entry-points."workflows.services"]
76+
[tool.poetry.plugins."workflows.services"]
6077
Dispatcher = "zocalo.service.dispatcher:Dispatcher"
6178
JSONLines = "zocalo.service.jsonlines:JSONLines"
6279
Mailer = "zocalo.service.mailer:Mailer"
6380
Schlockmeister = "zocalo.service.schlockmeister:Schlockmeister"
6481

65-
[project.entry-points."zocalo.configuration.plugins"]
82+
[tool.poetry.plugins."zocalo.configuration.plugins"]
6683
graylog = "zocalo.configuration.plugin_graylog:Graylog"
6784
jmx = "zocalo.configuration.plugin_jmx:JMX"
6885
logging = "zocalo.configuration.plugin_logging:Logging"
6986
rabbitmqapi = "zocalo.configuration.plugin_rabbitmqapi:RabbitAPI"
7087
slurm = "zocalo.configuration.plugin_slurm:Slurm"
88+
iris = "zocalo.configuration.plugin_slurm:Slurm"
7189
smtp = "zocalo.configuration.plugin_smtp:SMTP"
7290
storage = "zocalo.configuration.plugin_storage:Storage"
7391

74-
[project.scripts]
75-
"zocalo.configure_rabbitmq" = "zocalo.cli.configure_rabbitmq:run"
76-
"zocalo.dlq_check" = "zocalo.cli.dlq_check:run"
77-
"zocalo.dlq_purge" = "zocalo.cli.dlq_purge:run"
78-
"zocalo.dlq_reinject" = "zocalo.cli.dlq_reinject:run"
79-
"zocalo.go" = "zocalo.cli.go:run"
80-
"zocalo.pickup" = "zocalo.cli.pickup:run"
81-
"zocalo.queue_drain" = "zocalo.cli.queue_drain:run"
82-
"zocalo.service" = "zocalo.service:start_service"
83-
"zocalo.shutdown" = "zocalo.cli.shutdown:run"
84-
"zocalo.wrap" = "zocalo.cli.wrap:run"
85-
8692
[tool.isort]
8793
profile = "black"
8894

8995
[tool.pytest.ini_options]
9096
required_plugins = "pytest-mock requests-mock"
91-
testpaths = [
92-
"tests",
93-
]
97+
testpaths = ["tests"]
9498

9599
[tool.ruff]
96100
line-length = 88
97101
ignore = ["E501", "E741"]
98-
select = ["C4", "E", "F", "W", "I"]
102+
select = ["C4", "E", "F", "W", "I"]
99103
unfixable = ["F841"]
100104

101105
[tool.ruff.isort]
@@ -104,10 +108,6 @@ required-imports = ["from __future__ import annotations"]
104108
[tool.mypy]
105109
mypy_path = "src"
106110

107-
108111
[[tool.mypy.overrides]]
109-
module = [
110-
"graypy",
111-
"graypy.handler",
112-
]
112+
module = ["graypy", "graypy.handler"]
113113
ignore_missing_imports = true

requirements_dev.txt

+30-10
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,30 @@
1-
PyYAML==6.0
2-
graypy==2.1.0
3-
marshmallow==3.19.0
4-
pydantic==1.10.12
5-
pytest-cov==4.1.0
6-
pytest-mock==3.11.1
7-
pytest==7.4.0
8-
requests==2.31.0
9-
requests_mock==1.11.0
10-
workflows==2.26
1+
annotated-types==0.7.0 ; python_version >= "3.8" and python_version < "4.0"
2+
bidict==0.23.1 ; python_version >= "3.8" and python_version < "4.0"
3+
certifi==2024.7.4 ; python_version >= "3.8" and python_version < "4.0"
4+
charset-normalizer==3.3.2 ; python_version >= "3.8" and python_version < "4.0"
5+
colorama==0.4.6 ; python_version >= "3.8" and python_version < "4.0" and sys_platform == "win32"
6+
coverage[toml]==7.6.0 ; python_version >= "3.8" and python_version < "4.0"
7+
docopt==0.6.2 ; python_version >= "3.8" and python_version < "4.0"
8+
exceptiongroup==1.2.2 ; python_version >= "3.8" and python_version < "3.11"
9+
graypy==2.1.0 ; python_version >= "3.8" and python_version < "4.0"
10+
idna==3.7 ; python_version >= "3.8" and python_version < "4.0"
11+
iniconfig==2.0.0 ; python_version >= "3.8" and python_version < "4.0"
12+
marshmallow==3.21.3 ; python_version >= "3.8" and python_version < "4.0"
13+
packaging==24.1 ; python_version >= "3.8" and python_version < "4.0"
14+
pika==1.3.2 ; python_version >= "3.8" and python_version < "4.0"
15+
pluggy==1.5.0 ; python_version >= "3.8" and python_version < "4.0"
16+
pydantic-core==2.20.1 ; python_version >= "3.8" and python_version < "4.0"
17+
pydantic==2.8.2 ; python_version >= "3.8" and python_version < "4.0"
18+
pytest-cov==5.0.0 ; python_version >= "3.8" and python_version < "4.0"
19+
pytest-mock==3.14.0 ; python_version >= "3.8" and python_version < "4.0"
20+
pytest==8.2.2 ; python_version >= "3.8" and python_version < "4.0"
21+
pyyaml==6.0.1 ; python_version >= "3.8" and python_version < "4.0"
22+
requests-mock==1.12.1 ; python_version >= "3.8" and python_version < "4.0"
23+
requests==2.32.3 ; python_version >= "3.8" and python_version < "4.0"
24+
setuptools==71.0.3 ; python_version >= "3.8" and python_version < "4.0"
25+
stomp-py==8.1.2 ; python_version >= "3.8" and python_version < "4.0"
26+
tomli==2.0.1 ; python_version >= "3.8" and python_full_version <= "3.11.0a6"
27+
typing-extensions==4.12.2 ; python_version >= "3.8" and python_version < "4.0"
28+
urllib3==2.2.2 ; python_version >= "3.8" and python_version < "4.0"
29+
websocket-client==1.8.0 ; python_version >= "3.8" and python_version < "4.0"
30+
workflows==2.27 ; python_version >= "3.8" and python_version < "4.0"

requirements_doc.txt

-2
This file was deleted.

src/zocalo/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
__author__ = "Diamond Light Source - Data Analysis Group"
88
__email__ = "[email protected]"
9-
__version__ = "0.30.2"
9+
__version__ = "0.32.0"
1010

1111
logging.getLogger("zocalo").addHandler(logging.NullHandler())
1212

src/zocalo/cli/configure_rabbitmq.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def _(self, permissions: PermissionSpec):
7878
@functools.singledispatch
7979
def _info_to_spec(incoming, infos: list):
8080
cls = type(incoming)
81-
return [cls(**i.dict()) for i in infos]
81+
return [cls(**i.model_dump()) for i in infos]
8282

8383

8484
@functools.singledispatch

0 commit comments

Comments
 (0)