af-credmon 0.1.1__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 (35) hide show
  1. af_credmon-0.1.1/.git_archival.txt +3 -0
  2. af_credmon-0.1.1/.gitattributes +1 -0
  3. af_credmon-0.1.1/.github/dependabot.yml +26 -0
  4. af_credmon-0.1.1/.github/release.yml +5 -0
  5. af_credmon-0.1.1/.github/workflows/cd.yml +61 -0
  6. af_credmon-0.1.1/.github/workflows/ci.yml +101 -0
  7. af_credmon-0.1.1/.github/workflows/docs.yml +80 -0
  8. af_credmon-0.1.1/.gitignore +186 -0
  9. af_credmon-0.1.1/.pre-commit-config.yaml +94 -0
  10. af_credmon-0.1.1/.readthedocs.yaml +17 -0
  11. af_credmon-0.1.1/LICENSE +202 -0
  12. af_credmon-0.1.1/PKG-INFO +198 -0
  13. af_credmon-0.1.1/README.md +169 -0
  14. af_credmon-0.1.1/docs/contributing.md +67 -0
  15. af_credmon-0.1.1/docs/index.md +15 -0
  16. af_credmon-0.1.1/lychee.toml +1 -0
  17. af_credmon-0.1.1/pixi.lock +9585 -0
  18. af_credmon-0.1.1/pixi.toml +99 -0
  19. af_credmon-0.1.1/pyproject.toml +145 -0
  20. af_credmon-0.1.1/src/af_credmon/__init__.py +7 -0
  21. af_credmon-0.1.1/src/af_credmon/_version.py +24 -0
  22. af_credmon-0.1.1/src/af_credmon/daemon.py +194 -0
  23. af_credmon-0.1.1/src/af_credmon/monitor.py +128 -0
  24. af_credmon-0.1.1/src/af_credmon/py.typed +0 -0
  25. af_credmon-0.1.1/src/af_credmon/redeem.py +73 -0
  26. af_credmon-0.1.1/src/af_credmon/topfile.py +71 -0
  27. af_credmon-0.1.1/src/af_credmon/usefile.py +40 -0
  28. af_credmon-0.1.1/tbump.toml +42 -0
  29. af_credmon-0.1.1/tests/test_cli_integration.py +136 -0
  30. af_credmon-0.1.1/tests/test_daemon.py +195 -0
  31. af_credmon-0.1.1/tests/test_monitor.py +183 -0
  32. af_credmon-0.1.1/tests/test_redeem.py +116 -0
  33. af_credmon-0.1.1/tests/test_topfile.py +108 -0
  34. af_credmon-0.1.1/tests/test_usefile.py +71 -0
  35. af_credmon-0.1.1/zensical.toml +82 -0
@@ -0,0 +1,3 @@
1
+ node: $Format:%H$
2
+ node-date: $Format:%cI$
3
+ describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
@@ -0,0 +1 @@
1
+ .git_archival.txt export-subst
@@ -0,0 +1,26 @@
1
+ version: 2
2
+ updates:
3
+ # Maintain dependencies for GitHub Actions
4
+ - package-ecosystem: "github-actions"
5
+ directory: "/"
6
+ schedule:
7
+ interval: "monthly"
8
+ groups:
9
+ github-actions:
10
+ patterns:
11
+ - "*"
12
+ labels:
13
+ - "github-actions"
14
+ - "dependencies"
15
+ cooldown:
16
+ default-days: 7
17
+
18
+ # Ignore all pip dependencies to avoid PRs to update tests/constraints.txt
19
+ - package-ecosystem: "pip"
20
+ directory: "/"
21
+ schedule:
22
+ interval: "weekly"
23
+ ignore:
24
+ - dependency-name: "*"
25
+ cooldown:
26
+ default-days: 7
@@ -0,0 +1,5 @@
1
+ changelog:
2
+ exclude:
3
+ authors:
4
+ - dependabot[bot]
5
+ - pre-commit-ci[bot]
@@ -0,0 +1,61 @@
1
+ name: CD
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ pull_request:
6
+ push:
7
+ branches:
8
+ - main
9
+ release:
10
+ types:
11
+ - published
12
+
13
+ concurrency:
14
+ group: ${{ github.workflow }}-${{ github.ref }}
15
+ cancel-in-progress: true
16
+
17
+ permissions: {}
18
+
19
+ env:
20
+ # Many color libraries just need this to be set to any value, but at least
21
+ # one distinguishes color depth, where "3" -> "256-bit color".
22
+ FORCE_COLOR: 3
23
+
24
+ jobs:
25
+ dist:
26
+ name: Distribution build
27
+ runs-on: ubuntu-latest
28
+ permissions:
29
+ contents: read # checkout only
30
+
31
+ steps:
32
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
33
+ with:
34
+ fetch-depth: 0
35
+ persist-credentials: false
36
+
37
+ - uses: hynek/build-and-inspect-python-package@2abe76da66d0a6a4a227101f9348ee855797cfa5 # v3.0.1
38
+
39
+ publish:
40
+ needs: [dist]
41
+ name: Publish to PyPI
42
+ environment: pypi
43
+ permissions:
44
+ id-token: write # trusted publishing to PyPI
45
+ attestations: write # generate build provenance attestation
46
+ contents: read # download-artifact
47
+ runs-on: ubuntu-latest
48
+ if: github.event_name == 'release' && github.event.action == 'published'
49
+
50
+ steps:
51
+ - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
52
+ with:
53
+ name: Packages
54
+ path: dist
55
+
56
+ - name: Generate artifact attestation for sdist and wheel
57
+ uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
58
+ with:
59
+ subject-path: "dist/*"
60
+
61
+ - uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
@@ -0,0 +1,101 @@
1
+ name: CI
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ pull_request:
6
+ push:
7
+ branches:
8
+ - main
9
+
10
+ concurrency:
11
+ group: ${{ github.workflow }}-${{ github.ref }}
12
+ cancel-in-progress: true
13
+
14
+ permissions: {}
15
+
16
+ env:
17
+ # Many color libraries just need this to be set to any value, but at least
18
+ # one distinguishes color depth, where "3" -> "256-bit color".
19
+ FORCE_COLOR: 3
20
+
21
+ jobs:
22
+ pre-commit:
23
+ name: Format
24
+ runs-on: ubuntu-latest
25
+ permissions:
26
+ contents: read # checkout only
27
+ steps:
28
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
29
+ with:
30
+ fetch-depth: 0
31
+ persist-credentials: false
32
+
33
+ - uses: prefix-dev/setup-pixi@d3f436a425481402e6a95a1d1fc10331c708cd9e # v0.10.2
34
+ with:
35
+ pixi-version: v0.68.1
36
+ cache: true
37
+ cache-key: dev
38
+ cache-write:
39
+ ${{ github.event_name == 'push' && github.ref_name == 'main' }}
40
+ environments: dev
41
+
42
+ - name: Run pre-commit
43
+ run: pixi run pre-commit --stage manual
44
+
45
+ - name: Run PyLint
46
+ run: pixi run pylint --output-format=github
47
+
48
+ checks:
49
+ name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }}
50
+ runs-on: ${{ matrix.runs-on }}
51
+ needs: [pre-commit]
52
+ permissions:
53
+ contents: read # checkout only
54
+ strategy:
55
+ fail-fast: false
56
+ matrix:
57
+ python-version: ["3.11", "3.12", "3.13", "3.14"]
58
+ runs-on: [ubuntu-latest, macos-14]
59
+ include:
60
+ - python-version: "3.11"
61
+ pixi-environment: py311
62
+ - python-version: "3.12"
63
+ pixi-environment: py312
64
+ - python-version: "3.13"
65
+ pixi-environment: py313
66
+ - python-version: "3.14"
67
+ pixi-environment: py314
68
+
69
+ steps:
70
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
71
+ with:
72
+ fetch-depth: 0
73
+ persist-credentials: false
74
+
75
+ - uses: prefix-dev/setup-pixi@d3f436a425481402e6a95a1d1fc10331c708cd9e # v0.10.2
76
+ with:
77
+ pixi-version: v0.68.1
78
+ cache: true
79
+ cache-key: ${{ matrix.pixi-environment }}-${{ github.ref_name }}
80
+ cache-write:
81
+ ${{ github.event_name == 'push' && github.ref_name == 'main' }}
82
+ environments: ${{ matrix.pixi-environment }}
83
+
84
+ - name: Test package
85
+ run: >-
86
+ pixi run -e "$PIXI_ENVIRONMENT" test-all -ra --cov-branch
87
+ --cov-report=xml --cov-report=term --junitxml=junit.xml -o
88
+ junit_family=legacy --durations=20
89
+ env:
90
+ PIXI_ENVIRONMENT: ${{ matrix.pixi-environment }}
91
+
92
+ - name: Upload coverage report
93
+ uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
94
+ with:
95
+ token: ${{ secrets.CODECOV_TOKEN }}
96
+
97
+ - name: Upload test results to Codecov
98
+ if: ${{ !cancelled() }}
99
+ uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
100
+ with:
101
+ token: ${{ secrets.CODECOV_TOKEN }}
@@ -0,0 +1,80 @@
1
+ name: Docs
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ workflow_dispatch:
9
+
10
+ concurrency:
11
+ group: ${{ github.workflow }}-${{ github.ref }}
12
+ cancel-in-progress: true
13
+
14
+ permissions:
15
+ contents: read
16
+
17
+ jobs:
18
+ build:
19
+ name: Build docs
20
+ runs-on: ubuntu-latest
21
+
22
+ steps:
23
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
24
+ with:
25
+ fetch-depth: 0
26
+ persist-credentials: false
27
+
28
+ - uses: prefix-dev/setup-pixi@d3f436a425481402e6a95a1d1fc10331c708cd9e # v0.10.2
29
+ with:
30
+ pixi-version: v0.68.1
31
+ cache: true
32
+ cache-key: docs-${{ github.ref_name }}
33
+ cache-write:
34
+ ${{ github.event_name == 'push' && github.ref_name == 'main' }}
35
+ environments: docs
36
+
37
+ - name: Check docstrings
38
+ run: pixi run check-docstrings
39
+
40
+ - name: Check for broken links
41
+ run: |
42
+ pixi run docs-linkcheck -v --no-progress --format detailed
43
+
44
+ - name: Build docs
45
+ run: pixi run docs-build
46
+
47
+ - name: Fix permissions if needed
48
+ run: |
49
+ chmod -c -R +rX "site/" | while read line; do
50
+ echo "::warning title=Invalid file permissions automatically fixed::$line"
51
+ done
52
+
53
+ - name: Upload artifact
54
+ uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
55
+ with:
56
+ path: "site/"
57
+
58
+ deploy:
59
+ name: Deploy docs to GitHub Pages
60
+ if: github.event_name == 'push' && github.ref == 'refs/heads/main'
61
+ needs: build
62
+ # Set permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
63
+ permissions:
64
+ contents: read
65
+ pages: write # deploy to GitHub Pages
66
+ id-token: write # verify deployment originates from this workflow
67
+
68
+ environment:
69
+ name: github-pages
70
+ url: ${{ steps.deployment.outputs.page_url }}
71
+
72
+ runs-on: ubuntu-latest
73
+
74
+ steps:
75
+ - name: Setup Pages
76
+ uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
77
+
78
+ - name: Deploy to GitHub Pages
79
+ id: deployment
80
+ uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
@@ -0,0 +1,186 @@
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
+ 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
+ cover/
52
+
53
+ # Translations
54
+ *.mo
55
+ *.pot
56
+
57
+ # Django stuff:
58
+ *.log
59
+ local_settings.py
60
+ db.sqlite3
61
+ db.sqlite3-journal
62
+
63
+ # Flask stuff:
64
+ instance/
65
+ .webassets-cache
66
+
67
+ # Scrapy stuff:
68
+ .scrapy
69
+
70
+ # Sphinx documentation
71
+ docs/_build/
72
+
73
+ # PyBuilder
74
+ .pybuilder/
75
+ target/
76
+
77
+ # Jupyter Notebook
78
+ .ipynb_checkpoints
79
+
80
+ # IPython
81
+ profile_default/
82
+ ipython_config.py
83
+
84
+ # pyenv
85
+ # For a library or package, you might want to ignore these files since the code is
86
+ # intended to run in multiple environments; otherwise, check them in:
87
+ # .python-version
88
+
89
+ # pipenv
90
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
91
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
92
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
93
+ # install all needed dependencies.
94
+ #Pipfile.lock
95
+
96
+ # UV
97
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
98
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
99
+ # commonly ignored for libraries.
100
+ #uv.lock
101
+
102
+ # poetry
103
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
104
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
105
+ # commonly ignored for libraries.
106
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
107
+ #poetry.lock
108
+
109
+ # pdm
110
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
111
+ #pdm.lock
112
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
113
+ # in version control.
114
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
115
+ .pdm.toml
116
+ .pdm-python
117
+ .pdm-build/
118
+
119
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
120
+ __pypackages__/
121
+
122
+ # Celery stuff
123
+ celerybeat-schedule
124
+ celerybeat.pid
125
+
126
+ # SageMath parsed files
127
+ *.sage.py
128
+
129
+ # Environments
130
+ .env
131
+ .venv
132
+ env/
133
+ venv/
134
+ ENV/
135
+ env.bak/
136
+ venv.bak/
137
+
138
+ # Spyder project settings
139
+ .spyderproject
140
+ .spyproject
141
+
142
+ # Rope project settings
143
+ .ropeproject
144
+
145
+ # mkdocs documentation
146
+ /site
147
+
148
+ # mypy
149
+ .dmypy.json
150
+ dmypy.json
151
+
152
+ # Pyre type checker
153
+ .pyre/
154
+
155
+ # pytype static type analyzer
156
+ .pytype/
157
+
158
+ # Cython debug symbols
159
+ cython_debug/
160
+
161
+ # PyCharm
162
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
163
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
164
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
165
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
166
+ #.idea/
167
+
168
+ # setuptools_scm
169
+ src/*/_version.py
170
+
171
+
172
+ # Caches
173
+ .*_cache/
174
+
175
+ # OS specific stuff
176
+ .DS_Store
177
+ .DS_Store?
178
+ ._*
179
+ .Spotlight-V100
180
+ .Trashes
181
+ ehthumbs.db
182
+ Thumbs.db
183
+
184
+ # Common editor files
185
+ *~
186
+ *.swp
@@ -0,0 +1,94 @@
1
+ ci:
2
+ autoupdate_commit_msg: "chore(deps): update pre-commit hooks"
3
+ autofix_commit_msg: "style: pre-commit fixes"
4
+ autoupdate_schedule: "monthly"
5
+
6
+ exclude: ^.cruft.json|.copier-answers.yml|pixi.lock$
7
+
8
+ repos:
9
+ - repo: https://github.com/adamchainz/blacken-docs
10
+ rev: "fda77690955e9b63c6687d8806bafd56a526e45f" # frozen: 1.20.0
11
+ hooks:
12
+ - id: blacken-docs
13
+ additional_dependencies: [black==26.*]
14
+
15
+ - repo: https://github.com/pre-commit/pre-commit-hooks
16
+ rev: "3e8a8703264a2f4a69428a0aa4dcb512790b2c8c" # frozen: v6.0.0
17
+ hooks:
18
+ - id: check-added-large-files
19
+ - id: check-case-conflict
20
+ - id: check-merge-conflict
21
+ - id: check-symlinks
22
+ - id: check-yaml
23
+ - id: debug-statements
24
+ - id: end-of-file-fixer
25
+ - id: mixed-line-ending
26
+ - id: name-tests-test
27
+ args: ["--pytest-test-first"]
28
+ - id: trailing-whitespace
29
+
30
+ - repo: https://github.com/rbubley/mirrors-prettier
31
+ rev: "0ee178619d696787ca73d210cc191d720868c631" # frozen: v3.9.6
32
+ hooks:
33
+ - id: prettier
34
+ types_or: [yaml, markdown, html, css, scss, javascript, json]
35
+ args: [--prose-wrap=always]
36
+
37
+ - repo: https://github.com/astral-sh/ruff-pre-commit
38
+ rev: "39d9ac5938dadb73df0564a45f163e25ff9fa6e2" # frozen: v0.16.1
39
+ hooks:
40
+ - id: ruff-check
41
+ args: ["--fix", "--show-fixes"]
42
+ - id: ruff-format
43
+
44
+ - repo: https://github.com/pre-commit/mirrors-mypy
45
+ rev: "41e691678310dfd3833f7ab4e180ddb014310356" # frozen: v2.3.0
46
+ hooks:
47
+ - id: mypy
48
+ files: src|tests
49
+ args: []
50
+ additional_dependencies:
51
+ - pytest
52
+ - af-credentials>=0.3.2
53
+ - httpx2
54
+ - typing_extensions
55
+
56
+ - repo: https://github.com/codespell-project/codespell
57
+ rev: "57b21406f092110c18776e39b0bda50d37c945c8" # frozen: v2.4.3
58
+ hooks:
59
+ - id: codespell
60
+ additional_dependencies:
61
+ - tomli; python_version<'3.11'
62
+
63
+ - repo: https://github.com/shellcheck-py/shellcheck-py
64
+ rev: "745eface02aef23e168a8afb6b5737818efbea95" # frozen: v0.11.0.1
65
+ hooks:
66
+ - id: shellcheck
67
+
68
+ - repo: local
69
+ hooks:
70
+ - id: disallow-caps
71
+ name: Disallow improper capitalization
72
+ language: pygrep
73
+ entry: PyBind|Numpy|Cmake|CCache|Github|PyTest
74
+ exclude: .pre-commit-config.yaml
75
+
76
+ - repo: https://github.com/abravalheri/validate-pyproject
77
+ rev: "4b2e70d08cb2ccd26d1fba73588de41c7a5d50b7" # frozen: v0.25
78
+ hooks:
79
+ - id: validate-pyproject
80
+ additional_dependencies: ["validate-pyproject-schema-store[all]"]
81
+
82
+ - repo: https://github.com/python-jsonschema/check-jsonschema
83
+ rev: "6b63472e72e1a91ed8a2f6d483790dfb644fa1d3" # frozen: 0.37.4
84
+ hooks:
85
+ - id: check-dependabot
86
+ - id: check-github-workflows
87
+ - id: check-readthedocs
88
+
89
+ - repo: https://github.com/zizmorcore/zizmor-pre-commit
90
+ rev: 451b56af716f9f0d0c2b816503a3fd0cf8b036fa # frozen: v1.29.0
91
+ hooks:
92
+ - id: zizmor
93
+ files: "^\\.github"
94
+ args: [--persona=pedantic]
@@ -0,0 +1,17 @@
1
+ # Read the Docs configuration file
2
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3
+
4
+ version: 2
5
+
6
+ build:
7
+ os: ubuntu-24.04
8
+ tools:
9
+ python: "3.13"
10
+ commands:
11
+ - asdf plugin add uv
12
+ - asdf install uv latest
13
+ - asdf global uv latest
14
+ - uv sync --group docs
15
+ - uv run zensical build
16
+ - mkdir -p $READTHEDOCS_OUTPUT/html/
17
+ - cp --recursive site/* $READTHEDOCS_OUTPUT/html/