Skip to content

Commit eb9d2c0

Browse files
greyllmmoderclaude
andcommitted
feat: aztec-py v1.1.0 — full package restructure and feature set
Package restructure (single file → aztec_py/ package): - aztec_py/core.py — encoding logic, type-annotated - aztec_py/renderers/ — image (Pillow), SVG (built-in + lxml) - aztec_py/error_correction.py, matrix.py - aztec_py/rune.py — AztecRune (ISO 24778 Annex A, 0-255) - aztec_py/batch.py — encode_batch() with multiprocessing workers - aztec_py/presets.py — boarding_pass, transit_ticket, event_entry, gs1_label - aztec_py/gs1.py — GS1Element, build_gs1_payload, GROUP_SEPARATOR - aztec_py/decode.py — optional round-trip decode via python-zxing - aztec_py/__main__.py — CLI: single, bulk (--input), benchmark (--benchmark) - aztec_py/compat.py — production compatibility fixture loader Tests (pytest, hypothesis, 90%+ coverage): - test_core, test_batch, test_presets, test_gs1, test_rune, test_renderers - test_cli, test_cli_bulk_and_benchmark, test_validation, test_property - test_compat_matrix, test_api_behaviour, test_decode, test_modules - tests/compat/fixtures.json — real-world payload compatibility cases CI: - Replaced test_and_release.yml with ci.yml (Python 3.9–3.13 matrix) Bug fixes (from upstream): - CRLF encoding crash (upstream issue #5) - Error correction capacity off by 3 codewords (upstream issue #7) - SVG support merged from upstream PR #6 (Zazzik1) Meta: - pyproject.toml replaces setup.py - LICENSE + LICENSE.upstream (MIT chain preserved) - CONTRIBUTORS.md, CONTRIBUTING.md, SECURITY.md, PRODUCTION_CHECKLIST.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 7e2a8bf commit eb9d2c0

37 files changed

Lines changed: 2990 additions & 974 deletions

.github/workflows/ci.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
python -m pip install ".[dev,image,pdf]"
27+
28+
- name: Run tests
29+
run: |
30+
pytest -q
31+
32+
quality:
33+
runs-on: ubuntu-latest
34+
needs: test
35+
steps:
36+
- uses: actions/checkout@v4
37+
38+
- name: Set up Python
39+
uses: actions/setup-python@v5
40+
with:
41+
python-version: "3.11"
42+
43+
- name: Install dependencies
44+
run: |
45+
python -m pip install --upgrade pip
46+
python -m pip install ".[dev,image,pdf]"
47+
48+
- name: Lint
49+
run: |
50+
ruff check .
51+
52+
- name: Type check
53+
run: |
54+
mypy --strict aztec_py
55+
56+
build:
57+
runs-on: ubuntu-latest
58+
needs: quality
59+
steps:
60+
- uses: actions/checkout@v4
61+
62+
- name: Set up Python
63+
uses: actions/setup-python@v5
64+
with:
65+
python-version: "3.11"
66+
67+
- name: Build package
68+
run: |
69+
python -m pip install build
70+
python -m build

.github/workflows/test_and_release.yml

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

CONTRIBUTORS.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Contributors & Lineage
2+
3+
## Authors
4+
- Originally written by Dmitry Alimov (delimitry).
5+
- Updates, bug fixes, and active maintenance in this fork by greyllmmoder.
6+
7+
## Current maintainer
8+
- greyllmmoder - https://github.com/greyllmmoder
9+
10+
## Upstream lineage (MIT license chain)
11+
This project is a fork of **dlenski/aztec_code_generator**
12+
(https://github.com/dlenski/aztec_code_generator), which is itself
13+
a fork of **delimitry/aztec_code_generator**
14+
(https://github.com/delimitry/aztec_code_generator).
15+
16+
Both upstream projects are MIT licensed. The original upstream license
17+
text is preserved in `LICENSE.upstream`.
18+
19+
## What changed from upstream
20+
- Fixed: CRLF encoding crash (upstream issue #5)
21+
- Fixed: Error correction capacity calculation (upstream issue #7)
22+
- Added: SVG renderer (based on upstream PR #6)
23+
- Added: Type hints, docstrings, CLI, PDF output, Rune mode
24+
- Restructured: Single-file module split into package
25+
26+
## Third-party contributions incorporated
27+
- SVG support: originally authored by Zazzik1
28+
(https://github.com/dlenski/aztec_code_generator/pull/6), MIT license

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2016 Dmitry Alimov
3+
Copyright (c) 2026 greyllmmoder
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

LICENSE.upstream

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2016 Dmitry Alimov
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

MANIFEST.in

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
include description.rst
1+
include README.md
22
include requirements.txt
33
include LICENSE
4+
include LICENSE.upstream
5+
include CONTRIBUTORS.md

PRODUCTION_CHECKLIST.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Production Checklist
2+
3+
Use this checklist before shipping a new `aztec-py` version to production.
4+
5+
## 1. Pre-Release Validation
6+
7+
- [ ] `python -m pytest -q`
8+
- [ ] `python -m ruff check .`
9+
- [ ] `python -m mypy --strict aztec_py`
10+
- [ ] `python -m build`
11+
- [ ] `python scripts/decoder_matrix.py --report compat_matrix_report.md`
12+
- [ ] If decode runtime is available in CI: `python scripts/decoder_matrix.py --strict-decode`
13+
14+
## 2. Runtime Optional Dependencies
15+
16+
- [ ] Verify `aztec-py[pdf]` installs and `AztecCode(...).pdf()` works.
17+
- [ ] Verify `aztec-py[decode]` behavior:
18+
- [ ] successful decode path when Java + ZXing are available
19+
- [ ] clear error path when runtime/dependency is missing
20+
21+
## 3. GS1 Integration Readiness
22+
23+
- [ ] Build GS1 payloads using `GS1Element` + `build_gs1_payload`.
24+
- [ ] Ensure variable-length elements are marked with `variable_length=True`.
25+
- [ ] Confirm payloads with scanner app/hardware in target environment.
26+
27+
## 4. Release Hygiene
28+
29+
- [ ] Update `CHANGELOG.md`.
30+
- [ ] Confirm `README.md` examples still execute.
31+
- [ ] Verify version metadata in `pyproject.toml`.
32+
- [ ] Build artifacts from clean working tree.
33+
34+
## 5. Post-Release Smoke Checks
35+
36+
- [ ] Install built wheel in fresh venv.
37+
- [ ] `python -c "import aztec_py; print(aztec_py.__all__)"`
38+
- [ ] `aztec "Hello" --format terminal`
39+
- [ ] `aztec "Hello" --format svg > smoke.svg`
40+
- [ ] `aztec "Hello" --format png --output smoke.png`
41+
42+
## 6. Incident Guardrails
43+
44+
- [ ] Keep compatibility fixture failures as release blockers.
45+
- [ ] Log scanner model/runtime for each production decode issue.
46+
- [ ] Add a regression fixture for every production bug before patching.

0 commit comments

Comments
 (0)