check-zpools 2.1.5__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 (92) hide show
  1. check_zpools-2.1.5/.devcontainer/devcontainer.json +22 -0
  2. check_zpools-2.1.5/.devcontainer/settings.json +6 -0
  3. check_zpools-2.1.5/.env.example +31 -0
  4. check_zpools-2.1.5/.github/dependabot.yml +22 -0
  5. check_zpools-2.1.5/.github/workflows/ci.yml +199 -0
  6. check_zpools-2.1.5/.github/workflows/codeql.yml +39 -0
  7. check_zpools-2.1.5/.github/workflows/release.yml +50 -0
  8. check_zpools-2.1.5/.gitignore +181 -0
  9. check_zpools-2.1.5/.qlty/qlty.toml +2 -0
  10. check_zpools-2.1.5/.snyk +5 -0
  11. check_zpools-2.1.5/AGENTS.md +104 -0
  12. check_zpools-2.1.5/CHANGELOG.md +328 -0
  13. check_zpools-2.1.5/CLAUDE.md +144 -0
  14. check_zpools-2.1.5/CODE_ARCHITECTURE.md +348 -0
  15. check_zpools-2.1.5/CONTRIBUTING.md +48 -0
  16. check_zpools-2.1.5/DEVELOPMENT.md +134 -0
  17. check_zpools-2.1.5/INSTALL.md +193 -0
  18. check_zpools-2.1.5/LICENSE +22 -0
  19. check_zpools-2.1.5/Makefile +54 -0
  20. check_zpools-2.1.5/PKG-INFO +1146 -0
  21. check_zpools-2.1.5/README.md +1107 -0
  22. check_zpools-2.1.5/codecov.yml +28 -0
  23. check_zpools-2.1.5/docs/examples/check_zpools.service +46 -0
  24. check_zpools-2.1.5/docs/examples/config.toml.example +47 -0
  25. check_zpools-2.1.5/docs/systemdesign/module_reference.md +273 -0
  26. check_zpools-2.1.5/notebooks/Quickstart.ipynb +165 -0
  27. check_zpools-2.1.5/pyproject.toml +118 -0
  28. check_zpools-2.1.5/reset_git_history.sh +54 -0
  29. check_zpools-2.1.5/scripts/__init__.py +3 -0
  30. check_zpools-2.1.5/scripts/__main__.py +7 -0
  31. check_zpools-2.1.5/scripts/_utils.py +636 -0
  32. check_zpools-2.1.5/scripts/build.py +52 -0
  33. check_zpools-2.1.5/scripts/bump.py +32 -0
  34. check_zpools-2.1.5/scripts/bump_major.py +20 -0
  35. check_zpools-2.1.5/scripts/bump_minor.py +20 -0
  36. check_zpools-2.1.5/scripts/bump_patch.py +20 -0
  37. check_zpools-2.1.5/scripts/bump_version.py +80 -0
  38. check_zpools-2.1.5/scripts/clean.py +48 -0
  39. check_zpools-2.1.5/scripts/cli.py +213 -0
  40. check_zpools-2.1.5/scripts/dev.py +19 -0
  41. check_zpools-2.1.5/scripts/help.py +41 -0
  42. check_zpools-2.1.5/scripts/install.py +19 -0
  43. check_zpools-2.1.5/scripts/menu.py +568 -0
  44. check_zpools-2.1.5/scripts/push.py +77 -0
  45. check_zpools-2.1.5/scripts/release.py +90 -0
  46. check_zpools-2.1.5/scripts/run_cli.py +154 -0
  47. check_zpools-2.1.5/scripts/target_metadata.py +174 -0
  48. check_zpools-2.1.5/scripts/test.py +535 -0
  49. check_zpools-2.1.5/scripts/version_current.py +20 -0
  50. check_zpools-2.1.5/src/check_zpools/__init__.py +21 -0
  51. check_zpools-2.1.5/src/check_zpools/__init__conf__.py +74 -0
  52. check_zpools-2.1.5/src/check_zpools/__main__.py +123 -0
  53. check_zpools-2.1.5/src/check_zpools/alert_state.py +372 -0
  54. check_zpools-2.1.5/src/check_zpools/alerting.py +726 -0
  55. check_zpools-2.1.5/src/check_zpools/behaviors.py +427 -0
  56. check_zpools-2.1.5/src/check_zpools/cli.py +1156 -0
  57. check_zpools-2.1.5/src/check_zpools/cli_errors.py +92 -0
  58. check_zpools-2.1.5/src/check_zpools/config.py +128 -0
  59. check_zpools-2.1.5/src/check_zpools/config_deploy.py +112 -0
  60. check_zpools-2.1.5/src/check_zpools/config_show.py +237 -0
  61. check_zpools-2.1.5/src/check_zpools/daemon.py +577 -0
  62. check_zpools-2.1.5/src/check_zpools/defaultconfig.toml +672 -0
  63. check_zpools-2.1.5/src/check_zpools/formatters.py +287 -0
  64. check_zpools-2.1.5/src/check_zpools/logging_setup.py +127 -0
  65. check_zpools-2.1.5/src/check_zpools/mail.py +430 -0
  66. check_zpools-2.1.5/src/check_zpools/models.py +485 -0
  67. check_zpools-2.1.5/src/check_zpools/monitor.py +453 -0
  68. check_zpools-2.1.5/src/check_zpools/py.typed +0 -0
  69. check_zpools-2.1.5/src/check_zpools/service_install.py +612 -0
  70. check_zpools-2.1.5/src/check_zpools/zfs_client.py +351 -0
  71. check_zpools-2.1.5/src/check_zpools/zfs_parser.py +644 -0
  72. check_zpools-2.1.5/tests/conftest.py +196 -0
  73. check_zpools-2.1.5/tests/test_alert_state.py +631 -0
  74. check_zpools-2.1.5/tests/test_alerting.py +460 -0
  75. check_zpools-2.1.5/tests/test_behaviors.py +364 -0
  76. check_zpools-2.1.5/tests/test_cli.py +1017 -0
  77. check_zpools-2.1.5/tests/test_cli_errors.py +237 -0
  78. check_zpools-2.1.5/tests/test_config_deploy.py +303 -0
  79. check_zpools-2.1.5/tests/test_daemon.py +773 -0
  80. check_zpools-2.1.5/tests/test_formatters.py +1136 -0
  81. check_zpools-2.1.5/tests/test_mail.py +573 -0
  82. check_zpools-2.1.5/tests/test_metadata.py +101 -0
  83. check_zpools-2.1.5/tests/test_models.py +643 -0
  84. check_zpools-2.1.5/tests/test_module_entry.py +164 -0
  85. check_zpools-2.1.5/tests/test_monitor.py +710 -0
  86. check_zpools-2.1.5/tests/test_scripts.py +266 -0
  87. check_zpools-2.1.5/tests/test_zfs_parser.py +445 -0
  88. check_zpools-2.1.5/tests/zpool_list_ok_sample.json +81 -0
  89. check_zpools-2.1.5/tests/zpool_list_sample.md +3 -0
  90. check_zpools-2.1.5/tests/zpool_status_degraded.json +32 -0
  91. check_zpools-2.1.5/tests/zpool_status_sample.md +2 -0
  92. check_zpools-2.1.5/tests/zpool_status_with_errors.json +32 -0
@@ -0,0 +1,22 @@
1
+ {
2
+ "image": "mcr.microsoft.com/devcontainers/python:3.13",
3
+
4
+ "postCreateCommand": "bash -lc '\nPY=/usr/local/bin/python;\n$PY -m pip install -U pip && \\\n$PY -m pip install ipykernel && \\\n$PY -m pip install -e . && \\\n# register kernel using this exact interpreter\n$PY -m ipykernel install --name=python3 --display-name=\"Python 3 (3.13)\" --user && \\\n# patch the notebook to point to the python3 kernelspec (VS Code will bind to /usr/local/bin/python)\n$PY - <<\"PY\"\nimport json, pathlib\np = pathlib.Path(\"notebooks/Quickstart.ipynb\")\nif p.exists():\n nb = json.loads(p.read_text(encoding=\"utf-8\"))\n md = nb.setdefault(\"metadata\", {})\n md[\"kernelspec\"] = {\n \"name\": \"python3\",\n \"display_name\": \"Python 3 (3.13)\",\n \"language\": \"python\"\n }\n md[\"language_info\"] = {\"name\": \"python\"}\n p.write_text(json.dumps(nb, ensure_ascii=False, indent=1), encoding=\"utf-8\")\n print(\"Pinned kernelspec to python3 in\", p)\nelse:\n print(\"Notebook not found:\", p)\nPY'\n",
5
+
6
+ "customizations": {
7
+ "vscode": {
8
+ "extensions": ["ms-toolsai.jupyter", "ms-python.python"],
9
+ "settings": {
10
+ "workbench.startupEditor": "none",
11
+ "jupyter.alwaysTrustNotebooks": true,
12
+ "jupyter.kernelPickerType": "OnlyRecommended",
13
+ "python.defaultInterpreterPath": "/usr/local/bin/python"
14
+ }
15
+ },
16
+ "codespaces": {
17
+ "openFiles": ["README.md"]
18
+ }
19
+ },
20
+
21
+ "postAttachCommand": "bash -lc 'if [ -f notebooks/Quickstart.ipynb ]; then code -r notebooks/Quickstart.ipynb; fi'"
22
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "python.defaultInterpreterPath": "/usr/local/bin/python3.13",
3
+ "jupyter.alwaysTrustNotebooks": true,
4
+ "jupyter.kernelPickerType": "OnlyRecommended",
5
+ "jupyter.askForKernelRestart": false
6
+ }
@@ -0,0 +1,31 @@
1
+ # Copy to .env and fill values as needed.
2
+
3
+ # Codecov upload token (required for private repos; optional for public repos)
4
+ CODECOV_TOKEN=
5
+
6
+ # PyPI API token for release workflow (.github/workflows/release.yml)
7
+ # Format: pypi-AgENdGVzdC5weXBpLm9yZwIk...
8
+ PYPI_API_TOKEN=
9
+
10
+ # Optional: GitHub token for API-limited tasks
11
+ GITHUB_TOKEN=
12
+
13
+ # Email configuration (for sending notifications)
14
+ # SMTP host in format "host:port" - can be comma-separated for multiple hosts
15
+ # CHECK_ZPOOLS_EMAIL_SMTP_HOSTS=smtp.gmail.com:587,smtp.backup.com:587
16
+
17
+ # Default sender address for outgoing emails
18
+ # CHECK_ZPOOLS_EMAIL_FROM_ADDRESS=noreply@example.com
19
+
20
+ # SMTP authentication credentials (optional, both needed for auth)
21
+ # CHECK_ZPOOLS_EMAIL_SMTP_USERNAME=your-email@example.com
22
+ # **SECURITY**: Store password via environment variable, never in .env files committed to git!
23
+ # CHECK_ZPOOLS_EMAIL_SMTP_PASSWORD=your-app-password
24
+
25
+ # SMTP connection settings
26
+ # CHECK_ZPOOLS_EMAIL_USE_STARTTLS=true
27
+ # CHECK_ZPOOLS_EMAIL_TIMEOUT=30.0
28
+
29
+ # Test SMTP server (for local testing)
30
+ # TEST_SMTP_SERVER=
31
+ # TEST_EMAIL_ADDRESS=
@@ -0,0 +1,22 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "pip"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
7
+ allow:
8
+ - dependency-type: "direct"
9
+ labels:
10
+ - "dependencies"
11
+ commit-message:
12
+ prefix: "deps"
13
+ include: "scope"
14
+ - package-ecosystem: "github-actions"
15
+ directory: "/"
16
+ schedule:
17
+ interval: "weekly"
18
+ labels:
19
+ - "dependencies"
20
+ commit-message:
21
+ prefix: "deps"
22
+ include: "scope"
@@ -0,0 +1,199 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ main, master ]
6
+ pull_request:
7
+ branches: [ main, master ]
8
+ schedule:
9
+ # Run daily at 3:17 AM UTC (off-peak hours, odd minute to avoid congestion)
10
+ - cron: '17 3 * * *'
11
+
12
+ jobs:
13
+ test:
14
+ name: Tests (Python ${{ matrix.python }}, ${{ matrix.os }})
15
+ runs-on: ${{ matrix.os }}
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ os: [ubuntu-latest, macos-latest, windows-latest]
20
+ # Test against Python 3.13 and the latest 3.x available on Actions runners
21
+ python: ["3.13", "3.x"]
22
+ env:
23
+ PYO3_USE_ABI3_FORWARD_COMPATIBILITY: "1"
24
+ steps:
25
+ - uses: actions/checkout@v5
26
+ - uses: actions/setup-python@v6
27
+ with:
28
+ python-version: ${{ matrix.python }}
29
+ cache: 'pip'
30
+ cache-dependency-path: 'pyproject.toml'
31
+ - name: Install uv
32
+ uses: astral-sh/setup-uv@v7
33
+ with:
34
+ enable-cache: true
35
+ - name: Extract project metadata
36
+ shell: python
37
+ run: |
38
+ import os
39
+ import tomllib
40
+ from pathlib import Path
41
+
42
+ data = tomllib.loads(Path('pyproject.toml').read_text('utf-8'))
43
+ project = data['project']['name']
44
+ module = project.replace('-', '_')
45
+ dash = project.replace('_', '-')
46
+ scripts = list(data['project'].get('scripts', {}).keys())
47
+ cli_bin = scripts[0] if scripts else dash
48
+
49
+ with open(os.environ['GITHUB_ENV'], 'a', encoding='utf-8') as env:
50
+ env.write(f"PROJECT_NAME={project}\n")
51
+ env.write(f"PACKAGE_MODULE={module}\n")
52
+ env.write(f"CLI_BIN={cli_bin}\n")
53
+ - name: Install make on Windows
54
+ if: runner.os == 'Windows'
55
+ shell: pwsh
56
+ run: |
57
+ choco install -y make
58
+ echo "C:\\ProgramData\\chocolatey\\bin" >> $env:GITHUB_PATH
59
+ - name: Install journald prerequisites
60
+ if: runner.os == 'Linux'
61
+ shell: bash
62
+ run: |
63
+ sudo apt-get update
64
+ sudo apt-get install -y python3-systemd
65
+
66
+ - name: Upgrade pip
67
+ shell: bash
68
+ run: python -m pip install --upgrade pip
69
+
70
+ - name: Install dev deps
71
+ shell: bash
72
+ run: |
73
+ uv pip install -e .[dev] --system
74
+
75
+ - name: Install Windows Event Log prerequisites
76
+ if: runner.os == 'Windows'
77
+ shell: bash
78
+ run: |
79
+ uv pip install pywin32 --system
80
+ - name: Cache ruff
81
+ uses: actions/cache@v4
82
+ with:
83
+ path: .ruff_cache
84
+ key: ruff-${{ runner.os }}-${{ hashFiles('**/*.py') }}
85
+ restore-keys: |
86
+ ruff-${{ runner.os }}-
87
+ - name: Cache pyright
88
+ uses: actions/cache@v4
89
+ with:
90
+ path: .pyright
91
+ key: pyright-${{ runner.os }}-py${{ matrix.python }}-${{ hashFiles('**/*.py', 'pyproject.toml') }}
92
+ restore-keys: |
93
+ pyright-${{ runner.os }}-py${{ matrix.python }}-
94
+ pyright-${{ runner.os }}-
95
+ - name: Run full test suite (lint, types, tests, coverage, codecov)
96
+ shell: bash
97
+ env:
98
+ TEST_VERBOSE: "1"
99
+ run: make test
100
+ - name: Build wheel/sdist
101
+ shell: bash
102
+ run: python -m build
103
+ - name: Verify wheel install in clean env
104
+ shell: bash
105
+ run: |
106
+ python -m venv .venv_wheel
107
+ . .venv_wheel/bin/activate 2>/dev/null || . .venv_wheel/Scripts/activate 2>/dev/null
108
+ pip install dist/*.whl
109
+ "$CLI_BIN" --version 2>/dev/null || python -m "$PACKAGE_MODULE" --version
110
+
111
+ pipx-uv:
112
+ name: pipx/uv verification (ubuntu)
113
+ runs-on: ubuntu-latest
114
+ steps:
115
+ - uses: actions/checkout@v5
116
+ - uses: actions/setup-python@v6
117
+ with:
118
+ python-version: "3.13"
119
+ cache: 'pip'
120
+ cache-dependency-path: 'pyproject.toml'
121
+ - name: Extract project metadata
122
+ shell: python
123
+ run: |
124
+ import os
125
+ import tomllib
126
+ from pathlib import Path
127
+
128
+ data = tomllib.loads(Path('pyproject.toml').read_text('utf-8'))
129
+ project = data['project']['name']
130
+ module = project.replace('-', '_')
131
+ dash = project.replace('_', '-')
132
+ scripts = list(data['project'].get('scripts', {}).keys())
133
+ cli_bin = scripts[0] if scripts else dash
134
+
135
+ with open(os.environ['GITHUB_ENV'], 'a', encoding='utf-8') as env:
136
+ env.write(f"PROJECT_NAME={project}\n")
137
+ env.write(f"PACKAGE_MODULE={module}\n")
138
+ env.write(f"CLI_BIN={cli_bin}\n")
139
+ - name: Build wheel
140
+ run: |
141
+ python -m pip install --upgrade pip build
142
+ python -m build
143
+ - name: pipx install from wheel
144
+ run: |
145
+ python -m pip install pipx
146
+ pipx install dist/*.whl
147
+ "$CLI_BIN" --version 2>/dev/null || python -m "$PACKAGE_MODULE" --version
148
+ - name: Install uv
149
+ uses: astral-sh/setup-uv@v7
150
+ with:
151
+ enable-cache: true
152
+ - name: uv tool install
153
+ run: |
154
+ uv tool install .
155
+ "$CLI_BIN" --version 2>/dev/null || python -m "$PACKAGE_MODULE" --version
156
+
157
+ notebooks:
158
+ name: Execute notebooks (ubuntu, Python 3.13)
159
+ runs-on: ubuntu-latest
160
+ steps:
161
+ - uses: actions/checkout@v5
162
+ - uses: actions/setup-python@v6
163
+ with:
164
+ python-version: "3.13"
165
+ cache: 'pip'
166
+ cache-dependency-path: 'pyproject.toml'
167
+ - name: Install notebook runner deps
168
+ run: |
169
+ python -m pip install --upgrade pip
170
+ pip install nbclient nbformat ipykernel jupyter_client
171
+ python -m ipykernel install --user --name python3 --display-name "Python 3"
172
+ - name: Execute Quickstart notebook
173
+ env:
174
+ PIP_DISABLE_PIP_VERSION_CHECK: "1"
175
+ PIP_NO_INPUT: "1"
176
+ run: |
177
+ python - << 'PY'
178
+ from pathlib import Path
179
+
180
+ import nbformat
181
+ from nbclient import NotebookClient
182
+
183
+ nb_path = Path('notebooks/Quickstart.ipynb')
184
+ if not nb_path.exists():
185
+ raise SystemExit(f"Notebook not found: {nb_path}")
186
+
187
+ notebook = nbformat.read(nb_path, as_version=4)
188
+ client = NotebookClient(
189
+ notebook,
190
+ timeout=900,
191
+ kernel_name='python3',
192
+ allow_errors=False,
193
+ )
194
+ client.execute()
195
+
196
+ out_path = Path('notebooks/Quickstart-executed.ipynb')
197
+ nbformat.write(notebook, out_path)
198
+ print(f"Executed notebook written to: {out_path}")
199
+ PY
@@ -0,0 +1,39 @@
1
+ name: CodeQL
2
+
3
+ on:
4
+ push:
5
+ branches: [ main, master ]
6
+ pull_request:
7
+ branches: [ main, master ]
8
+ schedule:
9
+ - cron: '0 8 * * 1'
10
+
11
+ jobs:
12
+ analyze:
13
+ name: CodeQL Analyze
14
+ runs-on: ubuntu-latest
15
+ permissions:
16
+ actions: read
17
+ contents: read
18
+ security-events: write
19
+ strategy:
20
+ fail-fast: false
21
+ matrix:
22
+ language: [ 'python' ]
23
+
24
+ steps:
25
+ - name: Checkout repository
26
+ uses: actions/checkout@v5
27
+
28
+ - name: Initialize CodeQL
29
+ uses: github/codeql-action/init@v4
30
+ with:
31
+ languages: ${{ matrix.language }}
32
+
33
+ - name: Autobuild
34
+ uses: github/codeql-action/autobuild@v4
35
+
36
+ - name: Perform CodeQL Analysis
37
+ uses: github/codeql-action/analyze@v4
38
+ with:
39
+ category: "/language:${{ matrix.language }}"
@@ -0,0 +1,50 @@
1
+ name: Release
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ push:
7
+ tags:
8
+ - 'v*'
9
+ workflow_dispatch: {}
10
+
11
+ jobs:
12
+ build-and-publish:
13
+ runs-on: ubuntu-latest
14
+ permissions:
15
+ contents: read
16
+ steps:
17
+ - uses: actions/checkout@v5
18
+ - name: Verify PyPI token is set
19
+ run: |
20
+ if [ -z "${{ secrets.PYPI_API_TOKEN }}" ]; then
21
+ echo "::error title=Missing PyPI token::Set the PYPI_API_TOKEN secret in GitHub repository settings to enable PyPI publishing on releases."
22
+ echo "See: https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions"
23
+ exit 1
24
+ fi
25
+ - uses: actions/setup-python@v6
26
+ with:
27
+ python-version: '3.13'
28
+ cache: 'pip'
29
+ cache-dependency-path: 'pyproject.toml'
30
+ - name: Install uv
31
+ uses: astral-sh/setup-uv@v7
32
+ with:
33
+ enable-cache: true
34
+ - name: Build artifacts
35
+ run: |
36
+ python -m pip install --upgrade pip
37
+ uv pip install build --system
38
+ python -m build
39
+ - name: Publish to PyPI
40
+ # Use the rolling major tag to get latest Twine/standards support (e.g., Core Metadata 2.4)
41
+ uses: pypa/gh-action-pypi-publish@release/v1
42
+ with:
43
+ password: ${{ secrets.PYPI_API_TOKEN }}
44
+ attestations: false
45
+ skip-existing: true
46
+ - name: Upload artifacts
47
+ uses: actions/upload-artifact@v5
48
+ with:
49
+ name: dist
50
+ path: dist/*
@@ -0,0 +1,181 @@
1
+ # ====================================
2
+ # ROTEK SPEZIFISCH: Git commands you might run once
3
+ # git add .gitignore && git commit -m "Ignore IDE settings"
4
+ # git push
5
+ # git rm -r --cached .idea
6
+ # git commit -m "Remove .idea and add to .gitignore"
7
+ # git push
8
+ # alternative : BE CAREFUL: overwrites remote history
9
+ # git push origin master --force
10
+
11
+ # ====================================
12
+ # APP
13
+ # ====================================
14
+ website/build/
15
+ website/.docusaurus/
16
+ website/node_modules/
17
+ node_modules/
18
+ web-local-preview/
19
+ translation_app*.log
20
+ translation_web*.log
21
+ tmp_github_web_pages/
22
+ tmp_linkcheck_web_pages/
23
+ .eslintcache
24
+ .vitest/
25
+ npm-debug.log*
26
+ yarn-error.log*
27
+ pnpm-debug.log*
28
+ .env.*
29
+ !.env.example
30
+ todo.md
31
+ tmp_*
32
+
33
+ # ====================================
34
+ # IDEs & Editors
35
+ # ====================================
36
+ # IntelliJ, PyCharm, etc.
37
+ .idea/
38
+ # VS Code workspace settings
39
+ .vscode/
40
+ *.code-workspace
41
+
42
+ # ====================================
43
+ # Python bytecode & caches
44
+ # ====================================
45
+ # __pycache__: compiled .pyc files at any depth
46
+ # *.py[cod]: catches .pyc, .pyo, .pyd
47
+ __pycache__/
48
+ *.py[cod]
49
+ *$py.class # other compiled artifacts
50
+
51
+ # pytest, coverage, MyPy, Hypothesis
52
+ .pytest_cache/
53
+ .mypy_cache/
54
+ .pyright/
55
+ .coverage*
56
+ htmlcov/
57
+ nosetests.xml
58
+ coverage.xml
59
+ *.cover
60
+ .hypothesis/
61
+ .tox/
62
+ .nox/
63
+
64
+ # general cache directories (any project-level caching)
65
+ .cache/
66
+ .run/
67
+ .import_linter_cache/
68
+
69
+ # ====================================
70
+ # Build & distribution artifacts
71
+ # ====================================
72
+ # source/package builds
73
+ build/
74
+ dist/
75
+ *.egg-info/ # metadata for pip installs
76
+ *.egg
77
+ *.whl
78
+ pip-wheel-metadata/
79
+ *.manifest # PyInstaller metadata
80
+ *.spec # PyInstaller spec files
81
+
82
+ # Eggs, parts, wheels, sdist, etc.
83
+ develop-eggs/
84
+ .eggs/
85
+ parts/
86
+ sdist/
87
+ wheels/
88
+ downloads/
89
+ var/
90
+
91
+ # pip logs & installer leftovers
92
+ pip-log.txt
93
+ pip-delete-this-directory.txt
94
+ .installed.cfg
95
+
96
+ # ====================================
97
+ # Virtual environments & secrets
98
+ # ====================================
99
+ # common venv folder names
100
+ env/
101
+ venv/
102
+ ENV/
103
+ .venv/
104
+ # backups, alternate names
105
+ env.bak/
106
+ venv.bak/
107
+ # dotenv files with credentials
108
+ .env
109
+
110
+ # ====================================
111
+ # Project-specific & framework files
112
+ # ====================================
113
+ # Django logs & local overrides
114
+ *.log
115
+ local_settings.py
116
+
117
+ # Flask instance folder
118
+ instance/
119
+ .webassets-cache
120
+
121
+ # Scrapy cache
122
+ .scrapy
123
+
124
+ # Sphinx docs
125
+ docs/_build/
126
+
127
+ # PyBuilder output
128
+ target/
129
+
130
+ # Jupyter notebooks checkpoints
131
+ .ipynb_checkpoints
132
+
133
+ # pyenv Python version file
134
+ .python-version
135
+
136
+ # Celery beat schedule
137
+ celerybeat-schedule
138
+
139
+ # SageMath parsed files
140
+ *.sage.py
141
+
142
+ # Spyder IDE
143
+ .spyderproject
144
+ .spyproject
145
+
146
+ # Rope IDE
147
+ .ropeproject
148
+
149
+ # MkDocs static site folder
150
+ /site
151
+
152
+ # ====================================
153
+ # OS-specific files
154
+ # ====================================
155
+ # macOS
156
+ .DS_Store
157
+ # Windows
158
+ Thumbs.db
159
+ ehthumbs.db
160
+
161
+ # Archives
162
+ *.zip
163
+
164
+ # Thunderbird build artifact (created temporarily by pack script)
165
+ sources/manifest.json
166
+
167
+ # ====================================
168
+ # Tool-specific extras
169
+ # ====================================
170
+ # Codecov uploader script (downloaded during local uploads)
171
+ codecov.sh
172
+ codecov.xml
173
+
174
+ # Nix build result symlink
175
+ result
176
+
177
+ # Optional lockfiles (for alternative managers)
178
+ poetry.lock
179
+ pdm.lock
180
+ uv.lock
181
+ /.github.bak/
@@ -0,0 +1,2 @@
1
+ exclude_patterns = ["scripts/**"]
2
+ test_patterns = ["tests/**"]
@@ -0,0 +1,5 @@
1
+ # Snyk (https://snyk.io) policy file
2
+ exclude:
3
+ global:
4
+ - scripts/**
5
+ - tests/**
@@ -0,0 +1,104 @@
1
+ # Repository Guidelines
2
+
3
+ ## On session start
4
+
5
+ - Read following files from directory /media/srv-main/softdev/*/projects/softwarestack/systemprompts and keep their guidance in working memory:
6
+ - core_programming_solid.md
7
+ - bash_clean_architecture.md
8
+ - bash_clean_code.md
9
+ - bash_small_functions.md
10
+ - python_solid_architecture_enforcer.md
11
+ - python_clean_architecture.md
12
+ - python_clean_code.md
13
+ - python_small_functions_style.md
14
+ - python_libraries_to_use.md
15
+ - python_structure_template.md
16
+ - self_documenting.md
17
+ - self_documenting_template.md
18
+ - python_jupyter_notebooks.md
19
+ - python_testing.md
20
+
21
+ always apply those Rules :
22
+
23
+ - core_programming_solid.md
24
+
25
+ when writing or refracturing Bash scripts, apply those Rules :
26
+
27
+ - core_programming_solid.md
28
+ - bash_clean_architecture.md
29
+ - bash_clean_code.md
30
+ - bash_small_functions.md
31
+
32
+ when writing or refracturing Python scripts, apply those Rules :
33
+ - core_programming_solid.md
34
+ - python_solid_architecture_enforcer.md
35
+ - python_clean_architecture.md
36
+ - python_clean_code.md
37
+ - python_small_functions_style.md
38
+ - python_libraries_to_use.md
39
+ - python_lib_structure_template.md
40
+
41
+ ## Project Structure & Module Organization
42
+
43
+ - `src/check_zpools/`: Python package
44
+ - `scripts/`: shared automation
45
+ - `tests/`: test suite
46
+
47
+
48
+ ### Versioning & Releases
49
+
50
+ - Single source of truth for the package version is `pyproject.toml` (`[project].version`).
51
+ - Automation rewrites `src/check_zpools/__init__conf__.py` from `pyproject.toml`, so runtime code imports generated constants instead of querying `importlib.metadata`.
52
+ - After updating project metadata (version, summary, URLs, authors) run `make test` (or `python -m scripts.test`) to regenerate the metadata module before committing.
53
+ - Tag releases `vX.Y.Z` and push tags; CI will build artifacts and publish when configured.
54
+
55
+ ### Common Make Targets (Alphabetical)
56
+
57
+
58
+ | Target | One-line description |
59
+ |-------------------|--------------------------------------------------------------------------------|
60
+ | `build` | Build wheel/sdist artifacts. |
61
+ | `bump` | Bump version (VERSION=X.Y.Z or PART=major\|minor\|patch) and update changelog. |
62
+ | `bump-major` | Increment major version ((X+1).0.0). |
63
+ | `bump-minor` | Increment minor version (X.Y.Z → X.(Y+1).0). |
64
+ | `bump-patch` | Increment patch version (X.Y.Z → X.Y.(Z+1)). |
65
+ | `clean` | Remove caches, coverage, and build artifacts (includes `dist/` and `build/`). |
66
+ | `dev` | Install package with dev extras. |
67
+ | `help` | Show this table. |
68
+ | `install` | Editable install. |
69
+ | `menu` | Interactive TUI menu (make menu). |
70
+ | `push` | Commit changes once and push to GitHub (no CI monitoring). |
71
+ | `release` | Tag vX.Y.Z, push, sync packaging, run gh release if available. |
72
+ | `run` | Run module entry (`python -m ... --help`). |
73
+ | `test` | Lint, format, type-check, run tests with coverage, upload to Codecov. |
74
+ | `version-current` | Print current version from `pyproject.toml`. |
75
+
76
+
77
+ ## Coding Style & Naming Conventions
78
+ - apply python_clean_code.md
79
+
80
+
81
+ ## Commit & Pull Request Guidelines
82
+
83
+ ## Architecture Overview
84
+ - apply python_clean_architecture.md
85
+
86
+ ## Security & Configuration Tips
87
+ - `.env` is only for local tooling (CodeCov tokens, etc.); do not commit secrets.
88
+ - Rich logging should sanitize payloads before rendering once implemented.
89
+
90
+ ## Translations (Docs)
91
+
92
+ ## Translations (App UI Strings)
93
+
94
+ ## Changes in WEB Documentation
95
+ - when asked to update website documentation - only do that in the english docs under /website/docs because other languages will be translated automatically,
96
+ unless stated otherwise by the user. In doubt - ask the user
97
+
98
+ ## Changes in APP Strings
99
+ - when i18 strings are changed, only to that in sources/\_locales/en because other languages will be translated automatically,
100
+ unless stated otherwise by the user. In doubt - ask the user
101
+
102
+ ## commit/push/GitHub policy
103
+ - run "make test" before any push to avoid lint/test breakage.
104
+ - after push, monitor errors in the github actions and try to correct the errors