btx-lib-list 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.
- btx_lib_list-1.0.0/.devcontainer/devcontainer.json +22 -0
- btx_lib_list-1.0.0/.devcontainer/settings.json +6 -0
- btx_lib_list-1.0.0/.env.example +11 -0
- btx_lib_list-1.0.0/.github/dependabot.yml +22 -0
- btx_lib_list-1.0.0/.github/workflows/ci.yml +169 -0
- btx_lib_list-1.0.0/.github/workflows/codeql.yml +39 -0
- btx_lib_list-1.0.0/.github/workflows/release.yml +42 -0
- btx_lib_list-1.0.0/.gitignore +180 -0
- btx_lib_list-1.0.0/.qlty/qlty.toml +2 -0
- btx_lib_list-1.0.0/.snyk +5 -0
- btx_lib_list-1.0.0/AGENTS.md +104 -0
- btx_lib_list-1.0.0/CHANGELOG.md +19 -0
- btx_lib_list-1.0.0/CONTRIBUTING.md +48 -0
- btx_lib_list-1.0.0/DEVELOPMENT.md +134 -0
- btx_lib_list-1.0.0/INSTALL.md +75 -0
- btx_lib_list-1.0.0/LICENSE +22 -0
- btx_lib_list-1.0.0/Makefile +54 -0
- btx_lib_list-1.0.0/PKG-INFO +437 -0
- btx_lib_list-1.0.0/README.md +403 -0
- btx_lib_list-1.0.0/codecov.yml +28 -0
- btx_lib_list-1.0.0/concept.md +312 -0
- btx_lib_list-1.0.0/docs/systemdesign/module_reference.md +289 -0
- btx_lib_list-1.0.0/notebooks/Quickstart.ipynb +165 -0
- btx_lib_list-1.0.0/pyproject.toml +105 -0
- btx_lib_list-1.0.0/reset_git_history.sh +54 -0
- btx_lib_list-1.0.0/scripts/__init__.py +3 -0
- btx_lib_list-1.0.0/scripts/__main__.py +7 -0
- btx_lib_list-1.0.0/scripts/_utils.py +581 -0
- btx_lib_list-1.0.0/scripts/build.py +52 -0
- btx_lib_list-1.0.0/scripts/bump.py +32 -0
- btx_lib_list-1.0.0/scripts/bump_major.py +20 -0
- btx_lib_list-1.0.0/scripts/bump_minor.py +20 -0
- btx_lib_list-1.0.0/scripts/bump_patch.py +20 -0
- btx_lib_list-1.0.0/scripts/bump_version.py +80 -0
- btx_lib_list-1.0.0/scripts/clean.py +48 -0
- btx_lib_list-1.0.0/scripts/cli.py +213 -0
- btx_lib_list-1.0.0/scripts/dev.py +19 -0
- btx_lib_list-1.0.0/scripts/help.py +41 -0
- btx_lib_list-1.0.0/scripts/install.py +19 -0
- btx_lib_list-1.0.0/scripts/menu.py +568 -0
- btx_lib_list-1.0.0/scripts/push.py +77 -0
- btx_lib_list-1.0.0/scripts/release.py +90 -0
- btx_lib_list-1.0.0/scripts/run_cli.py +154 -0
- btx_lib_list-1.0.0/scripts/target_metadata.py +174 -0
- btx_lib_list-1.0.0/scripts/test.py +535 -0
- btx_lib_list-1.0.0/scripts/version_current.py +20 -0
- btx_lib_list-1.0.0/src/btx_lib_list/__init__.py +71 -0
- btx_lib_list-1.0.0/src/btx_lib_list/__init__conf__.py +67 -0
- btx_lib_list-1.0.0/src/btx_lib_list/__main__.py +112 -0
- btx_lib_list-1.0.0/src/btx_lib_list/behaviors.py +145 -0
- btx_lib_list-1.0.0/src/btx_lib_list/cli.py +518 -0
- btx_lib_list-1.0.0/src/btx_lib_list/lib_list.py +1010 -0
- btx_lib_list-1.0.0/src/btx_lib_list/py.typed +0 -0
- btx_lib_list-1.0.0/tests/conftest.py +99 -0
- btx_lib_list-1.0.0/tests/test_behaviors.py +61 -0
- btx_lib_list-1.0.0/tests/test_cli.py +287 -0
- btx_lib_list-1.0.0/tests/test_lib_list.py +171 -0
- btx_lib_list-1.0.0/tests/test_metadata.py +101 -0
- btx_lib_list-1.0.0/tests/test_module_entry.py +164 -0
- btx_lib_list-1.0.0/tests/test_scripts.py +266 -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,11 @@
|
|
|
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=
|
|
@@ -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,169 @@
|
|
|
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.13 and the latest 3.x available on Actions runners
|
|
18
|
+
python: ["3.13", "3.x"]
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v5
|
|
21
|
+
- uses: actions/setup-python@v6
|
|
22
|
+
with:
|
|
23
|
+
python-version: ${{ matrix.python }}
|
|
24
|
+
- name: Extract project metadata
|
|
25
|
+
shell: python
|
|
26
|
+
run: |
|
|
27
|
+
import os
|
|
28
|
+
import tomllib
|
|
29
|
+
from pathlib import Path
|
|
30
|
+
|
|
31
|
+
data = tomllib.loads(Path('pyproject.toml').read_text('utf-8'))
|
|
32
|
+
project = data['project']['name']
|
|
33
|
+
module = project.replace('-', '_')
|
|
34
|
+
dash = project.replace('_', '-')
|
|
35
|
+
scripts = list(data['project'].get('scripts', {}).keys())
|
|
36
|
+
cli_bin = scripts[0] if scripts else dash
|
|
37
|
+
|
|
38
|
+
with open(os.environ['GITHUB_ENV'], 'a', encoding='utf-8') as env:
|
|
39
|
+
env.write(f"PROJECT_NAME={project}\n")
|
|
40
|
+
env.write(f"PACKAGE_MODULE={module}\n")
|
|
41
|
+
env.write(f"CLI_BIN={cli_bin}\n")
|
|
42
|
+
- name: Install make on Windows
|
|
43
|
+
if: runner.os == 'Windows'
|
|
44
|
+
shell: pwsh
|
|
45
|
+
run: |
|
|
46
|
+
choco install -y make
|
|
47
|
+
echo "C:\\ProgramData\\chocolatey\\bin" >> $env:GITHUB_PATH
|
|
48
|
+
- name: Install journald prerequisites
|
|
49
|
+
if: runner.os == 'Linux'
|
|
50
|
+
shell: bash
|
|
51
|
+
run: |
|
|
52
|
+
sudo apt-get update
|
|
53
|
+
sudo apt-get install -y python3-systemd
|
|
54
|
+
|
|
55
|
+
- name: Upgrade pip
|
|
56
|
+
shell: bash
|
|
57
|
+
run: python -m pip install --upgrade pip
|
|
58
|
+
|
|
59
|
+
- name: Install dev deps
|
|
60
|
+
shell: bash
|
|
61
|
+
run: |
|
|
62
|
+
pip install -e .[dev]
|
|
63
|
+
|
|
64
|
+
- name: Install Windows Event Log prerequisites
|
|
65
|
+
if: runner.os == 'Windows'
|
|
66
|
+
shell: bash
|
|
67
|
+
run: |
|
|
68
|
+
pip install pywin32
|
|
69
|
+
- name: Run full test suite (lint, types, tests, coverage, codecov)
|
|
70
|
+
shell: bash
|
|
71
|
+
env:
|
|
72
|
+
TEST_VERBOSE: "1"
|
|
73
|
+
run: make test
|
|
74
|
+
- name: Build wheel/sdist
|
|
75
|
+
shell: bash
|
|
76
|
+
run: python -m build
|
|
77
|
+
- name: Verify wheel install in clean env
|
|
78
|
+
shell: bash
|
|
79
|
+
run: |
|
|
80
|
+
python -m venv .venv_wheel
|
|
81
|
+
. .venv_wheel/bin/activate 2>/dev/null || . .venv_wheel/Scripts/activate 2>/dev/null
|
|
82
|
+
pip install dist/*.whl
|
|
83
|
+
"$CLI_BIN" --version 2>/dev/null || python -m "$PACKAGE_MODULE" --version
|
|
84
|
+
|
|
85
|
+
pipx-uv:
|
|
86
|
+
name: pipx/uv verification (ubuntu)
|
|
87
|
+
runs-on: ubuntu-latest
|
|
88
|
+
steps:
|
|
89
|
+
- uses: actions/checkout@v5
|
|
90
|
+
- uses: actions/setup-python@v6
|
|
91
|
+
with:
|
|
92
|
+
python-version: "3.13"
|
|
93
|
+
- name: Extract project metadata
|
|
94
|
+
shell: python
|
|
95
|
+
run: |
|
|
96
|
+
import os
|
|
97
|
+
import tomllib
|
|
98
|
+
from pathlib import Path
|
|
99
|
+
|
|
100
|
+
data = tomllib.loads(Path('pyproject.toml').read_text('utf-8'))
|
|
101
|
+
project = data['project']['name']
|
|
102
|
+
module = project.replace('-', '_')
|
|
103
|
+
dash = project.replace('_', '-')
|
|
104
|
+
scripts = list(data['project'].get('scripts', {}).keys())
|
|
105
|
+
cli_bin = scripts[0] if scripts else dash
|
|
106
|
+
|
|
107
|
+
with open(os.environ['GITHUB_ENV'], 'a', encoding='utf-8') as env:
|
|
108
|
+
env.write(f"PROJECT_NAME={project}\n")
|
|
109
|
+
env.write(f"PACKAGE_MODULE={module}\n")
|
|
110
|
+
env.write(f"CLI_BIN={cli_bin}\n")
|
|
111
|
+
- name: Build wheel
|
|
112
|
+
run: |
|
|
113
|
+
python -m pip install --upgrade pip build
|
|
114
|
+
python -m build
|
|
115
|
+
- name: pipx install from wheel
|
|
116
|
+
run: |
|
|
117
|
+
python -m pip install pipx
|
|
118
|
+
pipx install dist/*.whl
|
|
119
|
+
"$CLI_BIN" --version 2>/dev/null || python -m "$PACKAGE_MODULE" --version
|
|
120
|
+
- name: Install uv
|
|
121
|
+
uses: astral-sh/setup-uv@v7
|
|
122
|
+
with:
|
|
123
|
+
enable-cache: true
|
|
124
|
+
- name: uv tool install
|
|
125
|
+
run: |
|
|
126
|
+
uv tool install .
|
|
127
|
+
"$CLI_BIN" --version 2>/dev/null || python -m "$PACKAGE_MODULE" --version
|
|
128
|
+
|
|
129
|
+
notebooks:
|
|
130
|
+
name: Execute notebooks (ubuntu, Python 3.13)
|
|
131
|
+
runs-on: ubuntu-latest
|
|
132
|
+
steps:
|
|
133
|
+
- uses: actions/checkout@v5
|
|
134
|
+
- uses: actions/setup-python@v6
|
|
135
|
+
with:
|
|
136
|
+
python-version: "3.13"
|
|
137
|
+
- name: Install notebook runner deps
|
|
138
|
+
run: |
|
|
139
|
+
python -m pip install --upgrade pip
|
|
140
|
+
pip install nbclient nbformat ipykernel jupyter_client
|
|
141
|
+
python -m ipykernel install --user --name python3 --display-name "Python 3"
|
|
142
|
+
- name: Execute Quickstart notebook
|
|
143
|
+
env:
|
|
144
|
+
PIP_DISABLE_PIP_VERSION_CHECK: "1"
|
|
145
|
+
PIP_NO_INPUT: "1"
|
|
146
|
+
run: |
|
|
147
|
+
python - << 'PY'
|
|
148
|
+
from pathlib import Path
|
|
149
|
+
|
|
150
|
+
import nbformat
|
|
151
|
+
from nbclient import NotebookClient
|
|
152
|
+
|
|
153
|
+
nb_path = Path('notebooks/Quickstart.ipynb')
|
|
154
|
+
if not nb_path.exists():
|
|
155
|
+
raise SystemExit(f"Notebook not found: {nb_path}")
|
|
156
|
+
|
|
157
|
+
notebook = nbformat.read(nb_path, as_version=4)
|
|
158
|
+
client = NotebookClient(
|
|
159
|
+
notebook,
|
|
160
|
+
timeout=900,
|
|
161
|
+
kernel_name='python3',
|
|
162
|
+
allow_errors=False,
|
|
163
|
+
)
|
|
164
|
+
client.execute()
|
|
165
|
+
|
|
166
|
+
out_path = Path('notebooks/Quickstart-executed.ipynb')
|
|
167
|
+
nbformat.write(notebook, out_path)
|
|
168
|
+
print(f"Executed notebook written to: {out_path}")
|
|
169
|
+
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,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@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
|
+
- 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,180 @@
|
|
|
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
|
btx_lib_list-1.0.0/.snyk
ADDED
|
@@ -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/btx_lib_list/`: Python package
|
|
44
|
+
- `scripts/`: shared automation (build/test/release) reused from scaffold.
|
|
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
|
+
- Runtime code reads metadata via `importlib.metadata`; do not duplicate the version in code files.
|
|
52
|
+
- On a version bump, update only `pyproject.toml` and the `CHANGELOG.md` entry; do not edit `src/btx_lib_list/__init__conf__.py` for versioning.
|
|
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 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
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file following
|
|
4
|
+
the [Keep a Changelog](https://keepachangelog.com/) format.
|
|
5
|
+
|
|
6
|
+
## [1.0.0] - 2025-10-15
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
- - Scaffolded the `btx_lib_list` Python package with CLI entry points (`btx_lib_list`, `btx-lib-list`, and `python -m btx_lib_list`) and rich-click powered help output.
|
|
10
|
+
- Shipped the greeting and failure behaviour helpers (`emit_greeting`, `raise_intentional_failure`, `print_info`) with unit-tested coverage.
|
|
11
|
+
- Provisioned the automation suite under `scripts/` supporting build, release, version bumping, and metadata inspection tasks.
|
|
12
|
+
- Established the pytest-based test suite for behaviours, CLI commands, scripts, and module metadata.
|
|
13
|
+
- Authored the initial documentation set including README, INSTALL, architecture concept overview, and the system design module reference.
|
|
14
|
+
- Introduced the `btx_lib_list.lib_list` module with a full suite of list-processing helpers (deduplication, pattern filters, string stripping, chunking) and exported them from the package root.
|
|
15
|
+
- Added `tests/test_lib_list.py` covering the new helpers across positive, negative, and edge-path behaviours.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- Updated the README and module reference to document the list utilities and their CLI usage examples.
|
|
19
|
+
- Trimmed and reorganised `AGENTS.md` to reflect the narrower pre-release scope for contributors.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Contributing Guide
|
|
2
|
+
|
|
3
|
+
Thanks for helping improve **btx_lib_list**. 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`) runs the full lint/type/test pipeline but leaves the repository untouched; create commits yourself before pushing or uploading coverage artifacts.
|
|
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
|
+
- Tests follow a narrative style: prefer names like `test_when_<condition>_<outcome>()`, keep each case laser-focused, and mark OS constraints with the provided markers (`@pytest.mark.os_agnostic`, `@pytest.mark.os_windows`, etc.).
|
|
32
|
+
- Whenever you add a CLI behaviour or change metadata fallbacks, update the relevant story in `tests/test_cli.py` or `tests/test_metadata.py` so the specification remains complete.
|
|
33
|
+
|
|
34
|
+
## 5. Documentation Checklist
|
|
35
|
+
|
|
36
|
+
Before opening a PR, confirm the following:
|
|
37
|
+
|
|
38
|
+
- [ ] `make test` passes locally (and you removed the auto-created Codecov commit if you do not want to keep it).
|
|
39
|
+
- [ ] Relevant documentation (`README.md`, `DEVELOPMENT.md`, `docs/systemdesign/*`) is updated.
|
|
40
|
+
- [ ] No generated artefacts or virtual environments are committed.
|
|
41
|
+
- [ ] Version bumps, when required, touch **only** `pyproject.toml` and `CHANGELOG.md`.
|
|
42
|
+
|
|
43
|
+
## 6. Security & Configuration
|
|
44
|
+
|
|
45
|
+
- Never commit secrets. Tokens (Codecov, PyPI) belong in `.env` (ignored by git) or CI secrets.
|
|
46
|
+
- Sanitise any payloads you emit via logging once richer logging features ship.
|
|
47
|
+
|
|
48
|
+
Happy hacking!
|