piitag 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. piitag-0.1.0/.github/dependabot.yml +11 -0
  2. piitag-0.1.0/.github/workflows/ci.yml +160 -0
  3. piitag-0.1.0/.gitignore +221 -0
  4. piitag-0.1.0/AGENTS.md +52 -0
  5. piitag-0.1.0/CHANGELOG.md +9 -0
  6. piitag-0.1.0/LICENSE.md +21 -0
  7. piitag-0.1.0/NOTICE.md +10 -0
  8. piitag-0.1.0/PKG-INFO +152 -0
  9. piitag-0.1.0/README.md +108 -0
  10. piitag-0.1.0/TODO.md +11 -0
  11. piitag-0.1.0/docs/PLAN.md +759 -0
  12. piitag-0.1.0/pyproject.toml +57 -0
  13. piitag-0.1.0/scripts/fetch_test_assets.py +47 -0
  14. piitag-0.1.0/src/piitag/__init__.py +5 -0
  15. piitag-0.1.0/src/piitag/_assets.py +67 -0
  16. piitag-0.1.0/src/piitag/_deterministic.py +1009 -0
  17. piitag-0.1.0/src/piitag/_head.py +86 -0
  18. piitag-0.1.0/src/piitag/_labels.py +1 -0
  19. piitag-0.1.0/src/piitag/_pipeline.py +659 -0
  20. piitag-0.1.0/src/piitag/_tokenizer.py +142 -0
  21. piitag-0.1.0/src/piitag/_utf16.py +80 -0
  22. piitag-0.1.0/src/piitag/cli.py +85 -0
  23. piitag-0.1.0/src/piitag/model.py +363 -0
  24. piitag-0.1.0/src/piitag/py.typed +0 -0
  25. piitag-0.1.0/tests/conftest.py +1 -0
  26. piitag-0.1.0/tests/fixtures/.gitkeep +0 -0
  27. piitag-0.1.0/tests/fixtures/deterministic_corpus.json +1 -0
  28. piitag-0.1.0/tests/reference/.gitkeep +0 -0
  29. piitag-0.1.0/tests/test_cli.py +1 -0
  30. piitag-0.1.0/tests/test_deterministic.py +134 -0
  31. piitag-0.1.0/tests/test_head.py +71 -0
  32. piitag-0.1.0/tests/test_integration.py +1 -0
  33. piitag-0.1.0/tests/test_model.py +87 -0
  34. piitag-0.1.0/tests/test_package.py +29 -0
  35. piitag-0.1.0/tests/test_pipeline.py +135 -0
  36. piitag-0.1.0/tests/test_tokenizer.py +120 -0
  37. piitag-0.1.0/tests/test_utf16.py +60 -0
  38. piitag-0.1.0/uv.lock +2910 -0
@@ -0,0 +1,11 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "github-actions"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
7
+
8
+ - package-ecosystem: "pip"
9
+ directory: "/"
10
+ schedule:
11
+ interval: "weekly"
@@ -0,0 +1,160 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ schedule:
8
+ - cron: "17 3 * * 1"
9
+ workflow_dispatch:
10
+
11
+ permissions:
12
+ contents: read
13
+
14
+ env:
15
+ UV_VERSION: "0.9.17"
16
+ MODEL_REVISION: "v0.4.0"
17
+
18
+ jobs:
19
+ checks:
20
+ name: Python ${{ matrix.python-version }}
21
+ runs-on: ubuntu-latest
22
+ strategy:
23
+ fail-fast: false
24
+ matrix:
25
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
26
+
27
+ steps:
28
+ - name: Check out repository
29
+ uses: actions/checkout@v7
30
+
31
+ - name: Install uv
32
+ uses: astral-sh/setup-uv@v7
33
+ with:
34
+ version: ${{ env.UV_VERSION }}
35
+ enable-cache: true
36
+ cache-dependency-glob: uv.lock
37
+
38
+ - name: Set up Python
39
+ run: uv python install ${{ matrix.python-version }}
40
+
41
+ - name: Install dependencies
42
+ run: uv sync --python ${{ matrix.python-version }} --extra dev --extra litert
43
+
44
+ - name: Restore model assets
45
+ id: model-cache
46
+ uses: actions/cache@v6
47
+ with:
48
+ path: tests/fixtures/model
49
+ key: redact-model-${{ env.MODEL_REVISION }}
50
+
51
+ - name: Fetch model assets
52
+ if: steps.model-cache.outputs.cache-hit != 'true'
53
+ run: uv run python scripts/fetch_test_assets.py
54
+
55
+ - name: Run Ruff
56
+ run: |
57
+ uv run ruff check src/ tests/ scripts/
58
+ uv run ruff format --check src/ tests/ scripts/
59
+
60
+ - name: Run mypy
61
+ run: uv run mypy src/
62
+
63
+ - name: Run tests
64
+ run: uv run pytest -m "not slow"
65
+
66
+ - name: Build distribution
67
+ run: uv run python -m build
68
+
69
+ - name: Check distribution metadata
70
+ run: uv run twine check dist/*
71
+
72
+ scheduled-integration:
73
+ name: Scheduled model integration
74
+ if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
75
+ runs-on: ubuntu-latest
76
+ steps:
77
+ - name: Check out repository
78
+ uses: actions/checkout@v7
79
+
80
+ - name: Install uv
81
+ uses: astral-sh/setup-uv@v7
82
+ with:
83
+ version: ${{ env.UV_VERSION }}
84
+ enable-cache: true
85
+ cache-dependency-glob: uv.lock
86
+
87
+ - name: Set up Python
88
+ run: uv python install 3.14
89
+
90
+ - name: Install dependencies
91
+ run: uv sync --python 3.14 --extra dev --extra litert
92
+
93
+ - name: Restore model assets
94
+ id: model-cache
95
+ uses: actions/cache@v6
96
+ with:
97
+ path: tests/fixtures/model
98
+ key: redact-model-${{ env.MODEL_REVISION }}
99
+
100
+ - name: Fetch model assets
101
+ if: steps.model-cache.outputs.cache-hit != 'true'
102
+ run: uv run python scripts/fetch_test_assets.py
103
+
104
+ - name: Run model-backed tests
105
+ run: uv run pytest -m slow
106
+
107
+ release:
108
+ name: Semantic release
109
+ if: >-
110
+ github.event_name == 'workflow_dispatch' ||
111
+ (github.event_name == 'push' && github.ref == 'refs/heads/main')
112
+ needs: checks
113
+ runs-on: ubuntu-latest
114
+ concurrency:
115
+ group: ${{ github.workflow }}-release-${{ github.ref_name }}
116
+ cancel-in-progress: false
117
+ permissions:
118
+ contents: write
119
+ outputs:
120
+ released: ${{ steps.release.outputs.released }}
121
+
122
+ steps:
123
+ - name: Check out repository
124
+ uses: actions/checkout@v7
125
+ with:
126
+ fetch-depth: 0
127
+
128
+ - name: Run semantic-release
129
+ id: release
130
+ uses: python-semantic-release/python-semantic-release@v10.6.1
131
+ with:
132
+ github_token: ${{ secrets.GITHUB_TOKEN }}
133
+
134
+ - name: Upload distributions
135
+ if: steps.release.outputs.released == 'true'
136
+ uses: actions/upload-artifact@v6
137
+ with:
138
+ name: distributions
139
+ path: dist/
140
+ if-no-files-found: error
141
+
142
+ publish:
143
+ name: Publish to PyPI
144
+ if: needs.release.outputs.released == 'true'
145
+ needs: release
146
+ runs-on: ubuntu-latest
147
+ permissions:
148
+ id-token: write
149
+ environment:
150
+ name: pypi
151
+ url: https://pypi.org/p/piitag
152
+ steps:
153
+ - name: Download distributions
154
+ uses: actions/download-artifact@v7
155
+ with:
156
+ name: distributions
157
+ path: dist/
158
+
159
+ - name: Publish distributions
160
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,221 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py.cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ # Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # uv.lock is version controlled for reproducible dependency resolution.
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ # poetry.lock
109
+ # poetry.toml
110
+
111
+ # pdm
112
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
114
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
115
+ # pdm.lock
116
+ # pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # pixi
121
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
122
+ # pixi.lock
123
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
124
+ # in the .venv directory. It is recommended not to include this directory in version control.
125
+ .pixi
126
+
127
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
128
+ __pypackages__/
129
+
130
+ # Celery stuff
131
+ celerybeat-schedule
132
+ celerybeat.pid
133
+
134
+ # Redis
135
+ *.rdb
136
+ *.aof
137
+ *.pid
138
+
139
+ # RabbitMQ
140
+ mnesia/
141
+ rabbitmq/
142
+ rabbitmq-data/
143
+
144
+ # ActiveMQ
145
+ activemq-data/
146
+
147
+ # SageMath parsed files
148
+ *.sage.py
149
+
150
+ # Environments
151
+ .env
152
+ .envrc
153
+ .venv
154
+ env/
155
+ venv/
156
+ ENV/
157
+ env.bak/
158
+ venv.bak/
159
+
160
+ # Spyder project settings
161
+ .spyderproject
162
+ .spyproject
163
+
164
+ # Rope project settings
165
+ .ropeproject
166
+
167
+ # mkdocs documentation
168
+ /site
169
+
170
+ # mypy
171
+ .mypy_cache/
172
+ .dmypy.json
173
+ dmypy.json
174
+
175
+ # Pyre type checker
176
+ .pyre/
177
+
178
+ # pytype static type analyzer
179
+ .pytype/
180
+
181
+ # Cython debug symbols
182
+ cython_debug/
183
+
184
+ # PyCharm
185
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
186
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
187
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
188
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
189
+ # .idea/
190
+
191
+ # Abstra
192
+ # Abstra is an AI-powered process automation framework.
193
+ # Ignore directories containing user credentials, local state, and settings.
194
+ # Learn more at https://abstra.io/docs
195
+ .abstra/
196
+
197
+ # Visual Studio Code
198
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
199
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
200
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
201
+ # you could uncomment the following to ignore the entire vscode folder
202
+ # .vscode/
203
+ # Temporary file for partial code execution
204
+ tempCodeRunnerFile.py
205
+
206
+ # Ruff stuff:
207
+ .ruff_cache/
208
+
209
+ # Local model fixtures:
210
+ tests/fixtures/model/
211
+
212
+ # PyPI configuration file
213
+ .pypirc
214
+
215
+ # Marimo
216
+ marimo/_static/
217
+ marimo/_lsp/
218
+ __marimo__/
219
+
220
+ # Streamlit
221
+ .streamlit/secrets.toml
piitag-0.1.0/AGENTS.md ADDED
@@ -0,0 +1,52 @@
1
+ # AGENTS.md
2
+
3
+ ## Project overview
4
+
5
+ This repo contains `piitag`, a Python package that wraps the Desert Ant Labs
6
+ Redact on-device PII detection pipeline.
7
+
8
+ - Package layout uses a `src/` layout under `src/piitag`.
9
+ - Runtime dependencies are managed with `uv`.
10
+ - Python requirement is 3.10 or newer.
11
+ - Model assets are not bundled in the distribution and are downloaded from the
12
+ pinned Hugging Face revision at runtime or via the local test fixture
13
+ workflow.
14
+ - Releases are driven by Conventional Commits and `python-semantic-release`.
15
+
16
+ ## Working conventions
17
+
18
+ - Prefer `uv` commands over direct `python -m pip` usage.
19
+ - Keep changes reproducible; do not hand-edit the generated lockfile.
20
+ - Keep documentation in sync with behavior, especially `README.md`,
21
+ `CHANGELOG.md`, and `docs/PLAN.md`.
22
+ - Do not add model weights or downloaded fixtures to git-tracked source files.
23
+ - Keep CI in a single workflow file at `.github/workflows/ci.yml`.
24
+
25
+ ## Validation commands
26
+
27
+ ```sh
28
+ uv run pytest
29
+ uv run ruff check src/ tests/ scripts/
30
+ uv run ruff format --check src/ tests/ scripts/
31
+ uv run mypy src/
32
+ uv run python -m build
33
+ uv run twine check dist/*
34
+ ```
35
+
36
+ ## Commit and release expectations
37
+
38
+ Use Conventional Commits:
39
+
40
+ - `fix:` -> patch release
41
+ - `feat:` -> minor release
42
+ - `BREAKING CHANGE:` or `!` -> major release
43
+
44
+ ## Model fixtures and test assets
45
+
46
+ The expected local asset directory is `tests/fixtures/model/`. It is for
47
+ fetched test assets and should not be committed.
48
+
49
+ ## Notes for future agents
50
+
51
+ Keep the implementation aligned with `docs/PLAN.md`. Prefer minimal, surgical
52
+ edits over broad rewrites.
@@ -0,0 +1,9 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented here.
4
+
5
+ <!-- version list -->
6
+
7
+ ## v0.1.0 (2026-09-20)
8
+
9
+ - Initial Release
@@ -0,0 +1,21 @@
1
+ # MIT License
2
+
3
+ Copyright (c) 2026 Richard Hull
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.
piitag-0.1.0/NOTICE.md ADDED
@@ -0,0 +1,10 @@
1
+ # Third-party model assets
2
+
3
+ `piitag` does not include Desert Ant Labs model weights or taxonomy assets.
4
+ When downloaded at runtime, those assets come from the
5
+ `desert-ant-labs/redact` Hugging Face repository at revision `v0.4.0` and are
6
+ subject to the Desert Ant Labs Source-Available License.
7
+
8
+ That license is separate from the MIT license covering the `piitag` wrapper
9
+ code. Review the model license before using the assets in a commercial
10
+ deployment.
piitag-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,152 @@
1
+ Metadata-Version: 2.5
2
+ Name: piitag
3
+ Version: 0.1.0
4
+ Summary: Python port of Desert Ant Labs' Redact on-device PII detector
5
+ License: # MIT License
6
+
7
+ Copyright (c) 2026 Richard Hull
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ of this software and associated documentation files (the "Software"), to deal
11
+ in the Software without restriction, including without limitation the rights
12
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ copies of the Software, and to permit persons to whom the Software is
14
+ furnished to do so, subject to the following conditions:
15
+
16
+ The above copyright notice and this permission notice shall be included in all
17
+ copies or substantial portions of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ SOFTWARE.
26
+ License-File: LICENSE.md
27
+ License-File: NOTICE.md
28
+ Requires-Python: >=3.10
29
+ Requires-Dist: huggingface-hub>=0.20
30
+ Requires-Dist: numpy>=1.24
31
+ Requires-Dist: regex>=2024.1
32
+ Provides-Extra: dev
33
+ Requires-Dist: build; extra == 'dev'
34
+ Requires-Dist: mypy; extra == 'dev'
35
+ Requires-Dist: pytest; extra == 'dev'
36
+ Requires-Dist: pytest-cov; extra == 'dev'
37
+ Requires-Dist: ruff; extra == 'dev'
38
+ Requires-Dist: twine; extra == 'dev'
39
+ Provides-Extra: litert
40
+ Requires-Dist: ai-edge-litert; extra == 'litert'
41
+ Provides-Extra: tensorflow
42
+ Requires-Dist: tensorflow; extra == 'tensorflow'
43
+ Description-Content-Type: text/markdown
44
+
45
+ # piitag
46
+
47
+ Python port of Desert Ant Labs' Redact on-device PII detector.
48
+
49
+ The package is under active development. The implementation is being built in
50
+ stages described in [the implementation plan](docs/PLAN.md).
51
+
52
+ ## Quick start
53
+
54
+ Install the package and one of the supported TFLite runtimes:
55
+
56
+ ```sh
57
+ uv add piitag ai-edge-litert
58
+ ```
59
+
60
+ The first detection downloads the pinned model assets into the Hugging Face
61
+ cache. You can also provide a directory containing the three model files:
62
+
63
+ ```python
64
+ from piitag import Label, Options, Redact
65
+
66
+ redactor = Redact()
67
+ result = redactor.redaction("Email anna@example.com")
68
+ print(result.redacted_text)
69
+ print(result.restore(result.redacted_text))
70
+
71
+ only_email = redactor.redaction(
72
+ "Email anna@example.com",
73
+ Options(labels=frozenset({Label.EMAIL})),
74
+ )
75
+ ```
76
+
77
+ The command-line interface accepts the same model cache by default:
78
+
79
+ ```sh
80
+ uv run piitag "Email anna@example.com"
81
+ uv run piitag "Call +44 20 7946 0958" --labels PHONE --json
82
+ ```
83
+
84
+ Use `--directory PATH` for an offline directory containing
85
+ `redact_tokenizer.bin`, `labels.json`, and `redact.tflite`.
86
+
87
+ ## Development setup
88
+
89
+ Requirements:
90
+
91
+ - Python 3.10 or newer
92
+ - [uv](https://docs.astral.sh/uv/)
93
+
94
+ Create an isolated environment and install the development dependencies:
95
+
96
+ ```sh
97
+ uv venv
98
+ source .venv/bin/activate
99
+ uv sync --extra dev --extra litert
100
+ ```
101
+
102
+ Use `--extra tensorflow` instead of `--extra litert` when TensorFlow is the
103
+ preferred TFLite runtime.
104
+
105
+ ## Build, test, and check
106
+
107
+ ```sh
108
+ uv run pytest
109
+ uv run ruff check src/ tests/ scripts/
110
+ uv run ruff format --check src/ tests/ scripts/
111
+ uv run mypy src/
112
+ uv run python -m build
113
+ uv run twine check dist/*
114
+ ```
115
+
116
+ Model weights and taxonomy assets are not bundled with the package. See
117
+ [NOTICE.md](NOTICE.md) for the applicable model license.
118
+
119
+ ## Release
120
+
121
+ Releases use Conventional Commits on `main` with
122
+ `python-semantic-release`. The release workflow updates the package version,
123
+ synchronizes `uv.lock`, updates [CHANGELOG.md](CHANGELOG.md), creates a tag
124
+ and GitHub release, and publishes the wheel and source archive to PyPI.
125
+
126
+ PyPI publishing uses Trusted Publishing. Configure the PyPI project publisher
127
+ for this repository, workflow, and the `pypi` environment before publishing.
128
+
129
+ - `fix:` creates a patch release.
130
+ - `feat:` creates a minor release.
131
+ - `BREAKING CHANGE:` or a `!` after the commit type creates a major release.
132
+
133
+ Preview the next release locally without changing files:
134
+
135
+ ```sh
136
+ uv run semantic-release --noop version
137
+ ```
138
+
139
+ ## License
140
+
141
+ The `piitag` wrapper code is available under the MIT license. Model weights
142
+ and taxonomy assets are not bundled with the package. Runtime downloads from
143
+ the `desert-ant-labs/redact` Hugging Face repository at revision `v0.4.0` are
144
+ subject to the Desert Ant Labs Source-Available License. See
145
+ [NOTICE.md](NOTICE.md) before using those assets commercially.
146
+
147
+ ## AI-generated code disclaimer
148
+
149
+ This codebase was generated with assistance from **GitHub Copilot**. The
150
+ exact underlying model identifier used for this session is not exposed by the
151
+ available session metadata, so no more specific model name is claimed here.
152
+ Review and test all generated code before using it in production.