attestationcheck 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 (57) hide show
  1. attestationcheck-0.1.0/.github/workflows/mirror-to-codeberg.yaml +20 -0
  2. attestationcheck-0.1.0/.github/workflows/release.yaml +58 -0
  3. attestationcheck-0.1.0/.github/workflows/test-lint.yaml +51 -0
  4. attestationcheck-0.1.0/.gitignore +143 -0
  5. attestationcheck-0.1.0/.pre-commit-config.yaml +67 -0
  6. attestationcheck-0.1.0/CHANGELOG.md +5 -0
  7. attestationcheck-0.1.0/LICENSE.md +20 -0
  8. attestationcheck-0.1.0/PKG-INFO +378 -0
  9. attestationcheck-0.1.0/README.md +345 -0
  10. attestationcheck-0.1.0/attestationcheck/__init__.py +5 -0
  11. attestationcheck-0.1.0/attestationcheck/__main__.py +7 -0
  12. attestationcheck-0.1.0/attestationcheck/io/__init__.py +0 -0
  13. attestationcheck-0.1.0/attestationcheck/io/cli.py +175 -0
  14. attestationcheck-0.1.0/attestationcheck/io/fmt.py +272 -0
  15. attestationcheck-0.1.0/attestationcheck/io/html.template +69 -0
  16. attestationcheck-0.1.0/attestationcheck/models/__init__.py +0 -0
  17. attestationcheck-0.1.0/attestationcheck/models/attestation.py +73 -0
  18. attestationcheck-0.1.0/attestationcheck/models/config.py +21 -0
  19. attestationcheck-0.1.0/attestationcheck/models/defaultonnone.py +22 -0
  20. attestationcheck-0.1.0/attestationcheck/models/packageinfo.py +82 -0
  21. attestationcheck-0.1.0/attestationcheck/models/pypijson.py +93 -0
  22. attestationcheck-0.1.0/attestationcheck/packageinforesolver.py +190 -0
  23. attestationcheck-0.1.0/attestationcheck/session.py +4 -0
  24. attestationcheck-0.1.0/attestationcheck/verify_attestation.py +90 -0
  25. attestationcheck-0.1.0/documentation/reference/README.md +20 -0
  26. attestationcheck-0.1.0/documentation/reference/attestationcheck/index.md +17 -0
  27. attestationcheck-0.1.0/documentation/reference/attestationcheck/io/cli.md +39 -0
  28. attestationcheck-0.1.0/documentation/reference/attestationcheck/io/fmt.md +210 -0
  29. attestationcheck-0.1.0/documentation/reference/attestationcheck/io/index.md +13 -0
  30. attestationcheck-0.1.0/documentation/reference/attestationcheck/models/attestation.md +209 -0
  31. attestationcheck-0.1.0/documentation/reference/attestationcheck/models/config.md +24 -0
  32. attestationcheck-0.1.0/documentation/reference/attestationcheck/models/defaultonnone.md +31 -0
  33. attestationcheck-0.1.0/documentation/reference/attestationcheck/models/index.md +16 -0
  34. attestationcheck-0.1.0/documentation/reference/attestationcheck/models/packageinfo.md +104 -0
  35. attestationcheck-0.1.0/documentation/reference/attestationcheck/models/pypijson.md +141 -0
  36. attestationcheck-0.1.0/documentation/reference/attestationcheck/module.md +6 -0
  37. attestationcheck-0.1.0/documentation/reference/attestationcheck/packageinforesolver.md +199 -0
  38. attestationcheck-0.1.0/documentation/reference/attestationcheck/session.md +6 -0
  39. attestationcheck-0.1.0/documentation/reference/attestationcheck/verify_attestation.md +60 -0
  40. attestationcheck-0.1.0/pyproject.toml +128 -0
  41. attestationcheck-0.1.0/tests/__init__.py +0 -0
  42. attestationcheck-0.1.0/tests/io/__init__.py +0 -0
  43. attestationcheck-0.1.0/tests/io/data/fmt/advanced.ansi +25 -0
  44. attestationcheck-0.1.0/tests/io/data/fmt/advanced.csv +3 -0
  45. attestationcheck-0.1.0/tests/io/data/fmt/advanced.json +41 -0
  46. attestationcheck-0.1.0/tests/io/data/fmt/advanced.md +31 -0
  47. attestationcheck-0.1.0/tests/io/data/fmt/advanced.txt +25 -0
  48. attestationcheck-0.1.0/tests/io/data/fmt/advanced_ignore_params.json +35 -0
  49. attestationcheck-0.1.0/tests/io/data/fmt/advanced_ignore_params.md +31 -0
  50. attestationcheck-0.1.0/tests/io/data/fmt/advanced_ignore_params2.json +35 -0
  51. attestationcheck-0.1.0/tests/io/data/fmt/simple.ansi +16 -0
  52. attestationcheck-0.1.0/tests/io/data/fmt/simple.csv +2 -0
  53. attestationcheck-0.1.0/tests/io/data/fmt/simple.json +25 -0
  54. attestationcheck-0.1.0/tests/io/data/fmt/simple.md +22 -0
  55. attestationcheck-0.1.0/tests/io/data/fmt/simple.txt +16 -0
  56. attestationcheck-0.1.0/tests/io/test_formatter.py +89 -0
  57. attestationcheck-0.1.0/tests/test_packageinfo.py +94 -0
@@ -0,0 +1,20 @@
1
+
2
+ # Sync repo to the Codeberg mirror
3
+ name: Repo sync GitHub -> Codeberg
4
+ on:
5
+ push:
6
+ branches:
7
+ - '**'
8
+
9
+ jobs:
10
+ codeberg:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v3
14
+ with:
15
+ fetch-depth: 0
16
+ - uses: spyoungtech/mirror-action@v0.7.0
17
+ with:
18
+ REMOTE: "https://codeberg.org/FredHappyface/LicenseCheck.git"
19
+ GIT_USERNAME: FredHappyface
20
+ GIT_PASSWORD: ${{ secrets.CODEBERG_PASSWORD }}
@@ -0,0 +1,58 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "*.*.*"
7
+
8
+ permissions:
9
+ contents: write
10
+ id-token: write
11
+
12
+ jobs:
13
+ build:
14
+ runs-on: ubuntu-latest
15
+
16
+ steps:
17
+ - uses: actions/checkout@v5
18
+
19
+ - uses: actions/setup-python@v6
20
+ with:
21
+ python-version: "3.13"
22
+
23
+ - name: Install uv
24
+ uses: astral-sh/setup-uv@v6
25
+
26
+ - name: Build distributions
27
+ run: uv build
28
+
29
+ - name: Upload build artifacts
30
+ uses: actions/upload-artifact@v4
31
+ with:
32
+ name: python-distributions
33
+ path: dist/*
34
+
35
+
36
+ - name: Create GitHub Release
37
+ id: release
38
+ uses: softprops/action-gh-release@v2
39
+ with:
40
+ generate_release_notes: true
41
+ files: dist/*
42
+
43
+
44
+ publish:
45
+ runs-on: ubuntu-latest
46
+ needs: build
47
+
48
+ permissions:
49
+ id-token: write
50
+
51
+ steps:
52
+ - uses: actions/download-artifact@v5
53
+ with:
54
+ name: python-distributions
55
+ path: dist
56
+
57
+ - name: Publish to PyPI
58
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,51 @@
1
+ name: Python Test and Lint
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - '*'
7
+ pull_request:
8
+ branches:
9
+ - main
10
+
11
+ jobs:
12
+ test:
13
+ name: Python Test and Lint
14
+ runs-on: ubuntu-latest
15
+
16
+ strategy:
17
+ matrix:
18
+ python-version:
19
+ - '3.12'
20
+ - '3.13'
21
+ - '3.14'
22
+
23
+ steps:
24
+ - name: Checkout code
25
+ uses: actions/checkout@v4
26
+
27
+ - name: Set up Python ${{ matrix.python-version }}
28
+ uses: actions/setup-python@v4
29
+ with:
30
+ python-version: ${{ matrix.python-version }}
31
+
32
+ - name: Install UV
33
+ run: |
34
+ curl -LsSf https://astral.sh/uv/install.sh | sh
35
+
36
+ - name: Install dependencies
37
+ run: uv sync
38
+
39
+ - name: Run ruff
40
+ run: uv run ruff check --output-format=github
41
+ continue-on-error: true
42
+
43
+ - name: Run pytest
44
+ run: uv run pytest tests/
45
+
46
+ - name: Run on self
47
+ run: |
48
+ uv run attestationcheck -r pyproject.toml
49
+ uv run attestationcheck --show-only-failing -g dev -r pyproject.toml
50
+ uv run attestationcheck --show-only-failing -f csv -r pyproject.toml
51
+
@@ -0,0 +1,143 @@
1
+ !test
2
+ uv.lock
3
+ profile.*
4
+ ignore/**
5
+
6
+ # DepHell stuff
7
+ poetry.lock
8
+
9
+ # Byte-compiled / optimized / DLL files
10
+ __pycache__/
11
+ *.py[cod]
12
+ *$py.class
13
+
14
+ # C extensions
15
+ *.so
16
+
17
+ # Distribution / packaging
18
+ .Python
19
+ build/
20
+ develop-eggs/
21
+ dist/
22
+ downloads/
23
+ eggs/
24
+ .eggs/
25
+ lib/
26
+ lib64/
27
+ parts/
28
+ sdist/
29
+ var/
30
+ wheels/
31
+ pip-wheel-metadata/
32
+ share/python-wheels/
33
+ *.egg-info/
34
+ .installed.cfg
35
+ *.egg
36
+ MANIFEST
37
+
38
+ # PyInstaller
39
+ # Usually these files are written by a python script from a template
40
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
41
+ *.manifest
42
+ *.spec
43
+
44
+ # Installer logs
45
+ pip-log.txt
46
+ pip-delete-this-directory.txt
47
+
48
+ # Unit test / coverage reports
49
+ htmlcov/
50
+ .tox/
51
+ .nox/
52
+ .coverage
53
+ .coverage.*
54
+ .cache
55
+ nosetests.xml
56
+ coverage.xml
57
+ *.cover
58
+ *.py,cover
59
+ .hypothesis/
60
+ .pytest_cache/
61
+ cover/
62
+
63
+ # Translations
64
+ *.mo
65
+ *.pot
66
+
67
+ # Django stuff:
68
+ *.log
69
+ local_settings.py
70
+ db.sqlite3
71
+ db.sqlite3-journal
72
+
73
+ # Flask stuff:
74
+ instance/
75
+ .webassets-cache
76
+
77
+ # Scrapy stuff:
78
+ .scrapy
79
+
80
+ # Sphinx documentation
81
+ docs/_build/
82
+
83
+ # PyBuilder
84
+ target/
85
+
86
+ # Jupyter Notebook
87
+ .ipynb_checkpoints
88
+
89
+ # IPython
90
+ profile_default/
91
+ ipython_config.py
92
+
93
+ # pyenv
94
+ # For a library or package, you might want to ignore these files since the code is
95
+ # intended to run in multiple environments; otherwise, check them in:
96
+ # .python-version
97
+
98
+ # pipenv
99
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
100
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
101
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
102
+ # install all needed dependencies.
103
+ #Pipfile.lock
104
+
105
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
106
+ __pypackages__/
107
+
108
+ # Celery stuff
109
+ celerybeat-schedule
110
+ celerybeat.pid
111
+
112
+ # SageMath parsed files
113
+ *.sage.py
114
+
115
+ # Environments
116
+ .env
117
+ .venv
118
+ env/
119
+ venv/
120
+ ENV/
121
+ env.bak/
122
+ venv.bak/
123
+
124
+ # Spyder project settings
125
+ .spyderproject
126
+ .spyproject
127
+
128
+ # Rope project settings
129
+ .ropeproject
130
+
131
+ # mkdocs documentation
132
+ /site
133
+
134
+ # mypy
135
+ .mypy_cache/
136
+ .dmypy.json
137
+ dmypy.json
138
+
139
+ # Pyre type checker
140
+ .pyre/
141
+
142
+ # pytype static type analyzer
143
+ .pytype/
@@ -0,0 +1,67 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ rev: v0.9.6
4
+ hooks:
5
+ - id: ruff
6
+ args: [ --fix ]
7
+ - id: ruff-format
8
+
9
+ - repo: https://github.com/RobertCraigie/pyright-python
10
+ rev: v1.1.394
11
+ hooks:
12
+ - id: pyright
13
+
14
+ - repo: local
15
+ hooks:
16
+ - id: generate requirements
17
+ name: generate requirements
18
+ entry: uv export --no-hashes --no-emit-project --no-dev -o requirements.txt
19
+ language: system
20
+ pass_filenames: false
21
+ - id: safety
22
+ name: safety
23
+ entry: uv run safety
24
+ language: system
25
+ pass_filenames: false
26
+ - id: make docs
27
+ name: make docs
28
+ entry: uv run handsdown --cleanup -o documentation/reference
29
+ language: system
30
+ pass_filenames: false
31
+ - id: build package
32
+ name: build package
33
+ entry: uv build
34
+ language: system
35
+ pass_filenames: false
36
+ - id: pytest
37
+ name: pytest
38
+ entry: uv run pytest
39
+ language: system
40
+ pass_filenames: false
41
+
42
+ - repo: https://github.com/pre-commit/pre-commit-hooks
43
+ rev: v5.0.0
44
+ hooks:
45
+ - id: trailing-whitespace
46
+ - id: end-of-file-fixer
47
+ - id: check-case-conflict
48
+ - id: check-executables-have-shebangs
49
+ - id: check-json
50
+ - id: check-merge-conflict
51
+ - id: check-shebang-scripts-are-executable
52
+ - id: check-symlinks
53
+ - id: check-toml
54
+ - id: check-vcs-permalinks
55
+ - id: check-yaml
56
+ - id: detect-private-key
57
+ - id: mixed-line-ending
58
+
59
+ - repo: https://github.com/boidolr/pre-commit-images
60
+ rev: v1.8.4
61
+ hooks:
62
+ - id: optimize-jpg
63
+ - id: optimize-png
64
+ - id: optimize-svg
65
+ - id: optimize-webp
66
+
67
+ exclude: "tests/data|tests/platform_independent/data|documentation/reference"
@@ -0,0 +1,5 @@
1
+ # Changelog
2
+
3
+ All major and minor version changes will be documented in this file. Details of
4
+ patch-level version changes can be found in [commit messages](../../commits/master).
5
+
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2026 FredHappyface
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ 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, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.