bitranox-template-py-cli 1.0.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 (48) hide show
  1. bitranox_template_py_cli-1.0.0/.env.example +18 -0
  2. bitranox_template_py_cli-1.0.0/.github/workflows/ci.yml +219 -0
  3. bitranox_template_py_cli-1.0.0/.github/workflows/codeql.yml +40 -0
  4. bitranox_template_py_cli-1.0.0/.github/workflows/release.yml +42 -0
  5. bitranox_template_py_cli-1.0.0/.gitignore +179 -0
  6. bitranox_template_py_cli-1.0.0/AGENTS.md +131 -0
  7. bitranox_template_py_cli-1.0.0/CHANGELOG.md +12 -0
  8. bitranox_template_py_cli-1.0.0/CONTRIBUTING.md +51 -0
  9. bitranox_template_py_cli-1.0.0/DEVELOPMENT.md +153 -0
  10. bitranox_template_py_cli-1.0.0/LICENSE +22 -0
  11. bitranox_template_py_cli-1.0.0/Makefile +104 -0
  12. bitranox_template_py_cli-1.0.0/PKG-INFO +224 -0
  13. bitranox_template_py_cli-1.0.0/README.md +192 -0
  14. bitranox_template_py_cli-1.0.0/codecov.yml +28 -0
  15. bitranox_template_py_cli-1.0.0/concept.md +312 -0
  16. bitranox_template_py_cli-1.0.0/docs/systemdesign/module_reference.md +136 -0
  17. bitranox_template_py_cli-1.0.0/notebooks/Quickstart.ipynb +129 -0
  18. bitranox_template_py_cli-1.0.0/packaging/README.md +68 -0
  19. bitranox_template_py_cli-1.0.0/packaging/brew/Formula/bitranox-template-py-cli.rb +34 -0
  20. bitranox_template_py_cli-1.0.0/packaging/conda/recipe/meta.yaml +48 -0
  21. bitranox_template_py_cli-1.0.0/packaging/nix/flake.nix +89 -0
  22. bitranox_template_py_cli-1.0.0/pyproject.toml +82 -0
  23. bitranox_template_py_cli-1.0.0/qlty.toml +2 -0
  24. bitranox_template_py_cli-1.0.0/scripts/__init__.py +3 -0
  25. bitranox_template_py_cli-1.0.0/scripts/_utils.py +255 -0
  26. bitranox_template_py_cli-1.0.0/scripts/build.py +45 -0
  27. bitranox_template_py_cli-1.0.0/scripts/bump.py +27 -0
  28. bitranox_template_py_cli-1.0.0/scripts/bump_major.py +17 -0
  29. bitranox_template_py_cli-1.0.0/scripts/bump_minor.py +17 -0
  30. bitranox_template_py_cli-1.0.0/scripts/bump_patch.py +17 -0
  31. bitranox_template_py_cli-1.0.0/scripts/bump_version.py +447 -0
  32. bitranox_template_py_cli-1.0.0/scripts/clean.py +47 -0
  33. bitranox_template_py_cli-1.0.0/scripts/dev.py +18 -0
  34. bitranox_template_py_cli-1.0.0/scripts/install.py +19 -0
  35. bitranox_template_py_cli-1.0.0/scripts/menu.py +658 -0
  36. bitranox_template_py_cli-1.0.0/scripts/push.py +59 -0
  37. bitranox_template_py_cli-1.0.0/scripts/release.py +108 -0
  38. bitranox_template_py_cli-1.0.0/scripts/run_cli.py +26 -0
  39. bitranox_template_py_cli-1.0.0/scripts/test.py +289 -0
  40. bitranox_template_py_cli-1.0.0/scripts/version_current.py +22 -0
  41. bitranox_template_py_cli-1.0.0/src/bitranox_template_py_cli/__init__.py +5 -0
  42. bitranox_template_py_cli-1.0.0/src/bitranox_template_py_cli/__init__conf__.py +108 -0
  43. bitranox_template_py_cli-1.0.0/src/bitranox_template_py_cli/__main__.py +21 -0
  44. bitranox_template_py_cli-1.0.0/src/bitranox_template_py_cli/bitranox_template_py_cli.py +13 -0
  45. bitranox_template_py_cli-1.0.0/src/bitranox_template_py_cli/cli.py +65 -0
  46. bitranox_template_py_cli-1.0.0/src/bitranox_template_py_cli/py.typed +0 -0
  47. bitranox_template_py_cli-1.0.0/tests/test_basic.py +129 -0
  48. bitranox_template_py_cli-1.0.0/tests/test_scripts.py +104 -0
@@ -0,0 +1,18 @@
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 (e.g., brew audits against GitHub API)
11
+ GITHUB_TOKEN=
12
+
13
+ # Optional: Anaconda/conda-forge token if you automate conda uploads (not included in CI)
14
+ ANACONDA_API_TOKEN=
15
+
16
+ # Optional: Homebrew resources may be fetched via GitHub; token can increase rate limits
17
+ HOMEBREW_GITHUB_API_TOKEN=
18
+
@@ -0,0 +1,219 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ main, master ]
6
+ pull_request:
7
+ branches: [ main, master ]
8
+
9
+ jobs:
10
+ test:
11
+ name: Tests (Python ${{ matrix.python }}, ${{ matrix.os }})
12
+ runs-on: ${{ matrix.os }}
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ os: [ubuntu-latest, macos-latest, windows-latest]
17
+ # Test against Python 3.10 and the latest 3.x available on Actions runners
18
+ python: ["3.10", "3.x"]
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+ - uses: actions/setup-python@v5
22
+ with:
23
+ python-version: ${{ matrix.python }}
24
+ - name: Install make on Windows
25
+ if: runner.os == 'Windows'
26
+ shell: pwsh
27
+ run: |
28
+ choco install -y make
29
+ echo "C:\\ProgramData\\chocolatey\\bin" >> $env:GITHUB_PATH
30
+ - name: Install dev deps
31
+ shell: bash
32
+ run: |
33
+ python -m pip install --upgrade pip
34
+ pip install -e .[dev]
35
+ - name: Run full test suite (lint, types, tests, coverage, codecov)
36
+ shell: bash
37
+ run: make test
38
+ - name: Build wheel/sdist
39
+ shell: bash
40
+ run: python -m build
41
+ - name: Verify wheel install in clean env
42
+ shell: bash
43
+ run: |
44
+ python -m venv .venv_wheel
45
+ . .venv_wheel/bin/activate 2>/dev/null || . .venv_wheel/Scripts/activate 2>/dev/null
46
+ pip install dist/*.whl
47
+ bitranox_template_py_cli --version || python -m bitranox_template_py_cli --version
48
+
49
+ pipx-uv:
50
+ name: pipx/uv verification (ubuntu)
51
+ runs-on: ubuntu-latest
52
+ steps:
53
+ - uses: actions/checkout@v4
54
+ - uses: actions/setup-python@v5
55
+ with:
56
+ python-version: "3.12"
57
+ - name: Build wheel
58
+ run: |
59
+ python -m pip install --upgrade pip build
60
+ python -m build
61
+ - name: pipx install from wheel
62
+ run: |
63
+ python -m pip install pipx
64
+ pipx install dist/*.whl
65
+ bitranox_template_py_cli --version
66
+ - name: uv tool install
67
+ run: |
68
+ curl -LsSf https://astral.sh/uv/install.sh | sh
69
+ export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$HOME/.local/share/uv/bin:$PATH"
70
+ uv tool install .
71
+ bitranox_template_py_cli --version
72
+
73
+ # nix and conda packaging builds are disabled for now to keep CI green.
74
+ nix:
75
+ name: Nix build (flake)
76
+ runs-on: ubuntu-latest
77
+ steps:
78
+ - uses: actions/checkout@v4
79
+ - name: Install Nix (flakes)
80
+ uses: cachix/install-nix-action@v27
81
+ with:
82
+ extra_nix_config: |
83
+ experimental-features = nix-command flakes
84
+ - name: Build with Nix flake
85
+ working-directory: packaging/nix
86
+ run: |
87
+ nix build .#default -L
88
+ echo "Built path: $(readlink -f result || true)"
89
+
90
+ conda:
91
+ name: Conda build
92
+ runs-on: ubuntu-latest
93
+ steps:
94
+ - uses: actions/checkout@v4
95
+ - name: Setup Miniconda
96
+ uses: conda-incubator/setup-miniconda@v3
97
+ with:
98
+ auto-update-conda: true
99
+ python-version: "3.12"
100
+ - name: Build conda recipe (local source, no test)
101
+ shell: bash -l {0}
102
+ env:
103
+ CONDA_USE_LOCAL: "1"
104
+ run: |
105
+ conda config --add channels conda-forge
106
+ conda config --add channels defaults
107
+ conda install -y conda-build
108
+ conda build packaging/conda/recipe --no-test -c conda-forge -c defaults
109
+
110
+ notebooks:
111
+ name: Execute notebooks (ubuntu, Python 3.10)
112
+ runs-on: ubuntu-latest
113
+ steps:
114
+ - uses: actions/checkout@v4
115
+ - uses: actions/setup-python@v5
116
+ with:
117
+ python-version: "3.10"
118
+ - name: Install notebook runner deps
119
+ run: |
120
+ python -m pip install --upgrade pip
121
+ pip install nbclient nbformat ipykernel jupyter_client
122
+ python -m ipykernel install --user --name python3 --display-name "Python 3"
123
+ - name: Execute Quickstart notebook
124
+ env:
125
+ PIP_DISABLE_PIP_VERSION_CHECK: "1"
126
+ PIP_NO_INPUT: "1"
127
+ run: |
128
+ python - << 'PY'
129
+ import json, sys
130
+ from pathlib import Path
131
+ import nbformat
132
+ try:
133
+ from nbformat.validator import normalize # type: ignore
134
+ except Exception:
135
+ normalize = None # type: ignore
136
+ from nbclient import NotebookClient
137
+
138
+ nb_path = Path('notebooks/Quickstart.ipynb')
139
+ if not nb_path.exists():
140
+ raise SystemExit(f"Notebook not found: {nb_path}")
141
+
142
+ with nb_path.open('r', encoding='utf-8') as f:
143
+ nb = nbformat.read(f, as_version=4)
144
+ # Normalize to ensure required fields like cell ids are present (supports older nbformat return types)
145
+ if normalize is not None:
146
+ nb_norm = normalize(nb) # may return notebook or a tuple
147
+ # pick the first element that looks like a notebook
148
+ cand = nb_norm
149
+ if isinstance(nb_norm, tuple):
150
+ for item in nb_norm:
151
+ if hasattr(item, 'cells') and hasattr(item, 'metadata'):
152
+ cand = item
153
+ break
154
+ nb = cand
155
+ # Final guard for robustness
156
+ if isinstance(nb, tuple) or not (hasattr(nb, 'cells') and hasattr(nb, 'metadata')):
157
+ raise SystemExit(f"Unexpected notebook object type after normalize: {type(nb)}")
158
+
159
+ client = NotebookClient(nb, timeout=900, kernel_name='python3', allow_errors=False)
160
+ client.execute()
161
+
162
+ # Optionally write executed notebook artifact (not committed)
163
+ out_path = Path('notebooks/Quickstart-executed.ipynb')
164
+ with out_path.open('w', encoding='utf-8') as f:
165
+ nbformat.write(nb, f)
166
+ print(f"Executed notebook written to: {out_path}")
167
+ PY
168
+
169
+ packaging-consistency:
170
+ name: Packaging files in sync
171
+ runs-on: ubuntu-latest
172
+ steps:
173
+ - uses: actions/checkout@v4
174
+ - uses: actions/setup-python@v5
175
+ with:
176
+ python-version: '3.x'
177
+ - name: Verify packaging matches pyproject
178
+ run: |
179
+ python - << 'PY'
180
+ import re, sys
181
+ from pathlib import Path
182
+
183
+ py = Path('pyproject.toml').read_text(encoding='utf-8')
184
+ m_ver = re.search(r'^version\s*=\s*"([^"]+)"', py, re.M)
185
+ m_req = re.search(r'^requires-python\s*=\s*"([^"]+)"', py, re.M)
186
+ if not (m_ver and m_req):
187
+ print('pyproject missing version or requires-python'); sys.exit(1)
188
+ version = m_ver.group(1)
189
+ requires = m_req.group(1)
190
+ m_min = re.search(r'>=\s*(3\.[0-9]+)', requires)
191
+ if not m_min:
192
+ print('requires-python must be like ">=3.X"'); sys.exit(1)
193
+ min_py = m_min.group(1)
194
+ min_digits = min_py.replace('.', '')
195
+
196
+ # Conda
197
+ conda = Path('packaging/conda/recipe/meta.yaml').read_text(encoding='utf-8')
198
+ if not re.search(r'\{\%\s*set\s+version\s*=\s*"' + re.escape(version) + r'"\s*\%\}', conda):
199
+ print('conda/meta.yaml: version mismatch'); sys.exit(1)
200
+ if len(re.findall(r'python\s*>?=\s*' + re.escape(min_py), conda)) < 2:
201
+ print('conda/meta.yaml: python constraint not aligned (host/run)'); sys.exit(1)
202
+
203
+ # Brew
204
+ brew = Path('packaging/brew/Formula/bitranox-template-py-cli.rb').read_text(encoding='utf-8')
205
+ if f"refs/tags/v{version}.tar.gz" not in brew:
206
+ print('brew formula: url tag mismatch'); sys.exit(1)
207
+ if f'"python@{min_py}"' not in brew:
208
+ print('brew formula: python dependency not aligned'); sys.exit(1)
209
+
210
+ # Nix
211
+ nix = Path('packaging/nix/flake.nix').read_text(encoding='utf-8')
212
+ if not re.search(r'pname\s*=\s*"bitranox_template_py_cli";\s*[^}]*?version\s*=\s*"' + re.escape(version) + r'";', nix, re.S):
213
+ print('nix flake: version mismatch'); sys.exit(1)
214
+ if not re.search(r'pypkgs\s*=\s*pkgs\.python' + re.escape(min_digits) + r'Packages', nix):
215
+ print('nix flake: python package set not aligned'); sys.exit(1)
216
+ if not re.search(r'pkgs\.python' + re.escape(min_digits) + r'\b', nix):
217
+ print('nix flake: devShell python not aligned'); sys.exit(1)
218
+ print('Packaging files are consistent with pyproject.')
219
+ PY
@@ -0,0 +1,40 @@
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@v4
27
+
28
+ - name: Initialize CodeQL
29
+ uses: github/codeql-action/init@v3
30
+ with:
31
+ languages: ${{ matrix.language }}
32
+
33
+ - name: Autobuild
34
+ uses: github/codeql-action/autobuild@v3
35
+
36
+ - name: Perform CodeQL Analysis
37
+ uses: github/codeql-action/analyze@v3
38
+ with:
39
+ category: "/language:${{ matrix.language }}"
40
+
@@ -0,0 +1,42 @@
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@v4
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@v5
26
+ with:
27
+ python-version: '3.12'
28
+ - name: Build artifacts
29
+ run: |
30
+ python -m pip install --upgrade pip build
31
+ python -m build
32
+ - name: Publish to PyPI
33
+ # Use the rolling major tag to get latest Twine/standards support (e.g., Core Metadata 2.4)
34
+ uses: pypa/gh-action-pypi-publish@release/v1
35
+ with:
36
+ password: ${{ secrets.PYPI_API_TOKEN }}
37
+ skip-existing: true
38
+ - name: Upload artifacts
39
+ uses: actions/upload-artifact@v4
40
+ with:
41
+ name: dist
42
+ path: dist/*
@@ -0,0 +1,179 @@
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
+
68
+ # ====================================
69
+ # Build & distribution artifacts
70
+ # ====================================
71
+ # source/package builds
72
+ build/
73
+ dist/
74
+ *.egg-info/ # metadata for pip installs
75
+ *.egg
76
+ *.whl
77
+ pip-wheel-metadata/
78
+ *.manifest # PyInstaller metadata
79
+ *.spec # PyInstaller spec files
80
+
81
+ # Eggs, parts, wheels, sdist, etc.
82
+ develop-eggs/
83
+ .eggs/
84
+ parts/
85
+ sdist/
86
+ wheels/
87
+ downloads/
88
+ var/
89
+
90
+ # pip logs & installer leftovers
91
+ pip-log.txt
92
+ pip-delete-this-directory.txt
93
+ .installed.cfg
94
+
95
+ # ====================================
96
+ # Virtual environments & secrets
97
+ # ====================================
98
+ # common venv folder names
99
+ env/
100
+ venv/
101
+ ENV/
102
+ .venv/
103
+ # backups, alternate names
104
+ env.bak/
105
+ venv.bak/
106
+ # dotenv files with credentials
107
+ .env
108
+
109
+ # ====================================
110
+ # Project-specific & framework files
111
+ # ====================================
112
+ # Django logs & local overrides
113
+ *.log
114
+ local_settings.py
115
+
116
+ # Flask instance folder
117
+ instance/
118
+ .webassets-cache
119
+
120
+ # Scrapy cache
121
+ .scrapy
122
+
123
+ # Sphinx docs
124
+ docs/_build/
125
+
126
+ # PyBuilder output
127
+ target/
128
+
129
+ # Jupyter notebooks checkpoints
130
+ .ipynb_checkpoints
131
+
132
+ # pyenv Python version file
133
+ .python-version
134
+
135
+ # Celery beat schedule
136
+ celerybeat-schedule
137
+
138
+ # SageMath parsed files
139
+ *.sage.py
140
+
141
+ # Spyder IDE
142
+ .spyderproject
143
+ .spyproject
144
+
145
+ # Rope IDE
146
+ .ropeproject
147
+
148
+ # MkDocs static site folder
149
+ /site
150
+
151
+ # ====================================
152
+ # OS-specific files
153
+ # ====================================
154
+ # macOS
155
+ .DS_Store
156
+ # Windows
157
+ Thumbs.db
158
+ ehthumbs.db
159
+
160
+ # Archives
161
+ *.zip
162
+
163
+ # Thunderbird build artifact (created temporarily by pack script)
164
+ sources/manifest.json
165
+
166
+ # ====================================
167
+ # Tool-specific extras
168
+ # ====================================
169
+ # Codecov uploader script (downloaded during local uploads)
170
+ codecov.sh
171
+ codecov.xml
172
+
173
+ # Nix build result symlink
174
+ result
175
+
176
+ # Optional lockfiles (for alternative managers)
177
+ poetry.lock
178
+ pdm.lock
179
+ uv.lock
@@ -0,0 +1,131 @@
1
+ # Repository Guidelines
2
+
3
+ ## On session start
4
+
5
+ - Connect to the `systemprompts` MCP filesystem.
6
+ - Read following files and keep their guidance in working memory:
7
+ - core_programming_solid.md
8
+ - bash_clean_architecture.md
9
+ - bash_clean_code.md
10
+ - bash_small_functions.md
11
+ - python_solid_architecture_enforcer.md
12
+ - python_clean_architecture.md
13
+ - python_clean_code.md
14
+ - python_small_functions_style.md
15
+ - python_libraries_to_use.md
16
+ - python_structure_template.md
17
+ - self_documenting.md
18
+
19
+
20
+ always apply those Rules :
21
+
22
+ - core_programming_solid.md
23
+
24
+ when writing or refracturing Bash scripts, apply those Rules :
25
+
26
+ - core_programming_solid.md
27
+ - bash_clean_architecture.md
28
+ - bash_clean_code.md
29
+ - bash_small_functions.md
30
+
31
+ when writing or refracturing Python scripts, apply those Rules :
32
+ - core_programming_solid.md
33
+ - python_solid_architecture_enforcer.md
34
+ - python_clean_architecture.md
35
+ - python_clean_code.md
36
+ - python_small_functions_style.md
37
+ - python_libraries_to_use.md
38
+ - python_lib_structure_template.md
39
+
40
+ ## Project Structure & Module Organization
41
+
42
+ - `src/bitranox_template_py_cli/`: Python package exposing placeholders for Rich logging helpers.
43
+ - `scripts/`: shared automation (build/test/release) reused from scaffold.
44
+ - `packaging/`: Conda, Homebrew, and Nix specs kept in sync via scripts.
45
+ - `tests/`: placeholder suite skipping until logging features exist.
46
+
47
+ ## Build, Test, and Development Commands
48
+
49
+ - `make help` — list all targets with one‑line docs.
50
+ - `make test` — run ruff (lint + format check), pyright, pytest with coverage (enabled by default), and upload to Codecov (if configured via `.env`).
51
+ - Auto‑bootstrap: `make test` installs dev tools (`pip install -e .[dev]`) if linters/test deps are missing. Use `SKIP_BOOTSTRAP=1 make test` to disable.
52
+ - Coverage control: `COVERAGE=on|auto|off` (default `on` locally). Uses a unique `COVERAGE_FILE` each run to avoid DB locks.
53
+ - Before uploading to Codecov the harness creates an allow-empty commit (`test: auto commit before Codecov upload`) so the report attaches to a revision. Reset or amend if you do not want to keep it.
54
+ - `make build` — build Python wheel/sdist and attempt Conda/Homebrew/Nix builds (auto‑installs missing tools when needed).
55
+ - `make push` — runs the full `scripts/test.py` flow, prompts for/accepts a commit message (or `COMMIT_MESSAGE`), creates an allow-empty commit if needed, then pushes to the selected remote.
56
+ - `make clean` — remove caches, coverage, and build artifacts (includes `dist/` and `build/`).
57
+
58
+ ### Versioning & Releases
59
+
60
+ - Single source of truth for the package version is `pyproject.toml` (`[project].version`).
61
+ - Runtime code reads metadata via `importlib.metadata`; do not duplicate the version in code files.
62
+ - On a version bump, update only `pyproject.toml` and the `CHANGELOG.md` entry; do not edit `src/bitranox_template_py_cli/__init__conf__.py` for versioning.
63
+ - Tag releases `vX.Y.Z` and push tags; CI will build artifacts and publish when configured.
64
+
65
+ ### Common Make Targets (Alphabetical)
66
+
67
+
68
+ | Target | One-line description |
69
+ |-------------------|--------------------------------------------------------------------------------|
70
+ | `build` | Build wheel/sdist and attempt Conda/Brew/Nix builds (auto-installs tools). |
71
+ | `bump` | Bump version (VERSION=X.Y.Z or PART=major\|minor\|patch) and update changelog. |
72
+ | `bump-major` | Increment major version ((X+1).0.0). |
73
+ | `bump-minor` | Increment minor version (X.Y.Z → X.(Y+1).0). |
74
+ | `bump-patch` | Increment patch version (X.Y.Z → X.Y.(Z+1)). |
75
+ | `clean` | Remove caches, coverage, and build artifacts (includes `dist/` and `build/`). |
76
+ | `dev` | Install package with dev extras. |
77
+ | `help` | Show this table. |
78
+ | `install` | Editable install. |
79
+ | `menu` | Interactive TUI menu (make menu). |
80
+ | `push` | Commit changes once and push to GitHub (no CI monitoring). |
81
+ | `release` | Tag vX.Y.Z, push, sync packaging, run gh release if available. |
82
+ | `run` | Run module entry (`python -m ... --help`). |
83
+ | `test` | Lint, format, type-check, run tests with coverage, upload to Codecov. |
84
+ | `version-current` | Print current version from `pyproject.toml`. |
85
+
86
+ ## Coding Style & Naming Conventions
87
+
88
+ - Keep modules and functions snake_case.
89
+ - Prefer dataclasses for configuration objects (see `Config` in `bitranox_template_py_cli`).
90
+ - Rich renderables will live in dedicated helper modules once implemented.
91
+
92
+ ## Testing Guidelines
93
+
94
+ - Unit and integration-style tests live under `tests/`; keep them up to date when adding features.
95
+ - Extend coverage for new CLI or library behaviour (the suite exercises CLI commands, package metadata, and automation scripts).
96
+ - When adding functionality, replace or remove placeholders and ensure `make test` remains green.
97
+
98
+ ## Commit & Pull Request Guidelines
99
+
100
+ ## Architecture Overview
101
+
102
+ Placeholder: logging pipeline will organize around Rich renderables managed by a configurable core module and optional CLI utilities.
103
+
104
+ ## Security & Configuration Tips
105
+
106
+ - `.env` is only for local tooling (CodeCov tokens, etc.); do not commit secrets.
107
+ - Rich logging should sanitize payloads before rendering once implemented.
108
+
109
+ ## Translations (Docs)
110
+
111
+ ## Translations (App UI Strings)
112
+
113
+ ## Changes in WEB Documentation
114
+
115
+ - when asked to update documentation - only do that in the english docs under /website/docs because other languages will be translated automatically,
116
+ unless stated otherwise by the user. In doubt - ask the user
117
+
118
+ ## Changes in APP Strings
119
+
120
+ - when i18 strings are changed, only to that in sources/\_locales/en because other languages will be translated automatically,
121
+ unless stated otherwise by the user. In doubt - ask the user
122
+
123
+ ## commit/push/GitHub policy
124
+
125
+ - run "make test" before any push to avoid lint/test breakage.
126
+ - after push, monitor errors in the github actions and try to correct the errors
127
+
128
+ ## documentation
129
+ whenever a new feature, function, configuration, dataclass field, etc. is introduced:
130
+ - check first if it aligns with docs/systemdesign/*
131
+ - document it in docs/systemdesign/module_reference.md, using the template from self_documenting.md and save it in docs/systemdesign/module_reference.md
@@ -0,0 +1,12 @@
1
+ # Changelog
2
+
3
+ ## [1.0.0] - 2025-09-18
4
+
5
+ - _Describe changes here._
6
+
7
+ ## [Unreleased]
8
+ - Populate once new logging features land.
9
+
10
+ ## [0.1.0] - 2025-09-16
11
+ - Bootstrap `bitranox_template_py_cli` using the shared scaffold.
12
+ - Replace implementation-specific modules with placeholders ready for Rich-based logging.
@@ -0,0 +1,51 @@
1
+ # Contributing Guide
2
+
3
+ Thanks for helping improve **bitranox_template_py_cli**. The sections below summarise the day-to-day workflow, highlight the repository automation, and list the checks that must pass before a change is merged.
4
+
5
+ ## 1. Workflow Overview
6
+
7
+ 1. Fork and branch – use short, imperative branch names (`feature/cli-extension`, `fix/codecov-token`).
8
+ 2. Make focused commits – keep unrelated refactors out of the same change.
9
+ 3. Run `make test` locally before pushing (see the automation note below).
10
+ 4. Update documentation and changelog entries that are affected by the change.
11
+ 5. Open a pull request referencing any relevant issues.
12
+
13
+ ## 2. Commits & Pushes
14
+
15
+ - Commit messages should be imperative (`Add rich handler`, `Fix CLI exit codes`).
16
+ - The test harness (`make test`) performs an allow-empty commit named `test: auto commit before Codecov upload` immediately before it sends coverage to Codecov. This guarantees Codecov sees a concrete revision. If you do not want to retain that commit, run `git reset --soft HEAD~1` (or amend) after the test run finishes.
17
+ - `make push` always performs a commit before pushing. It prompts for a message when run interactively, honours `COMMIT_MESSAGE="…"` when provided, and creates an empty commit if nothing is staged. The Textual menu (`make menu → push`) exposes the same behaviour via an input field.
18
+
19
+ ## 3. Coding Standards
20
+
21
+ - Apply the repository’s Clean Architecture / SOLID rules (see `AGENTS.md` and the system prompts listed there).
22
+ - Prefer small, single-purpose modules and functions; avoid mixing orthogonal concerns.
23
+ - Free functions and modules use `snake_case`; classes are `PascalCase`.
24
+ - Keep runtime dependencies minimal. Use the standard library where practical.
25
+
26
+ ## 4. Tests & Tooling
27
+
28
+ - `make test` runs Ruff (lint + format check), Pyright, and Pytest with coverage. Coverage is `on` by default; override with `COVERAGE=off` if you explicitly need a no-coverage run.
29
+ - The harness auto-installs dev tools with `pip install -e .[dev]` when Ruff, Pyright, or Pytest are missing. Skip this by exporting `SKIP_BOOTSTRAP=1`.
30
+ - Codecov uploads require a commit (provided by the automatic commit described above). For private repositories set `CODECOV_TOKEN` in your environment or `.env`.
31
+
32
+ ## 5. Packaging Sync
33
+
34
+ - Packaging definitions in `packaging/` (Conda, Homebrew, Nix) are kept in sync with `pyproject.toml` whenever you run `make test`, `make push`, or version bump scripts.
35
+ - If you need the sync step without tests, use `python scripts/bump_version.py --sync-packaging`.
36
+
37
+ ## 6. Documentation Checklist
38
+
39
+ Before opening a PR, confirm the following:
40
+
41
+ - [ ] `make test` passes locally (and you removed the auto-created Codecov commit if you do not want to keep it).
42
+ - [ ] Relevant documentation (`README.md`, `DEVELOPMENT.md`, `docs/systemdesign/*`) is updated.
43
+ - [ ] No generated artefacts or virtual environments are committed.
44
+ - [ ] Version bumps, when required, touch **only** `pyproject.toml` and `CHANGELOG.md`.
45
+
46
+ ## 7. Security & Configuration
47
+
48
+ - Never commit secrets. Tokens (Codecov, PyPI) belong in `.env` (ignored by git) or CI secrets.
49
+ - Sanitise any payloads you emit via logging once richer logging features ship.
50
+
51
+ Happy hacking!