tftp-router-flasher 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tftp_router_flasher-0.0.1/.github/actions/build-and-publish/action.yml +61 -0
- tftp_router_flasher-0.0.1/.github/actions/setup-python/action.yml +27 -0
- tftp_router_flasher-0.0.1/.github/workflows/cd-dev.yml +48 -0
- tftp_router_flasher-0.0.1/.github/workflows/cd-release.yml +28 -0
- tftp_router_flasher-0.0.1/.github/workflows/ci.yml +92 -0
- tftp_router_flasher-0.0.1/.github/workflows/docs.yml +43 -0
- tftp_router_flasher-0.0.1/.github/workflows/security.yml +77 -0
- tftp_router_flasher-0.0.1/.gitignore +210 -0
- tftp_router_flasher-0.0.1/.pre-commit-config.yaml +51 -0
- tftp_router_flasher-0.0.1/CODEOWNERS +1 -0
- tftp_router_flasher-0.0.1/CONTRIBUTING.md +90 -0
- tftp_router_flasher-0.0.1/CREDITS.md +25 -0
- tftp_router_flasher-0.0.1/LICENSE +339 -0
- tftp_router_flasher-0.0.1/PKG-INFO +202 -0
- tftp_router_flasher-0.0.1/README.md +152 -0
- tftp_router_flasher-0.0.1/docs/.gitignore +3 -0
- tftp_router_flasher-0.0.1/mkdocs.yml +33 -0
- tftp_router_flasher-0.0.1/pyproject.toml +172 -0
- tftp_router_flasher-0.0.1/setup.cfg +4 -0
- tftp_router_flasher-0.0.1/src/tftp_router_flasher/__init__.py +2 -0
- tftp_router_flasher-0.0.1/src/tftp_router_flasher/_version.py +34 -0
- tftp_router_flasher-0.0.1/src/tftp_router_flasher/main.py +341 -0
- tftp_router_flasher-0.0.1/src/tftp_router_flasher.egg-info/PKG-INFO +202 -0
- tftp_router_flasher-0.0.1/src/tftp_router_flasher.egg-info/SOURCES.txt +29 -0
- tftp_router_flasher-0.0.1/src/tftp_router_flasher.egg-info/dependency_links.txt +1 -0
- tftp_router_flasher-0.0.1/src/tftp_router_flasher.egg-info/entry_points.txt +2 -0
- tftp_router_flasher-0.0.1/src/tftp_router_flasher.egg-info/requires.txt +22 -0
- tftp_router_flasher-0.0.1/src/tftp_router_flasher.egg-info/top_level.txt +1 -0
- tftp_router_flasher-0.0.1/tests/__init__.py +0 -0
- tftp_router_flasher-0.0.1/tests/conftest.py +30 -0
- tftp_router_flasher-0.0.1/tests/test_tftp_router_flasher.py +549 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
name: 'Build and Publish Python Package'
|
|
2
|
+
description: 'Builds and publishes Python package to specified PyPI repository'
|
|
3
|
+
|
|
4
|
+
inputs:
|
|
5
|
+
pypi-upload-url:
|
|
6
|
+
description: 'Upload repository URL'
|
|
7
|
+
required: true
|
|
8
|
+
default: 'https://upload.pypi.org/legacy/'
|
|
9
|
+
pypi-install-url:
|
|
10
|
+
description: 'Install repository URL'
|
|
11
|
+
required: true
|
|
12
|
+
default: 'https://pypi.org/simple/'
|
|
13
|
+
version-override:
|
|
14
|
+
description: 'Override version (for dev builds)'
|
|
15
|
+
required: false
|
|
16
|
+
default: ''
|
|
17
|
+
pypi-token:
|
|
18
|
+
description: 'PyPI API token'
|
|
19
|
+
required: true
|
|
20
|
+
|
|
21
|
+
runs:
|
|
22
|
+
using: composite
|
|
23
|
+
steps:
|
|
24
|
+
- name: Checkout
|
|
25
|
+
uses: actions/checkout@v5
|
|
26
|
+
with:
|
|
27
|
+
fetch-depth: 0 # Full history for setuptools-scm
|
|
28
|
+
|
|
29
|
+
- uses: ./.github/actions/setup-python
|
|
30
|
+
with:
|
|
31
|
+
python-version: '3.11'
|
|
32
|
+
requirements: '.[build]'
|
|
33
|
+
|
|
34
|
+
- name: Configure version for dev builds
|
|
35
|
+
if: inputs.version-override != ''
|
|
36
|
+
shell: bash
|
|
37
|
+
run: |
|
|
38
|
+
echo "Setting version override: ${{ inputs.version-override }}"
|
|
39
|
+
echo "SETUPTOOLS_SCM_PRETEND_VERSION=${{ inputs.version-override }}" >> $GITHUB_ENV
|
|
40
|
+
|
|
41
|
+
- name: Build package
|
|
42
|
+
shell: bash
|
|
43
|
+
run: python -m build
|
|
44
|
+
|
|
45
|
+
- name: Verify package
|
|
46
|
+
shell: bash
|
|
47
|
+
run: twine check dist/*
|
|
48
|
+
|
|
49
|
+
- name: Upload to PyPI
|
|
50
|
+
shell: bash
|
|
51
|
+
run: |
|
|
52
|
+
twine upload --repository-url ${{ inputs.pypi-upload-url }} dist/* --verbose
|
|
53
|
+
env:
|
|
54
|
+
TWINE_USERNAME: __token__
|
|
55
|
+
TWINE_PASSWORD: ${{ inputs.pypi-token }}
|
|
56
|
+
|
|
57
|
+
- name: Verify installation
|
|
58
|
+
shell: bash
|
|
59
|
+
run: |
|
|
60
|
+
PACKAGE_NAME=$(python -c "import tomli; print(tomli.load(open('pyproject.toml', 'rb'))['project']['name'])")
|
|
61
|
+
pip install --index-url "${{ inputs.pypi-install-url }}" "$PACKAGE_NAME"
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: 'Python Setup'
|
|
2
|
+
description: 'Setup Python and install dependencies'
|
|
3
|
+
inputs:
|
|
4
|
+
python-version:
|
|
5
|
+
description: 'Python version'
|
|
6
|
+
required: false
|
|
7
|
+
default: '3.11'
|
|
8
|
+
requirements:
|
|
9
|
+
description: 'Requirements section'
|
|
10
|
+
required: false
|
|
11
|
+
default: '.[dev]'
|
|
12
|
+
|
|
13
|
+
runs:
|
|
14
|
+
using: 'composite'
|
|
15
|
+
steps:
|
|
16
|
+
- name: Set up Python ${{ inputs.python-version }}
|
|
17
|
+
uses: actions/setup-python@v6
|
|
18
|
+
with:
|
|
19
|
+
python-version: ${{ inputs.python-version }}
|
|
20
|
+
|
|
21
|
+
- name: Upgrade pip
|
|
22
|
+
shell: bash
|
|
23
|
+
run: python -m pip install --upgrade pip
|
|
24
|
+
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
shell: bash
|
|
27
|
+
run: pip install ${{ inputs.requirements }}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
name: CD - Dev Publishing
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main ]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
publish-dev:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
environment: test-pypi
|
|
12
|
+
steps:
|
|
13
|
+
- name: Checkout code
|
|
14
|
+
uses: actions/checkout@v5
|
|
15
|
+
|
|
16
|
+
- name: Calculate dev version
|
|
17
|
+
id: version
|
|
18
|
+
shell: bash
|
|
19
|
+
run: |
|
|
20
|
+
# Get latest tag or default to 0.0.0
|
|
21
|
+
LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "0.0.0")
|
|
22
|
+
echo "Latest tag: $LATEST_TAG"
|
|
23
|
+
|
|
24
|
+
# Remove 'v' prefix if present
|
|
25
|
+
LATEST_TAG=${LATEST_TAG#v}
|
|
26
|
+
|
|
27
|
+
# Parse version components
|
|
28
|
+
IFS='.' read -r MAJOR MINOR PATCH <<< "$LATEST_TAG"
|
|
29
|
+
|
|
30
|
+
# If no tags found, default to 0.0.0
|
|
31
|
+
if [ -z "$MAJOR" ]; then
|
|
32
|
+
MAJOR=0
|
|
33
|
+
MINOR=0
|
|
34
|
+
PATCH=0
|
|
35
|
+
fi
|
|
36
|
+
|
|
37
|
+
DEV_VERSION="${MAJOR}.${MINOR}.${PATCH}.dev${{ github.run_number }}"
|
|
38
|
+
|
|
39
|
+
echo "Dev version: $DEV_VERSION"
|
|
40
|
+
echo "version=$DEV_VERSION" >> $GITHUB_OUTPUT
|
|
41
|
+
|
|
42
|
+
- name: Build and publish to TestPyPI
|
|
43
|
+
uses: ./.github/actions/build-and-publish
|
|
44
|
+
with:
|
|
45
|
+
pypi-upload-url: 'https://test.pypi.org/legacy/'
|
|
46
|
+
pypi-install-url: 'https://test.pypi.org/simple/'
|
|
47
|
+
version-override: ${{ steps.version.outputs.version }}
|
|
48
|
+
pypi-token: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: CD - Production Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
publish-release:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
environment: pypi
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- name: Checkout code
|
|
15
|
+
uses: actions/checkout@v5
|
|
16
|
+
|
|
17
|
+
- name: Extract version from tag
|
|
18
|
+
id: version
|
|
19
|
+
run: |
|
|
20
|
+
VERSION="${GITHUB_REF#refs/tags/v}"
|
|
21
|
+
echo "version=$VERSION"
|
|
22
|
+
|
|
23
|
+
- name: Build and publish to PyPI
|
|
24
|
+
uses: ./.github/actions/build-and-publish
|
|
25
|
+
with:
|
|
26
|
+
pypi-upload-url: 'https://upload.pypi.org/legacy/'
|
|
27
|
+
pypi-install-url: 'https://pypi.org/simple/'
|
|
28
|
+
pypi-token: ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
name: Lint and Type Check
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main ]
|
|
8
|
+
|
|
9
|
+
# Define reusable steps as anchors
|
|
10
|
+
defaults:
|
|
11
|
+
run:
|
|
12
|
+
shell: bash
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
ruff-check:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- name: Checkout code
|
|
19
|
+
uses: actions/checkout@v5
|
|
20
|
+
|
|
21
|
+
- uses: ./.github/actions/setup-python
|
|
22
|
+
with:
|
|
23
|
+
python-version: "3.11" # minimum supported version
|
|
24
|
+
|
|
25
|
+
- name: Run Ruff Check
|
|
26
|
+
run: ruff check . --fix
|
|
27
|
+
|
|
28
|
+
ruff-format:
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
steps:
|
|
31
|
+
- name: Checkout code
|
|
32
|
+
uses: actions/checkout@v5
|
|
33
|
+
|
|
34
|
+
- uses: ./.github/actions/setup-python
|
|
35
|
+
with:
|
|
36
|
+
python-version: "3.11" # minimum supported version
|
|
37
|
+
|
|
38
|
+
- name: Run Ruff format
|
|
39
|
+
run: ruff format . --check
|
|
40
|
+
|
|
41
|
+
mypy:
|
|
42
|
+
runs-on: ubuntu-latest
|
|
43
|
+
strategy:
|
|
44
|
+
matrix:
|
|
45
|
+
python-version: ["3.11", "3.12", "3.13", "3.14"]
|
|
46
|
+
steps:
|
|
47
|
+
- name: Checkout code
|
|
48
|
+
uses: actions/checkout@v5
|
|
49
|
+
|
|
50
|
+
- uses: ./.github/actions/setup-python
|
|
51
|
+
with:
|
|
52
|
+
python-version: ${{ matrix.python-version }}
|
|
53
|
+
|
|
54
|
+
- name: Run mypy
|
|
55
|
+
run: mypy .
|
|
56
|
+
|
|
57
|
+
unit-tests:
|
|
58
|
+
runs-on: ${{ matrix.os }}
|
|
59
|
+
strategy:
|
|
60
|
+
matrix:
|
|
61
|
+
python-version: ["3.11", "3.12", "3.13", "3.14"]
|
|
62
|
+
os: [ubuntu-latest, macos-latest]
|
|
63
|
+
fail-fast: false
|
|
64
|
+
steps:
|
|
65
|
+
- name: Checkout code
|
|
66
|
+
uses: actions/checkout@v5
|
|
67
|
+
|
|
68
|
+
- uses: ./.github/actions/setup-python
|
|
69
|
+
with:
|
|
70
|
+
python-version: ${{ matrix.python-version }}
|
|
71
|
+
|
|
72
|
+
- name: Run tests with coverage
|
|
73
|
+
run: pytest
|
|
74
|
+
|
|
75
|
+
build-package:
|
|
76
|
+
runs-on: ${{ matrix.os }}
|
|
77
|
+
strategy:
|
|
78
|
+
matrix:
|
|
79
|
+
python-version: ["3.11", "3.12", "3.13", "3.14"]
|
|
80
|
+
os: [ubuntu-latest, macos-latest]
|
|
81
|
+
steps:
|
|
82
|
+
- name: Checkout code
|
|
83
|
+
uses: actions/checkout@v5
|
|
84
|
+
|
|
85
|
+
- uses: ./.github/actions/setup-python
|
|
86
|
+
with:
|
|
87
|
+
python-version: ${{ matrix.python-version }}
|
|
88
|
+
- name: Build package
|
|
89
|
+
run: python -m build
|
|
90
|
+
|
|
91
|
+
- name: Installation dry run
|
|
92
|
+
run: pip install dist/*.whl
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: Deploy Documentation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
push:
|
|
6
|
+
branches: [ main ]
|
|
7
|
+
paths:
|
|
8
|
+
- 'docs/**'
|
|
9
|
+
- 'mkdocs.yml'
|
|
10
|
+
- 'README.md'
|
|
11
|
+
- 'CONTRIBUTING.md'
|
|
12
|
+
- '.github/workflows/docs.yml'
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: write
|
|
16
|
+
pages: write
|
|
17
|
+
id-token: write
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
deploy:
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v5
|
|
24
|
+
|
|
25
|
+
- name: Create documentation symlinks
|
|
26
|
+
run: |
|
|
27
|
+
cd docs
|
|
28
|
+
ln -sf ../README.md index.md
|
|
29
|
+
ln -sf ../CONTRIBUTING.md contributing.md
|
|
30
|
+
printf "Symlinks created:\n"
|
|
31
|
+
ls -lah index.md contributing.md
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
- name: Set up Python
|
|
35
|
+
uses: actions/setup-python@v6
|
|
36
|
+
with:
|
|
37
|
+
python-version: '3.11'
|
|
38
|
+
|
|
39
|
+
- name: Install dependencies
|
|
40
|
+
run: python -m pip install --upgrade pip && pip install mkdocs-material
|
|
41
|
+
|
|
42
|
+
- name: Build and Deploy
|
|
43
|
+
run: mkdocs gh-deploy --force
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
name: Security Scan
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
# Run daily at 6 AM UTC
|
|
6
|
+
- cron: '0 6 * * *'
|
|
7
|
+
workflow_dispatch: # Allow manual triggers
|
|
8
|
+
pull_request:
|
|
9
|
+
branches: [ main ]
|
|
10
|
+
push:
|
|
11
|
+
branches: [ main ]
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
safety-scan:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- name: Checkout code
|
|
18
|
+
uses: actions/checkout@v5
|
|
19
|
+
|
|
20
|
+
- uses: ./.github/actions/setup-python
|
|
21
|
+
with:
|
|
22
|
+
python-version: "3.11"
|
|
23
|
+
requirements: ".[security]"
|
|
24
|
+
|
|
25
|
+
- name: Run Safety check
|
|
26
|
+
run: safety check --file pyproject.toml --full-report
|
|
27
|
+
|
|
28
|
+
bandit-scan:
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
steps:
|
|
31
|
+
- name: Checkout code
|
|
32
|
+
uses: actions/checkout@v5
|
|
33
|
+
|
|
34
|
+
- uses: ./.github/actions/setup-python
|
|
35
|
+
with:
|
|
36
|
+
python-version: "3.11"
|
|
37
|
+
requirements: ".[security]"
|
|
38
|
+
|
|
39
|
+
- name: Run Bandit
|
|
40
|
+
run: bandit -r src/ -c pyproject.toml -f txt
|
|
41
|
+
|
|
42
|
+
codeql-scan:
|
|
43
|
+
runs-on: ubuntu-latest
|
|
44
|
+
permissions:
|
|
45
|
+
security-events: write
|
|
46
|
+
actions: read
|
|
47
|
+
contents: read
|
|
48
|
+
packages: read
|
|
49
|
+
steps:
|
|
50
|
+
- name: Checkout code
|
|
51
|
+
uses: actions/checkout@v5
|
|
52
|
+
|
|
53
|
+
- name: Initialize CodeQL
|
|
54
|
+
uses: github/codeql-action/init@v4
|
|
55
|
+
with:
|
|
56
|
+
languages: python
|
|
57
|
+
|
|
58
|
+
- name: Autobuild
|
|
59
|
+
uses: github/codeql-action/autobuild@v4
|
|
60
|
+
|
|
61
|
+
- name: Run CodeQL Analysis
|
|
62
|
+
uses: github/codeql-action/analyze@v4
|
|
63
|
+
with:
|
|
64
|
+
category: "/language:python"
|
|
65
|
+
|
|
66
|
+
secret-scan:
|
|
67
|
+
runs-on: ubuntu-latest
|
|
68
|
+
steps:
|
|
69
|
+
- name: Checkout code
|
|
70
|
+
uses: actions/checkout@v5
|
|
71
|
+
with:
|
|
72
|
+
fetch-depth: 0
|
|
73
|
+
|
|
74
|
+
- name: Run Gitleaks
|
|
75
|
+
uses: gitleaks/gitleaks-action@v2
|
|
76
|
+
env:
|
|
77
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,210 @@
|
|
|
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__/
|
|
208
|
+
|
|
209
|
+
# setuptools_scm generated version file
|
|
210
|
+
src/*/_version.py
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: v6.0.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: trailing-whitespace
|
|
6
|
+
- id: end-of-file-fixer
|
|
7
|
+
- id: check-yaml
|
|
8
|
+
- id: check-added-large-files
|
|
9
|
+
- id: check-merge-conflict
|
|
10
|
+
- id: check-toml
|
|
11
|
+
|
|
12
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
13
|
+
# Ruff version.
|
|
14
|
+
rev: v0.14.3
|
|
15
|
+
hooks:
|
|
16
|
+
# Run the linter.
|
|
17
|
+
- id: ruff-check
|
|
18
|
+
args: [--fix]
|
|
19
|
+
# Run the formatter.
|
|
20
|
+
- id: ruff-format
|
|
21
|
+
|
|
22
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
23
|
+
rev: v1.18.2
|
|
24
|
+
hooks:
|
|
25
|
+
- id: mypy
|
|
26
|
+
args: [--strict]
|
|
27
|
+
additional_dependencies: ["types-psutil"]
|
|
28
|
+
|
|
29
|
+
- repo: local
|
|
30
|
+
hooks:
|
|
31
|
+
- id: pytest
|
|
32
|
+
name: pytest
|
|
33
|
+
entry: pytest
|
|
34
|
+
language: system
|
|
35
|
+
types: [python]
|
|
36
|
+
pass_filenames: false
|
|
37
|
+
always_run: true
|
|
38
|
+
|
|
39
|
+
# Security hooks
|
|
40
|
+
- repo: https://github.com/PyCQA/bandit
|
|
41
|
+
rev: 1.9.0
|
|
42
|
+
hooks:
|
|
43
|
+
- id: bandit
|
|
44
|
+
args: ["-c", "pyproject.toml"]
|
|
45
|
+
files: ^src/
|
|
46
|
+
|
|
47
|
+
- repo: https://github.com/gitleaks/gitleaks
|
|
48
|
+
rev: v8.29.0
|
|
49
|
+
hooks:
|
|
50
|
+
- id: gitleaks
|
|
51
|
+
args: ["--staged"] # Only check staged files for performance
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* @vr-ski
|