pseudonymize 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 (128) hide show
  1. pseudonymize-0.1.0/.editorconfig +11 -0
  2. pseudonymize-0.1.0/.gitattributes +1 -0
  3. pseudonymize-0.1.0/.github/CODEOWNERS +1 -0
  4. pseudonymize-0.1.0/.github/ISSUE_TEMPLATE/bug.yml +24 -0
  5. pseudonymize-0.1.0/.github/ISSUE_TEMPLATE/config.yml +8 -0
  6. pseudonymize-0.1.0/.github/ISSUE_TEMPLATE/detector-request.yml +23 -0
  7. pseudonymize-0.1.0/.github/ISSUE_TEMPLATE/feature.yml +17 -0
  8. pseudonymize-0.1.0/.github/ISSUE_TEMPLATE/question.yml +30 -0
  9. pseudonymize-0.1.0/.github/PUBLICATION_CHECKLIST.md +34 -0
  10. pseudonymize-0.1.0/.github/dependabot.yml +13 -0
  11. pseudonymize-0.1.0/.github/pull_request_template.md +10 -0
  12. pseudonymize-0.1.0/.github/workflows/ci.yml +63 -0
  13. pseudonymize-0.1.0/.github/workflows/docs.yml +37 -0
  14. pseudonymize-0.1.0/.github/workflows/package.yml +64 -0
  15. pseudonymize-0.1.0/.github/workflows/release.yml +54 -0
  16. pseudonymize-0.1.0/.gitignore +218 -0
  17. pseudonymize-0.1.0/.pre-commit-config.yaml +7 -0
  18. pseudonymize-0.1.0/CHANGELOG.md +130 -0
  19. pseudonymize-0.1.0/CODE_OF_CONDUCT.md +5 -0
  20. pseudonymize-0.1.0/CONTRIBUTING.md +42 -0
  21. pseudonymize-0.1.0/LICENSE +201 -0
  22. pseudonymize-0.1.0/PKG-INFO +295 -0
  23. pseudonymize-0.1.0/README.md +267 -0
  24. pseudonymize-0.1.0/ROADMAP.md +172 -0
  25. pseudonymize-0.1.0/SECURITY.md +17 -0
  26. pseudonymize-0.1.0/SUPPORT.md +26 -0
  27. pseudonymize-0.1.0/VISION.md +115 -0
  28. pseudonymize-0.1.0/benchmarks/README.md +11 -0
  29. pseudonymize-0.1.0/benchmarks/benchmark_detectors.py +9 -0
  30. pseudonymize-0.1.0/benchmarks/benchmark_engine.py +21 -0
  31. pseudonymize-0.1.0/benchmarks/datasets/synthetic_messages.jsonl +3 -0
  32. pseudonymize-0.1.0/docs/adr/0001-dependency-free-core.md +6 -0
  33. pseudonymize-0.1.0/docs/adr/0002-token-format.md +6 -0
  34. pseudonymize-0.1.0/docs/adr/0003-no-reversible-storage.md +6 -0
  35. pseudonymize-0.1.0/docs/adr/0004-optional-ner-backend.md +7 -0
  36. pseudonymize-0.1.0/docs/api.md +42 -0
  37. pseudonymize-0.1.0/docs/architecture.md +109 -0
  38. pseudonymize-0.1.0/docs/benchmarks.md +48 -0
  39. pseudonymize-0.1.0/docs/compatibility.md +31 -0
  40. pseudonymize-0.1.0/docs/contributing.md +4 -0
  41. pseudonymize-0.1.0/docs/deployment.md +48 -0
  42. pseudonymize-0.1.0/docs/detectors.md +8 -0
  43. pseudonymize-0.1.0/docs/index.md +15 -0
  44. pseudonymize-0.1.0/docs/limitations.md +15 -0
  45. pseudonymize-0.1.0/docs/llm-gateways.md +65 -0
  46. pseudonymize-0.1.0/docs/llm-payloads.md +9 -0
  47. pseudonymize-0.1.0/docs/migration-a2.md +108 -0
  48. pseudonymize-0.1.0/docs/migration-a3.md +53 -0
  49. pseudonymize-0.1.0/docs/policies.md +27 -0
  50. pseudonymize-0.1.0/docs/quickstart.md +22 -0
  51. pseudonymize-0.1.0/docs/releases/0.1.0.md +37 -0
  52. pseudonymize-0.1.0/docs/releases/0.1.0a2.md +30 -0
  53. pseudonymize-0.1.0/docs/releases/0.1.0a3.md +30 -0
  54. pseudonymize-0.1.0/docs/releases/0.1.0b1.md +26 -0
  55. pseudonymize-0.1.0/docs/releases/0.1.0rc1.md +28 -0
  56. pseudonymize-0.1.0/docs/releasing.md +65 -0
  57. pseudonymize-0.1.0/docs/security.md +13 -0
  58. pseudonymize-0.1.0/docs/threat-model.md +56 -0
  59. pseudonymize-0.1.0/examples/llm_gateway.py +53 -0
  60. pseudonymize-0.1.0/mkdocs.yml +46 -0
  61. pseudonymize-0.1.0/pyproject.toml +100 -0
  62. pseudonymize-0.1.0/scripts/__init__.py +0 -0
  63. pseudonymize-0.1.0/scripts/audit_install.py +59 -0
  64. pseudonymize-0.1.0/scripts/smoke_wheel.py +97 -0
  65. pseudonymize-0.1.0/scripts/verify_release.py +162 -0
  66. pseudonymize-0.1.0/src/pseudonymize/__init__.py +66 -0
  67. pseudonymize-0.1.0/src/pseudonymize/adapters.py +17 -0
  68. pseudonymize-0.1.0/src/pseudonymize/api.py +50 -0
  69. pseudonymize-0.1.0/src/pseudonymize/backends/__init__.py +16 -0
  70. pseudonymize-0.1.0/src/pseudonymize/backends/base.py +90 -0
  71. pseudonymize-0.1.0/src/pseudonymize/backends/composite.py +54 -0
  72. pseudonymize-0.1.0/src/pseudonymize/backends/rules.py +43 -0
  73. pseudonymize-0.1.0/src/pseudonymize/cli.py +206 -0
  74. pseudonymize-0.1.0/src/pseudonymize/detectors/__init__.py +4 -0
  75. pseudonymize-0.1.0/src/pseudonymize/detectors/base.py +10 -0
  76. pseudonymize-0.1.0/src/pseudonymize/detectors/email.py +21 -0
  77. pseudonymize-0.1.0/src/pseudonymize/detectors/iban.py +31 -0
  78. pseudonymize-0.1.0/src/pseudonymize/detectors/ip_address.py +27 -0
  79. pseudonymize-0.1.0/src/pseudonymize/detectors/payment_card.py +33 -0
  80. pseudonymize-0.1.0/src/pseudonymize/detectors/phone.py +26 -0
  81. pseudonymize-0.1.0/src/pseudonymize/detectors/registry.py +18 -0
  82. pseudonymize-0.1.0/src/pseudonymize/detectors/secret.py +31 -0
  83. pseudonymize-0.1.0/src/pseudonymize/detectors/url.py +53 -0
  84. pseudonymize-0.1.0/src/pseudonymize/document.py +107 -0
  85. pseudonymize-0.1.0/src/pseudonymize/engine.py +542 -0
  86. pseudonymize-0.1.0/src/pseudonymize/exceptions.py +42 -0
  87. pseudonymize-0.1.0/src/pseudonymize/formats.py +361 -0
  88. pseudonymize-0.1.0/src/pseudonymize/normalization.py +22 -0
  89. pseudonymize-0.1.0/src/pseudonymize/policy.py +82 -0
  90. pseudonymize-0.1.0/src/pseudonymize/processing.py +45 -0
  91. pseudonymize-0.1.0/src/pseudonymize/py.typed +0 -0
  92. pseudonymize-0.1.0/src/pseudonymize/resolution.py +28 -0
  93. pseudonymize-0.1.0/src/pseudonymize/result.py +58 -0
  94. pseudonymize-0.1.0/src/pseudonymize/spans.py +46 -0
  95. pseudonymize-0.1.0/src/pseudonymize/transforms/__init__.py +27 -0
  96. pseudonymize-0.1.0/src/pseudonymize/transforms/alias.py +74 -0
  97. pseudonymize-0.1.0/src/pseudonymize/transforms/base.py +8 -0
  98. pseudonymize-0.1.0/src/pseudonymize/transforms/hmac.py +7 -0
  99. pseudonymize-0.1.0/src/pseudonymize/transforms/mode.py +8 -0
  100. pseudonymize-0.1.0/src/pseudonymize/transforms/placeholder.py +11 -0
  101. pseudonymize-0.1.0/src/pseudonymize/transforms/redact.py +13 -0
  102. pseudonymize-0.1.0/tests/compatibility/test_b1_contract.py +171 -0
  103. pseudonymize-0.1.0/tests/corpus/de.jsonl +2 -0
  104. pseudonymize-0.1.0/tests/corpus/en.jsonl +2 -0
  105. pseudonymize-0.1.0/tests/corpus/files.json +59 -0
  106. pseudonymize-0.1.0/tests/corpus/it.jsonl +2 -0
  107. pseudonymize-0.1.0/tests/integration/test_builtin_files.py +228 -0
  108. pseudonymize-0.1.0/tests/integration/test_cli.py +157 -0
  109. pseudonymize-0.1.0/tests/integration/test_cross_platform_corpus.py +58 -0
  110. pseudonymize-0.1.0/tests/integration/test_file_processing.py +247 -0
  111. pseudonymize-0.1.0/tests/integration/test_llm_gateway_example.py +27 -0
  112. pseudonymize-0.1.0/tests/integration/test_public_api.py +46 -0
  113. pseudonymize-0.1.0/tests/integration/test_release_stress.py +52 -0
  114. pseudonymize-0.1.0/tests/integration/test_release_verifier.py +108 -0
  115. pseudonymize-0.1.0/tests/property/test_invariants.py +53 -0
  116. pseudonymize-0.1.0/tests/unit/detectors/test_detectors.py +107 -0
  117. pseudonymize-0.1.0/tests/unit/test_backends.py +286 -0
  118. pseudonymize-0.1.0/tests/unit/test_document.py +104 -0
  119. pseudonymize-0.1.0/tests/unit/test_engine.py +78 -0
  120. pseudonymize-0.1.0/tests/unit/test_formats.py +198 -0
  121. pseudonymize-0.1.0/tests/unit/test_modes.py +198 -0
  122. pseudonymize-0.1.0/tests/unit/test_normalization.py +11 -0
  123. pseudonymize-0.1.0/tests/unit/test_policy.py +32 -0
  124. pseudonymize-0.1.0/tests/unit/test_processing.py +145 -0
  125. pseudonymize-0.1.0/tests/unit/test_spans.py +15 -0
  126. pseudonymize-0.1.0/tests/unit/test_transforms.py +57 -0
  127. pseudonymize-0.1.0/tests/unit/test_types.py +10 -0
  128. pseudonymize-0.1.0/uv.lock +1610 -0
@@ -0,0 +1,11 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ insert_final_newline = true
7
+ indent_style = space
8
+ indent_size = 4
9
+
10
+ [*.{yml,yaml}]
11
+ indent_size = 2
@@ -0,0 +1 @@
1
+ * text=auto eol=lf
@@ -0,0 +1 @@
1
+ * @ma2za
@@ -0,0 +1,24 @@
1
+ name: Bug report
2
+ description: Report incorrect package behavior using synthetic data
3
+ title: "bug: "
4
+ labels: [bug]
5
+ body:
6
+ - type: textarea
7
+ id: description
8
+ attributes:
9
+ label: Description
10
+ validations:
11
+ required: true
12
+ - type: textarea
13
+ id: reproduction
14
+ attributes:
15
+ label: Synthetic reproduction
16
+ description: Never include real personal data or credentials.
17
+ validations:
18
+ required: true
19
+ - type: input
20
+ id: version
21
+ attributes:
22
+ label: Version
23
+ validations:
24
+ required: true
@@ -0,0 +1,8 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Security vulnerability
4
+ url: https://github.com/ma2za/pseudonymize/security/advisories/new
5
+ about: Report vulnerabilities privately. Never include sensitive data in a public issue.
6
+ - name: Support and project scope
7
+ url: https://github.com/ma2za/pseudonymize/blob/main/SUPPORT.md
8
+ about: Read the support policy before opening an issue.
@@ -0,0 +1,23 @@
1
+ name: Detector request
2
+ description: Request structured-value detection using synthetic examples
3
+ title: "detector: "
4
+ labels: [detector]
5
+ body:
6
+ - type: input
7
+ id: entity
8
+ attributes:
9
+ label: Entity format
10
+ validations:
11
+ required: true
12
+ - type: textarea
13
+ id: valid
14
+ attributes:
15
+ label: Synthetic valid examples
16
+ validations:
17
+ required: true
18
+ - type: textarea
19
+ id: invalid
20
+ attributes:
21
+ label: Similar values that must remain unchanged
22
+ validations:
23
+ required: true
@@ -0,0 +1,17 @@
1
+ name: Feature request
2
+ description: Propose a scoped capability
3
+ title: "feat: "
4
+ labels: [api]
5
+ body:
6
+ - type: textarea
7
+ id: use-case
8
+ attributes:
9
+ label: Use case
10
+ validations:
11
+ required: true
12
+ - type: textarea
13
+ id: proposal
14
+ attributes:
15
+ label: Proposed behavior
16
+ validations:
17
+ required: true
@@ -0,0 +1,30 @@
1
+ name: Usage or design question
2
+ description: Ask about current behavior, extension contracts, or project scope
3
+ title: "question: "
4
+ labels: [question]
5
+ body:
6
+ - type: input
7
+ id: version
8
+ attributes:
9
+ label: Package version
10
+ description: Use "not installed" for architecture or roadmap questions.
11
+ validations:
12
+ required: true
13
+ - type: textarea
14
+ id: context
15
+ attributes:
16
+ label: Context
17
+ description: Describe the application boundary without including real personal data.
18
+ validations:
19
+ required: true
20
+ - type: textarea
21
+ id: question
22
+ attributes:
23
+ label: Question
24
+ validations:
25
+ required: true
26
+ - type: textarea
27
+ id: example
28
+ attributes:
29
+ label: Synthetic example
30
+ description: Never include production payloads, credentials, or real personal data.
@@ -0,0 +1,34 @@
1
+ # Public repository checklist
2
+
3
+ Complete these operational steps when changing repository visibility. They are not release steps
4
+ and do not require a package publication.
5
+
6
+ ## Before changing visibility
7
+
8
+ - Review the complete staged diff and confirm that every example uses synthetic data.
9
+ - Scan tracked files and Git history for credentials, private documents, and personal data.
10
+ - Confirm that release workflows contain no stored PyPI token and use Trusted Publishing.
11
+ - Confirm that the repository description, topics, licence, support policy, security policy,
12
+ contribution guide, issue templates, and pull request template are current.
13
+ - Decide whether the historical annotated-tag email address is acceptable for public visibility.
14
+
15
+ ## Immediately after changing visibility
16
+
17
+ - Enable private vulnerability reporting.
18
+ - Enable secret scanning and push protection if GitHub makes them available.
19
+ - Add a main-branch ruleset that requires pull requests, required CI checks, resolved
20
+ conversations, and linear history, and blocks force pushes and deletion.
21
+ - Configure GitHub Pages to deploy through Actions.
22
+ - Set the repository variable `ENABLE_PAGES` to `true`.
23
+ - Verify that `https://ma2za.github.io/pseudonymize/` is live before advertising it.
24
+ - Confirm that blank issues are disabled and every issue template renders correctly.
25
+ - Confirm that the CI and licence badges render for signed-out users.
26
+ - Review a release workflow log as a signed-out user and confirm it exposes no sensitive values.
27
+
28
+ ## Final public check
29
+
30
+ - Install the latest PyPI wheel into a clean environment.
31
+ - Run the README quickstart and CLI.
32
+ - Verify the PyPI provenance identity and GitHub release artifact digests.
33
+ - Open the repository in a signed-out browser and check README links, package links, security
34
+ reporting, issue intake, and clone instructions.
@@ -0,0 +1,13 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: uv
4
+ directory: /
5
+ schedule:
6
+ interval: weekly
7
+ groups:
8
+ development-dependencies:
9
+ patterns: ["*"]
10
+ - package-ecosystem: github-actions
11
+ directory: /
12
+ schedule:
13
+ interval: weekly
@@ -0,0 +1,10 @@
1
+ ## Summary
2
+
3
+ ## Verification
4
+
5
+ - [ ] Tests use synthetic data only
6
+ - [ ] Ruff, mypy, and pytest pass
7
+ - [ ] Documentation and changelog are updated when required
8
+ - [ ] Security and privacy impact has been considered
9
+ - [ ] No compatibility shim was added for an alpha-only API without an explicit roadmap reason
10
+ - [ ] The base package remains dependency-free and network-denied by default
@@ -0,0 +1,63 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ env:
11
+ UV_FROZEN: "1"
12
+
13
+ jobs:
14
+ quality:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
18
+ - uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
19
+ with:
20
+ python-version: "3.14"
21
+ - run: uv sync --frozen --group quality --group test
22
+ - run: uv run ruff format --check .
23
+ - run: uv run ruff check .
24
+ - run: uv run mypy
25
+
26
+ tests:
27
+ strategy:
28
+ fail-fast: false
29
+ matrix:
30
+ include:
31
+ - os: ubuntu-latest
32
+ python: "3.11"
33
+ - os: ubuntu-latest
34
+ python: "3.12"
35
+ - os: ubuntu-latest
36
+ python: "3.13"
37
+ - os: ubuntu-latest
38
+ python: "3.14"
39
+ - os: macos-latest
40
+ python: "3.14"
41
+ - os: windows-latest
42
+ python: "3.14"
43
+ runs-on: ${{ matrix.os }}
44
+ steps:
45
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
46
+ - uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
47
+ with:
48
+ python-version: ${{ matrix.python }}
49
+ - run: uv sync --frozen --group test
50
+ - run: uv run pytest
51
+
52
+ property-tests:
53
+ runs-on: ubuntu-latest
54
+ steps:
55
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
56
+ - uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
57
+ with:
58
+ python-version: "3.14"
59
+ - run: uv sync --frozen --group test
60
+ - run: uv run pytest tests/property -o addopts="--strict-config --strict-markers -ra" --hypothesis-show-statistics
61
+
62
+ package:
63
+ uses: ./.github/workflows/package.yml
@@ -0,0 +1,37 @@
1
+ name: Docs
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: read
11
+ pages: write
12
+ id-token: write
13
+
14
+ jobs:
15
+ build:
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
19
+ - uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
20
+ with:
21
+ python-version: "3.14"
22
+ - run: uv sync --frozen --group docs
23
+ - run: uv run mkdocs build --strict
24
+ - uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
25
+ if: github.ref == 'refs/heads/main' && vars.ENABLE_PAGES == 'true'
26
+ with:
27
+ path: site
28
+ deploy:
29
+ if: github.ref == 'refs/heads/main' && vars.ENABLE_PAGES == 'true'
30
+ needs: build
31
+ runs-on: ubuntu-latest
32
+ environment:
33
+ name: github-pages
34
+ url: ${{ steps.deployment.outputs.page_url }}
35
+ steps:
36
+ - id: deployment
37
+ uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
@@ -0,0 +1,64 @@
1
+ name: Package
2
+
3
+ on:
4
+ workflow_call:
5
+ workflow_dispatch:
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ jobs:
11
+ package:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
15
+ - uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
16
+ with:
17
+ python-version: "3.14"
18
+ - run: uv sync --frozen --group release
19
+ - run: uv build
20
+ - run: uv run twine check dist/*
21
+ - run: uv run python scripts/verify_release.py
22
+ - run: uv venv --python 3.14 .wheel-venv
23
+ - run: uv pip install --python .wheel-venv/bin/python dist/*.whl
24
+ - run: .wheel-venv/bin/python scripts/smoke_wheel.py
25
+ - run: .wheel-venv/bin/pseudonymize detectors
26
+ - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
27
+ with:
28
+ name: distributions
29
+ path: dist/
30
+
31
+ installed-wheel:
32
+ needs: package
33
+ strategy:
34
+ fail-fast: false
35
+ matrix:
36
+ os: [ubuntu-latest, macos-latest, windows-latest]
37
+ python: ["3.11", "3.12", "3.13", "3.14"]
38
+ runs-on: ${{ matrix.os }}
39
+ steps:
40
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
41
+ - uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
42
+ with:
43
+ python-version: ${{ matrix.python }}
44
+ - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
45
+ with:
46
+ name: distributions
47
+ path: dist
48
+ - run: uv venv --python ${{ matrix.python }} .wheel-venv
49
+ - name: Install and audit wheel
50
+ if: runner.os != 'Windows'
51
+ run: |
52
+ uv pip install --python .wheel-venv/bin/python dist/pseudonymize-0.1.0-py3-none-any.whl
53
+ uv pip check --python .wheel-venv/bin/python
54
+ .wheel-venv/bin/python -I scripts/audit_install.py --version 0.1.0
55
+ .wheel-venv/bin/python -I scripts/smoke_wheel.py
56
+ .wheel-venv/bin/pseudonymize detectors
57
+ - name: Install and audit wheel on Windows
58
+ if: runner.os == 'Windows'
59
+ run: |
60
+ uv pip install --python .wheel-venv\Scripts\python.exe dist\pseudonymize-0.1.0-py3-none-any.whl
61
+ uv pip check --python .wheel-venv\Scripts\python.exe
62
+ .wheel-venv\Scripts\python.exe -I scripts\audit_install.py --version 0.1.0
63
+ .wheel-venv\Scripts\python.exe -I scripts\smoke_wheel.py
64
+ .wheel-venv\Scripts\pseudonymize.exe detectors
@@ -0,0 +1,54 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags: ["v*"]
6
+
7
+ permissions:
8
+ contents: write
9
+ id-token: write
10
+
11
+ jobs:
12
+ quality-and-tests:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
16
+ with:
17
+ ref: ${{ github.ref }}
18
+ - uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
19
+ with:
20
+ python-version: "3.14"
21
+ - run: uv sync --all-groups --frozen
22
+ - run: uv run ruff format --check .
23
+ - run: uv run ruff check .
24
+ - run: uv run mypy
25
+ - run: uv run pytest
26
+ - run: uv run mkdocs build --strict
27
+ - name: Verify tag matches project version
28
+ if: github.event_name == 'push'
29
+ run: uv run python scripts/verify_release.py --check-tag-only --tag "$GITHUB_REF_NAME"
30
+
31
+ verify:
32
+ needs: quality-and-tests
33
+ uses: ./.github/workflows/package.yml
34
+
35
+ publish:
36
+ needs: verify
37
+ runs-on: ubuntu-latest
38
+ environment: pypi
39
+ steps:
40
+ - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
41
+ with:
42
+ name: distributions
43
+ path: dist
44
+ - uses: pypa/gh-action-pypi-publish@ba38be9e461d3875417946c167d0b5f3d385a247 # release/v1
45
+ - name: Publish GitHub release artifacts
46
+ shell: bash
47
+ run: |
48
+ release_flags=(--verify-tag --generate-notes)
49
+ if [[ "$GITHUB_REF_NAME" =~ (a|b|rc)[0-9]+$ ]]; then
50
+ release_flags+=(--prerelease --latest=false)
51
+ fi
52
+ gh release create "$GITHUB_REF_NAME" dist/* "${release_flags[@]}" --repo "$GITHUB_REPOSITORY"
53
+ env:
54
+ GH_TOKEN: ${{ github.token }}
@@ -0,0 +1,218 @@
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
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
+ # PyPI configuration file
210
+ .pypirc
211
+
212
+ # Marimo
213
+ marimo/_static/
214
+ marimo/_lsp/
215
+ __marimo__/
216
+
217
+ # Streamlit
218
+ .streamlit/secrets.toml
@@ -0,0 +1,7 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ rev: v0.12.4
4
+ hooks:
5
+ - id: ruff-check
6
+ args: [--fix]
7
+ - id: ruff-format