printaudit 0.8.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 (42) hide show
  1. printaudit-0.8.0/.github/workflows/publish.yml +81 -0
  2. printaudit-0.8.0/.gitignore +207 -0
  3. printaudit-0.8.0/.pre-commit-config.yaml +54 -0
  4. printaudit-0.8.0/LICENSE +674 -0
  5. printaudit-0.8.0/PKG-INFO +305 -0
  6. printaudit-0.8.0/README.md +258 -0
  7. printaudit-0.8.0/docs/analysis_modules.md +697 -0
  8. printaudit-0.8.0/docs/creating_output_modules.md +241 -0
  9. printaudit-0.8.0/docs/cups_page_log_fomart.txt +33 -0
  10. printaudit-0.8.0/docs/logrotate_setup.md +75 -0
  11. printaudit-0.8.0/docs/report_example.txt +161 -0
  12. printaudit-0.8.0/printaudit.conf.sample +46 -0
  13. printaudit-0.8.0/pyproject.toml +212 -0
  14. printaudit-0.8.0/setup.cfg +4 -0
  15. printaudit-0.8.0/src/printaudit/__init__.py +10 -0
  16. printaudit-0.8.0/src/printaudit/__main__.py +6 -0
  17. printaudit-0.8.0/src/printaudit/analysis/__init__.py +5 -0
  18. printaudit-0.8.0/src/printaudit/analysis/aggregator.py +496 -0
  19. printaudit-0.8.0/src/printaudit/cli.py +126 -0
  20. printaudit-0.8.0/src/printaudit/config.py +219 -0
  21. printaudit-0.8.0/src/printaudit/emailer.py +76 -0
  22. printaudit-0.8.0/src/printaudit/outputs/__init__.py +12 -0
  23. printaudit-0.8.0/src/printaudit/outputs/base.py +56 -0
  24. printaudit-0.8.0/src/printaudit/outputs/cli.py +262 -0
  25. printaudit-0.8.0/src/printaudit/outputs/csv_writer.py +144 -0
  26. printaudit-0.8.0/src/printaudit/outputs/email_sender.py +45 -0
  27. printaudit-0.8.0/src/printaudit/outputs/html_report.py +289 -0
  28. printaudit-0.8.0/src/printaudit/parser.py +172 -0
  29. printaudit-0.8.0/src/printaudit/reporting.py +57 -0
  30. printaudit-0.8.0/src/printaudit.egg-info/PKG-INFO +305 -0
  31. printaudit-0.8.0/src/printaudit.egg-info/SOURCES.txt +40 -0
  32. printaudit-0.8.0/src/printaudit.egg-info/dependency_links.txt +1 -0
  33. printaudit-0.8.0/src/printaudit.egg-info/entry_points.txt +8 -0
  34. printaudit-0.8.0/src/printaudit.egg-info/requires.txt +19 -0
  35. printaudit-0.8.0/src/printaudit.egg-info/top_level.txt +1 -0
  36. printaudit-0.8.0/tests/README.md +24 -0
  37. printaudit-0.8.0/tests/__init__.py +1 -0
  38. printaudit-0.8.0/tests/conftest.py +31 -0
  39. printaudit-0.8.0/tests/test_aggregator.py +135 -0
  40. printaudit-0.8.0/tests/test_config.py +95 -0
  41. printaudit-0.8.0/tests/test_integration.py +61 -0
  42. printaudit-0.8.0/tests/test_parser.py +86 -0
@@ -0,0 +1,81 @@
1
+ name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
2
+
3
+ on: push
4
+
5
+ jobs:
6
+ build:
7
+ name: Build distribution 📦
8
+ runs-on: ubuntu-latest
9
+
10
+ steps:
11
+ - uses: actions/checkout@v4
12
+ with:
13
+ persist-credentials: false
14
+ fetch-depth: 0 # Full git history for setuptools-scm
15
+ - name: Set up Python
16
+ uses: actions/setup-python@v5
17
+ with:
18
+ python-version: "3.x"
19
+ - name: Install pypa/build
20
+ run: >-
21
+ python3 -m
22
+ pip install
23
+ build
24
+ --user
25
+ - name: Build a binary wheel and a source tarball
26
+ run: python3 -m build
27
+ - name: Verify package metadata
28
+ run: |
29
+ python3 -m pip install twine --user
30
+ python3 -m twine check dist/*
31
+ - name: Store the distribution packages
32
+ uses: actions/upload-artifact@v4
33
+ with:
34
+ name: python-package-distributions
35
+ path: dist/
36
+
37
+ publish-to-pypi:
38
+ name: >-
39
+ Publish Python 🐍 distribution 📦 to PyPI
40
+ if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
41
+ needs:
42
+ - build
43
+ runs-on: ubuntu-latest
44
+ environment:
45
+ name: pypi
46
+ url: https://pypi.org/p/printaudit
47
+ permissions:
48
+ id-token: write # IMPORTANT: mandatory for trusted publishing
49
+
50
+ steps:
51
+ - name: Download all the dists
52
+ uses: actions/download-artifact@v4
53
+ with:
54
+ name: python-package-distributions
55
+ path: dist/
56
+ - name: Publish distribution 📦 to PyPI
57
+ uses: pypa/gh-action-pypi-publish@release/v1
58
+
59
+ publish-to-testpypi:
60
+ name: Publish Python 🐍 distribution 📦 to TestPyPI
61
+ needs:
62
+ - build
63
+ runs-on: ubuntu-latest
64
+
65
+ environment:
66
+ name: testpypi
67
+ url: https://test.pypi.org/p/printaudit
68
+
69
+ permissions:
70
+ id-token: write # IMPORTANT: mandatory for trusted publishing
71
+
72
+ steps:
73
+ - name: Download all the dists
74
+ uses: actions/download-artifact@v4
75
+ with:
76
+ name: python-package-distributions
77
+ path: dist/
78
+ - name: Publish distribution 📦 to TestPyPI
79
+ uses: pypa/gh-action-pypi-publish@release/v1
80
+ with:
81
+ repository-url: https://test.pypi.org/legacy/
@@ -0,0 +1,207 @@
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
+ # SageMath parsed files
135
+ *.sage.py
136
+
137
+ # Environments
138
+ .env
139
+ .envrc
140
+ .venv
141
+ env/
142
+ venv/
143
+ ENV/
144
+ env.bak/
145
+ venv.bak/
146
+
147
+ # Spyder project settings
148
+ .spyderproject
149
+ .spyproject
150
+
151
+ # Rope project settings
152
+ .ropeproject
153
+
154
+ # mkdocs documentation
155
+ /site
156
+
157
+ # mypy
158
+ .mypy_cache/
159
+ .dmypy.json
160
+ dmypy.json
161
+
162
+ # Pyre type checker
163
+ .pyre/
164
+
165
+ # pytype static type analyzer
166
+ .pytype/
167
+
168
+ # Cython debug symbols
169
+ cython_debug/
170
+
171
+ # PyCharm
172
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
173
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
174
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
175
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
176
+ #.idea/
177
+
178
+ # Abstra
179
+ # Abstra is an AI-powered process automation framework.
180
+ # Ignore directories containing user credentials, local state, and settings.
181
+ # Learn more at https://abstra.io/docs
182
+ .abstra/
183
+
184
+ # Visual Studio Code
185
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
186
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
187
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
188
+ # you could uncomment the following to ignore the entire vscode folder
189
+ # .vscode/
190
+
191
+ # Ruff stuff:
192
+ .ruff_cache/
193
+
194
+ # PyPI configuration file
195
+ .pypirc
196
+
197
+ # Cursor
198
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
199
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
200
+ # refer to https://docs.cursor.com/context/ignore-files
201
+ .cursorignore
202
+ .cursorindexingignore
203
+
204
+ # Marimo
205
+ marimo/_static/
206
+ marimo/_lsp/
207
+ __marimo__/
@@ -0,0 +1,54 @@
1
+ exclude: "^docs/|/migrations/|devcontainer.json"
2
+ default_stages: [pre-commit]
3
+
4
+ default_language_version:
5
+ python: python3.12
6
+
7
+ repos:
8
+ - repo: https://github.com/pre-commit/pre-commit-hooks
9
+ rev: v6.0.0
10
+ hooks:
11
+ - id: trailing-whitespace
12
+ - id: end-of-file-fixer
13
+ - id: check-json
14
+ - id: check-toml
15
+ - id: check-xml
16
+ - id: check-yaml
17
+ - id: debug-statements
18
+ - id: check-builtin-literals
19
+ - id: check-case-conflict
20
+ - id: check-docstring-first
21
+ - id: detect-private-key
22
+
23
+ - repo: https://github.com/adamchainz/django-upgrade
24
+ rev: "1.29.1"
25
+ hooks:
26
+ - id: django-upgrade
27
+ args: ["--target-version", "4.2"]
28
+
29
+ - repo: https://github.com/asottile/pyupgrade
30
+ rev: v3.21.2
31
+ hooks:
32
+ - id: pyupgrade
33
+ args: [--py311-plus]
34
+
35
+ - repo: https://github.com/psf/black
36
+ rev: 25.11.0
37
+ hooks:
38
+ - id: black
39
+
40
+ - repo: https://github.com/PyCQA/isort
41
+ rev: 7.0.0
42
+ hooks:
43
+ - id: isort
44
+
45
+ - repo: https://github.com/PyCQA/flake8
46
+ rev: 7.3.0
47
+ hooks:
48
+ - id: flake8
49
+
50
+ # sets up .pre-commit-ci.yaml to ensure pre-commit dependencies stay up to date
51
+ ci:
52
+ autoupdate_schedule: weekly
53
+ skip: []
54
+ submodules: false