Skip to content

Commit 41202a2

Browse files
committed
Merge branch 'feat/bootstrap-main-codebase' into main
2 parents ac8286c + 1893a6a commit 41202a2

38 files changed

Lines changed: 2983 additions & 6 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 -e ".[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 -e ".[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

.gitignore

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
env/
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
27+
# PyInstaller
28+
# Usually these files are written by a python script from a template
29+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
30+
*.manifest
31+
*.spec
32+
33+
# Installer logs
34+
pip-log.txt
35+
pip-delete-this-directory.txt
36+
37+
# Unit test / coverage reports
38+
htmlcov/
39+
.tox/
40+
.coverage
41+
.coverage.*
42+
.cache
43+
nosetests.xml
44+
coverage.xml
45+
*,cover
46+
.hypothesis/
47+
48+
# Translations
49+
*.mo
50+
*.pot
51+
52+
# Django stuff:
53+
*.log
54+
local_settings.py
55+
56+
# Flask stuff:
57+
instance/
58+
.webassets-cache
59+
60+
# Scrapy stuff:
61+
.scrapy
62+
63+
# Sphinx documentation
64+
docs/_build/
65+
66+
# PyBuilder
67+
target/
68+
69+
# IPython Notebook
70+
.ipynb_checkpoints
71+
72+
# pyenv
73+
.python-version
74+
75+
# celery beat schedule file
76+
celerybeat-schedule
77+
78+
# dotenv
79+
.env
80+
81+
# virtualenv
82+
venv/
83+
ENV/
84+
85+
# Spyder project settings
86+
.spyderproject
87+
88+
# Rope project settings
89+
.ropeproject

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Changelog
2+
3+
## [1.0.0] - 2026-04-05
4+
5+
### Fixed
6+
- CRLF encoding coverage and regressions aligned with upstream issue #5.
7+
- Error-correction capacity sizing bug fixed for worst-case stuffing payloads (upstream issue #7).
8+
9+
### Added
10+
- Package split into `aztec_py` with modern `pyproject.toml` packaging.
11+
- SVG output support based on upstream PR #6 by Zazzik1.
12+
- CLI entry point (`aztec`) and `python -m aztec_py` runner.
13+
- PDF output (`AztecCode.pdf()` and extension-aware `save()` behavior).
14+
- `AztecRune` support for 0..255 values.
15+
- Optional decode helper (`aztec_py.decode`) backed by `python-zxing`.
16+
- Property-based tests with Hypothesis.
17+
- Input validation for public API boundaries.
18+
19+
### Changed
20+
- Project metadata updated for fork lineage visibility.
21+
- Added explicit attribution artifacts: `LICENSE.upstream` and `CONTRIBUTORS.md`.

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.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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
include README.md
2+
include requirements.txt
3+
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)