Skip to content

Commit d7dfbf0

Browse files
authored
v0.3.4 (#19)
1 parent ff67f37 commit d7dfbf0

File tree

9 files changed

+109
-102
lines changed

9 files changed

+109
-102
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
run: pip install pre-commit
2222

2323
- name: Run pre-commit hooks
24-
run: pre-commit run --all-files --hook-stage push
24+
run: pre-commit run --all-files
2525

2626

2727
tests:

.pre-commit-config.yaml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44
repos:
55
- repo: https://github.com/astral-sh/ruff-pre-commit
6-
rev: v0.11.2
6+
rev: v0.11.11
77
hooks:
88
# Run the Ruff formatter.
99
- id: ruff-format
1010
# Run the Ruff linter.
11-
- id: ruff
11+
- id: ruff-check
1212
args: [--fix, --exit-non-zero-on-fix]
1313

1414
- repo: https://github.com/adamchainz/blacken-docs
@@ -20,19 +20,19 @@ repos:
2020
files: '(?:README\.md|\.ambient-package-update\/templates\/snippets\/.*\.tpl|docs\/.*\.(?:md|rst))'
2121

2222
- repo: https://github.com/asottile/pyupgrade
23-
rev: v3.19.1
23+
rev: v3.20.0
2424
hooks:
2525
- id: pyupgrade
2626
args: [ --py310-plus ]
2727

2828
- repo: https://github.com/adamchainz/django-upgrade
29-
rev: 1.24.0
29+
rev: 1.25.0
3030
hooks:
3131
- id: django-upgrade
3232
args: [--target-version, "4.2"]
3333

3434
- repo: https://github.com/adamchainz/djade-pre-commit
35-
rev: 1.3.2
35+
rev: 1.4.0
3636
hooks:
3737
- id: djade
3838
args: [--target-version, "4.2"]
@@ -45,10 +45,15 @@ repos:
4545
- repo: https://github.com/pre-commit/pre-commit-hooks
4646
rev: v5.0.0
4747
hooks:
48-
- id: no-commit-to-branch
49-
args:
50-
[
51-
"--pattern",
52-
'^^(?!(?:feature|hotfix|bugfix|refactor|maintenance)/[\w\d\-_#]+).*$',
53-
]
54-
stages: [ pre-commit ]
48+
- id: check-ast
49+
- id: check-builtin-literals
50+
- id: check-case-conflict
51+
- id: check-docstring-first
52+
- id: check-executables-have-shebangs
53+
- id: check-json
54+
- id: check-merge-conflict
55+
- id: check-toml
56+
- id: end-of-file-fixer
57+
- id: fix-byte-order-marker
58+
- id: mixed-line-ending
59+
- id: trailing-whitespace

CHANGES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
**0.3.4** (2025-05-29)
4+
* Maintenance updates via ambient-package-update
5+
36
**0.3.3** (2025-04-03)
47
* Clarified package tagline
58

CONTRIBUTING.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Contribute
2+
3+
## Setup package for development
4+
5+
- Create a Python virtualenv and activate it
6+
- Install "pip-tools" with `pip install -U pip-tools`
7+
- Compile the requirements with `pip-compile --extra dev, -o requirements.txt pyproject.toml --resolver=backtracking`
8+
- Sync the dependencies with your virtualenv with `pip-sync`
9+
10+
## Add functionality
11+
12+
- Create a new branch for your feature
13+
- Change the dependency in your requirements.txt to a local (editable) one that points to your local file system:
14+
`-e /Users/workspace/django-queuebie` or via pip `pip install -e /Users/workspace/django-queuebie`
15+
- Ensure the code passes the tests
16+
- Create a pull request
17+
18+
## Run tests
19+
20+
- Run tests
21+
````
22+
pytest --ds settings tests
23+
````
24+
25+
- Check coverage
26+
````
27+
coverage run -m pytest --ds settings tests
28+
coverage report -m
29+
````
30+
31+
## Git hooks (via pre-commit)
32+
33+
We use pre-push hooks to ensure that only linted code reaches our remote repository and pipelines aren't triggered in
34+
vain.
35+
36+
To enable the configured pre-push hooks, you need to [install](https://pre-commit.com/) pre-commit and run once:
37+
38+
pre-commit install -t pre-push -t pre-commit --install-hooks
39+
40+
This will permanently install the git hooks for both, frontend and backend, in your local
41+
[`.git/hooks`](./.git/hooks) folder.
42+
The hooks are configured in the [`.pre-commit-config.yaml`](templates/.pre-commit-config.yaml.tpl).
43+
44+
You can check whether hooks work as intended using the [run](https://pre-commit.com/#pre-commit-run) command:
45+
46+
pre-commit run [hook-id] [options]
47+
48+
Example: run single hook
49+
50+
pre-commit run ruff --all-files
51+
52+
Example: run all hooks of pre-push stage
53+
54+
pre-commit run --all-files
55+
56+
## Update documentation
57+
58+
- To build the documentation, run: `sphinx-build docs/ docs/_build/html/`.
59+
- Open `docs/_build/html/index.html` to see the documentation.
60+
61+
62+
### Translation files
63+
64+
If you have added custom text, make sure to wrap it in `_()` where `_` is
65+
gettext_lazy (`from django.utils.translation import gettext_lazy as _`).
66+
67+
How to create translation file:
68+
69+
* Navigate to `django-queuebie`
70+
* `python manage.py makemessages -l de`
71+
* Have a look at the new/changed files within `queuebie/locale`
72+
73+
How to compile translation files:
74+
75+
* Navigate to `django-queuebie`
76+
* `python manage.py compilemessages`
77+
* Have a look at the new/changed files within `queuebie/locale`

README.md

Lines changed: 0 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -88,85 +88,6 @@ handle_message(
8888

8989

9090

91-
## Contribute
92-
93-
### Setup package for development
94-
95-
- Create a Python virtualenv and activate it
96-
- Install "pip-tools" with `pip install -U pip-tools`
97-
- Compile the requirements with `pip-compile --extra dev, -o requirements.txt pyproject.toml --resolver=backtracking`
98-
- Sync the dependencies with your virtualenv with `pip-sync`
99-
100-
### Add functionality
101-
102-
- Create a new branch for your feature
103-
- Change the dependency in your requirements.txt to a local (editable) one that points to your local file system:
104-
`-e /Users/workspace/django-queuebie` or via pip `pip install -e /Users/workspace/django-queuebie`
105-
- Ensure the code passes the tests
106-
- Create a pull request
107-
108-
### Run tests
109-
110-
- Run tests
111-
````
112-
pytest --ds settings tests
113-
````
114-
115-
- Check coverage
116-
````
117-
coverage run -m pytest --ds settings tests
118-
coverage report -m
119-
````
120-
121-
### Git hooks (via pre-commit)
122-
123-
We use pre-push hooks to ensure that only linted code reaches our remote repository and pipelines aren't triggered in
124-
vain.
125-
126-
To enable the configured pre-push hooks, you need to [install](https://pre-commit.com/) pre-commit and run once:
127-
128-
pre-commit install -t pre-push -t pre-commit --install-hooks
129-
130-
This will permanently install the git hooks for both, frontend and backend, in your local
131-
[`.git/hooks`](./.git/hooks) folder.
132-
The hooks are configured in the [`.pre-commit-config.yaml`](templates/.pre-commit-config.yaml.tpl).
133-
134-
You can check whether hooks work as intended using the [run](https://pre-commit.com/#pre-commit-run) command:
135-
136-
pre-commit run [hook-id] [options]
137-
138-
Example: run single hook
139-
140-
pre-commit run ruff --all-files
141-
142-
Example: run all hooks of pre-push stage
143-
144-
pre-commit run --all-files --hook-stage push
145-
146-
### Update documentation
147-
148-
- To build the documentation, run: `sphinx-build docs/ docs/_build/html/`.
149-
- Open `docs/_build/html/index.html` to see the documentation.
150-
151-
152-
### Translation files
153-
154-
If you have added custom text, make sure to wrap it in `_()` where `_` is
155-
gettext_lazy (`from django.utils.translation import gettext_lazy as _`).
156-
157-
How to create translation file:
158-
159-
* Navigate to `django-queuebie`
160-
* `python manage.py makemessages -l de`
161-
* Have a look at the new/changed files within `queuebie/locale`
162-
163-
How to compile translation files:
164-
165-
* Navigate to `django-queuebie`
166-
* `python manage.py compilemessages`
167-
* Have a look at the new/changed files within `queuebie/locale`
168-
169-
17091
### Publish to ReadTheDocs.io
17192

17293
- Fetch the latest changes in GitHub mirror and push them
@@ -203,4 +124,3 @@ configuration and setup files. It works similar to well-known updaters like `pyu
203124
204125
To run an update, refer to the [documentation page](https://pypi.org/project/ambient-package-update/)
205126
of the "ambient-package-update".
206-

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The maintainers of this package take security bugs seriously. We appreciate your
44
disclose your findings, and will make every effort to acknowledge your contributions.
55

66
To report a security issue, please use the GitHub Security
7-
Advisory ["Report a Vulnerability"](https://github.com/ambient-innovation/django-queuebie/security/advisories/new)
7+
Advisory ["Report a Vulnerability"](https://github.com/ambient-innovation/django-queuebie/security/advisories/new)
88
tab.
99

1010
The maintainers will send a response indicating the next steps in handling your report. After the initial reply to

pyproject.toml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ dev = [
4242
'pytest-django~=4.9',
4343
'pytest-mock~=3.14',
4444
'coverage~=7.6',
45-
'pre-commit~=4.0',
46-
'ruff~=0.6',
45+
'pre-commit~=4.2',
46+
'ruff~=0.11',
4747
'sphinx~=7.1',
4848
'sphinx-rtd-theme~=2.0',
4949
'm2r2==0.3.3.post2',
5050
'mistune<2.0.0',
51-
'flit~=3.9',
52-
'keyring~=25.4',
51+
'flit~=3.12',
52+
'keyring~=25.6',
5353
'ambient-package-update',
5454
]
5555

@@ -90,7 +90,8 @@ lint.select = [
9090
"ANN401", # Checks that function arguments are annotated with a more specific type than Any
9191
"TRY", # Clean try/except
9292
"ERA", # Commented out code
93-
"INP" # Ban PEP-420 implicit namespace packages
93+
"INP", # Ban PEP-420 implicit namespace packages
94+
"C90", # McCabe code complexity
9495
]
9596
lint.ignore = [
9697
"TD002", # Missing author in TODO
@@ -124,7 +125,8 @@ lint.fixable = [
124125
"ANN401", # Checks that function arguments are annotated with a more specific type than Any
125126
"TRY", # Clean try/except
126127
"ERA", # Commented out code
127-
"INP" # Ban PEP-420 implicit namespace packages
128+
"INP", # Ban PEP-420 implicit namespace packages
129+
"C90", # McCabe code complexity
128130
]
129131
lint.unfixable = []
130132

queuebie/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""A simple and synchronous message queue for commands and events for Django"""
22

3-
__version__ = "0.3.3"
3+
__version__ = "0.3.4"
44

55
from queuebie.registry import MessageRegistry
66

queuebie/registry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def decorator(decoratee):
8686

8787
return decorator
8888

89-
def autodiscover(self) -> None:
89+
def autodiscover(self) -> None: # noqa: C901
9090
"""
9191
Detects message registries which have been registered via the "register_*" decorator.
9292
"""

0 commit comments

Comments
 (0)