auto-uv 0.1.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.
- auto_uv-0.1.0/.actrc +14 -0
- auto_uv-0.1.0/.github/workflows/test.yml +161 -0
- auto_uv-0.1.0/.github/workflows/version-bump.yml +90 -0
- auto_uv-0.1.0/.github/workflows/workflow.yml +128 -0
- auto_uv-0.1.0/.gitignore +162 -0
- auto_uv-0.1.0/.markdownlint.json +12 -0
- auto_uv-0.1.0/.pre-commit-config.yaml +98 -0
- auto_uv-0.1.0/.yamllint.yml +28 -0
- auto_uv-0.1.0/CONTRIBUTING.md +223 -0
- auto_uv-0.1.0/LICENSE +22 -0
- auto_uv-0.1.0/Makefile +169 -0
- auto_uv-0.1.0/PKG-INFO +344 -0
- auto_uv-0.1.0/README.md +286 -0
- auto_uv-0.1.0/example.py +40 -0
- auto_uv-0.1.0/pyproject.toml +112 -0
- auto_uv-0.1.0/src/auto_uv.py +59 -0
- auto_uv-0.1.0/tests/test_auto_uv.py +145 -0
auto_uv-0.1.0/.actrc
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# act configuration file
|
|
2
|
+
# This file configures how act runs GitHub Actions locally
|
|
3
|
+
|
|
4
|
+
# Use medium-sized containers for better compatibility
|
|
5
|
+
-P ubuntu-latest=catthehacker/ubuntu:act-latest
|
|
6
|
+
-P ubuntu-22.04=catthehacker/ubuntu:act-22.04
|
|
7
|
+
-P ubuntu-20.04=catthehacker/ubuntu:act-20.04
|
|
8
|
+
|
|
9
|
+
# Set default environment file (optional, for secrets)
|
|
10
|
+
--env-file .env
|
|
11
|
+
|
|
12
|
+
# Use host networking for better performance
|
|
13
|
+
--container-architecture linux/amd64
|
|
14
|
+
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main, develop ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main, develop ]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
test:
|
|
12
|
+
name: Test Python ${{ matrix.python-version }} on ${{ matrix.os }}
|
|
13
|
+
runs-on: ${{ matrix.os }}
|
|
14
|
+
|
|
15
|
+
strategy:
|
|
16
|
+
fail-fast: false
|
|
17
|
+
matrix:
|
|
18
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
19
|
+
python-version: ['3.9', '3.10', '3.11', '3.12']
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- name: Checkout code
|
|
23
|
+
uses: actions/checkout@v4
|
|
24
|
+
|
|
25
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
26
|
+
uses: actions/setup-python@v5
|
|
27
|
+
with:
|
|
28
|
+
python-version: ${{ matrix.python-version }}
|
|
29
|
+
|
|
30
|
+
- name: Display Python version
|
|
31
|
+
run: python --version
|
|
32
|
+
|
|
33
|
+
- name: Install uv (Unix)
|
|
34
|
+
if: runner.os != 'Windows'
|
|
35
|
+
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
36
|
+
|
|
37
|
+
- name: Install uv (Windows)
|
|
38
|
+
if: runner.os == 'Windows'
|
|
39
|
+
run: |
|
|
40
|
+
irm https://astral.sh/uv/install.ps1 | iex
|
|
41
|
+
echo "$env:USERPROFILE\.cargo\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
|
42
|
+
shell: pwsh
|
|
43
|
+
|
|
44
|
+
- name: Verify uv installation
|
|
45
|
+
run: uv --version
|
|
46
|
+
|
|
47
|
+
- name: Install build dependencies
|
|
48
|
+
run: |
|
|
49
|
+
python -m pip install --upgrade pip
|
|
50
|
+
pip install build hatch-autorun pytest
|
|
51
|
+
env:
|
|
52
|
+
AUTO_UV_DISABLE: "1"
|
|
53
|
+
|
|
54
|
+
- name: Build package
|
|
55
|
+
run: python -m build
|
|
56
|
+
env:
|
|
57
|
+
AUTO_UV_DISABLE: "1"
|
|
58
|
+
|
|
59
|
+
- name: Install package
|
|
60
|
+
run: pip install dist/*.whl
|
|
61
|
+
shell: bash
|
|
62
|
+
env:
|
|
63
|
+
AUTO_UV_DISABLE: "1"
|
|
64
|
+
|
|
65
|
+
- name: Verify installation
|
|
66
|
+
run: python -c "import auto_uv; print('auto-uv imported successfully')"
|
|
67
|
+
env:
|
|
68
|
+
AUTO_UV_DISABLE: "1"
|
|
69
|
+
|
|
70
|
+
- name: Run tests
|
|
71
|
+
run: python tests/test_auto_uv.py
|
|
72
|
+
env:
|
|
73
|
+
AUTO_UV_DISABLE: "1"
|
|
74
|
+
|
|
75
|
+
- name: Test example script
|
|
76
|
+
run: python example.py
|
|
77
|
+
env:
|
|
78
|
+
AUTO_UV_DISABLE: "1"
|
|
79
|
+
|
|
80
|
+
- name: Test with AUTO_UV_DISABLE
|
|
81
|
+
run: python example.py
|
|
82
|
+
env:
|
|
83
|
+
AUTO_UV_DISABLE: "1"
|
|
84
|
+
|
|
85
|
+
- name: Upload build artifacts
|
|
86
|
+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
|
|
87
|
+
uses: actions/upload-artifact@v4
|
|
88
|
+
with:
|
|
89
|
+
name: dist-packages
|
|
90
|
+
path: dist/
|
|
91
|
+
retention-days: 7
|
|
92
|
+
|
|
93
|
+
lint:
|
|
94
|
+
name: Lint and Format Check
|
|
95
|
+
runs-on: ubuntu-latest
|
|
96
|
+
|
|
97
|
+
steps:
|
|
98
|
+
- name: Checkout code
|
|
99
|
+
uses: actions/checkout@v4
|
|
100
|
+
|
|
101
|
+
- name: Set up Python
|
|
102
|
+
uses: actions/setup-python@v5
|
|
103
|
+
with:
|
|
104
|
+
python-version: '3.11'
|
|
105
|
+
|
|
106
|
+
- name: Install linting tools
|
|
107
|
+
run: |
|
|
108
|
+
python -m pip install --upgrade pip
|
|
109
|
+
pip install ruff black mypy
|
|
110
|
+
|
|
111
|
+
- name: Run ruff
|
|
112
|
+
run: ruff check src/ tests/ example.py
|
|
113
|
+
continue-on-error: true
|
|
114
|
+
|
|
115
|
+
- name: Check formatting with black
|
|
116
|
+
run: black --check src/ tests/ example.py
|
|
117
|
+
continue-on-error: true
|
|
118
|
+
|
|
119
|
+
- name: Run mypy
|
|
120
|
+
run: mypy src/
|
|
121
|
+
continue-on-error: true
|
|
122
|
+
|
|
123
|
+
coverage:
|
|
124
|
+
name: Code Coverage
|
|
125
|
+
runs-on: ubuntu-latest
|
|
126
|
+
|
|
127
|
+
steps:
|
|
128
|
+
- name: Checkout code
|
|
129
|
+
uses: actions/checkout@v4
|
|
130
|
+
|
|
131
|
+
- name: Set up Python
|
|
132
|
+
uses: actions/setup-python@v5
|
|
133
|
+
with:
|
|
134
|
+
python-version: '3.11'
|
|
135
|
+
|
|
136
|
+
- name: Install uv
|
|
137
|
+
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
138
|
+
|
|
139
|
+
- name: Install dependencies
|
|
140
|
+
run: |
|
|
141
|
+
python -m pip install --upgrade pip
|
|
142
|
+
pip install build hatch-autorun pytest pytest-cov
|
|
143
|
+
|
|
144
|
+
- name: Build and install package
|
|
145
|
+
run: |
|
|
146
|
+
python -m build
|
|
147
|
+
pip install dist/*.whl
|
|
148
|
+
|
|
149
|
+
- name: Run tests with coverage
|
|
150
|
+
run: pytest tests/ --cov=src --cov-report=xml --cov-report=term
|
|
151
|
+
continue-on-error: true
|
|
152
|
+
|
|
153
|
+
- name: Upload coverage reports
|
|
154
|
+
uses: codecov/codecov-action@v4
|
|
155
|
+
if: always()
|
|
156
|
+
with:
|
|
157
|
+
file: ./coverage.xml
|
|
158
|
+
flags: unittests
|
|
159
|
+
name: codecov-umbrella
|
|
160
|
+
continue-on-error: true
|
|
161
|
+
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
name: Version Bump
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
version_type:
|
|
7
|
+
description: 'Version bump type'
|
|
8
|
+
required: true
|
|
9
|
+
type: choice
|
|
10
|
+
options:
|
|
11
|
+
- patch
|
|
12
|
+
- minor
|
|
13
|
+
- major
|
|
14
|
+
default: 'patch'
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
bump-version:
|
|
18
|
+
name: Bump version and create release
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
|
|
21
|
+
permissions:
|
|
22
|
+
contents: write
|
|
23
|
+
pull-requests: write
|
|
24
|
+
|
|
25
|
+
steps:
|
|
26
|
+
- name: Checkout code
|
|
27
|
+
uses: actions/checkout@v4
|
|
28
|
+
with:
|
|
29
|
+
fetch-depth: 0
|
|
30
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
31
|
+
|
|
32
|
+
- name: Set up Python
|
|
33
|
+
uses: actions/setup-python@v5
|
|
34
|
+
with:
|
|
35
|
+
python-version: '3.11'
|
|
36
|
+
|
|
37
|
+
- name: Install bump2version
|
|
38
|
+
run: pip install bump2version
|
|
39
|
+
|
|
40
|
+
- name: Configure git
|
|
41
|
+
run: |
|
|
42
|
+
git config user.name "github-actions[bot]"
|
|
43
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
44
|
+
|
|
45
|
+
- name: Get current version
|
|
46
|
+
id: current_version
|
|
47
|
+
run: |
|
|
48
|
+
CURRENT_VERSION=$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
|
|
49
|
+
echo "version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
|
|
50
|
+
echo "Current version: $CURRENT_VERSION"
|
|
51
|
+
|
|
52
|
+
- name: Bump version
|
|
53
|
+
id: bump
|
|
54
|
+
run: |
|
|
55
|
+
# Create bump2version config
|
|
56
|
+
cat > .bumpversion.cfg << EOF
|
|
57
|
+
[bumpversion]
|
|
58
|
+
current_version = ${{ steps.current_version.outputs.version }}
|
|
59
|
+
commit = True
|
|
60
|
+
tag = True
|
|
61
|
+
tag_name = v{new_version}
|
|
62
|
+
message = Bump version: {current_version} → {new_version}
|
|
63
|
+
|
|
64
|
+
[bumpversion:file:pyproject.toml]
|
|
65
|
+
search = version = "{current_version}"
|
|
66
|
+
replace = version = "{new_version}"
|
|
67
|
+
EOF
|
|
68
|
+
|
|
69
|
+
# Bump version
|
|
70
|
+
bump2version ${{ github.event.inputs.version_type }}
|
|
71
|
+
|
|
72
|
+
# Get new version
|
|
73
|
+
NEW_VERSION=$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
|
|
74
|
+
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
|
|
75
|
+
echo "New version: $NEW_VERSION"
|
|
76
|
+
|
|
77
|
+
- name: Push changes
|
|
78
|
+
run: |
|
|
79
|
+
git push origin main
|
|
80
|
+
git push origin v${{ steps.bump.outputs.new_version }}
|
|
81
|
+
|
|
82
|
+
- name: Create GitHub Release
|
|
83
|
+
env:
|
|
84
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
85
|
+
run: |
|
|
86
|
+
gh release create v${{ steps.bump.outputs.new_version }} \
|
|
87
|
+
--title "Release v${{ steps.bump.outputs.new_version }}" \
|
|
88
|
+
--generate-notes \
|
|
89
|
+
--draft
|
|
90
|
+
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
name: Build and Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
inputs:
|
|
8
|
+
publish_to_pypi:
|
|
9
|
+
description: 'Publish to PyPI'
|
|
10
|
+
required: true
|
|
11
|
+
type: boolean
|
|
12
|
+
default: false
|
|
13
|
+
publish_to_test_pypi:
|
|
14
|
+
description: 'Publish to Test PyPI'
|
|
15
|
+
required: true
|
|
16
|
+
type: boolean
|
|
17
|
+
default: true
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
build:
|
|
21
|
+
name: Build distribution packages
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
|
|
24
|
+
steps:
|
|
25
|
+
- name: Checkout code
|
|
26
|
+
uses: actions/checkout@v4
|
|
27
|
+
|
|
28
|
+
- name: Set up Python
|
|
29
|
+
uses: actions/setup-python@v5
|
|
30
|
+
with:
|
|
31
|
+
python-version: '3.11'
|
|
32
|
+
|
|
33
|
+
- name: Install build dependencies
|
|
34
|
+
run: |
|
|
35
|
+
python -m pip install --upgrade pip
|
|
36
|
+
pip install build hatch-autorun twine
|
|
37
|
+
|
|
38
|
+
- name: Build package
|
|
39
|
+
run: python -m build
|
|
40
|
+
|
|
41
|
+
- name: Check distribution files
|
|
42
|
+
run: twine check dist/*
|
|
43
|
+
|
|
44
|
+
- name: List distribution files
|
|
45
|
+
run: ls -lh dist/
|
|
46
|
+
|
|
47
|
+
- name: Upload artifacts
|
|
48
|
+
uses: actions/upload-artifact@v4
|
|
49
|
+
with:
|
|
50
|
+
name: python-package-distributions
|
|
51
|
+
path: dist/
|
|
52
|
+
retention-days: 30
|
|
53
|
+
|
|
54
|
+
publish-test-pypi:
|
|
55
|
+
name: Publish to Test PyPI
|
|
56
|
+
needs: build
|
|
57
|
+
runs-on: ubuntu-latest
|
|
58
|
+
if: |
|
|
59
|
+
(github.event_name == 'workflow_dispatch' && github.event.inputs.publish_to_test_pypi == 'true') ||
|
|
60
|
+
github.event_name == 'release'
|
|
61
|
+
|
|
62
|
+
environment:
|
|
63
|
+
name: test-pypi
|
|
64
|
+
url: https://test.pypi.org/p/auto-uv
|
|
65
|
+
|
|
66
|
+
permissions:
|
|
67
|
+
id-token: write
|
|
68
|
+
|
|
69
|
+
steps:
|
|
70
|
+
- name: Download artifacts
|
|
71
|
+
uses: actions/download-artifact@v4
|
|
72
|
+
with:
|
|
73
|
+
name: python-package-distributions
|
|
74
|
+
path: dist/
|
|
75
|
+
|
|
76
|
+
- name: Publish to Test PyPI
|
|
77
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
78
|
+
with:
|
|
79
|
+
repository-url: https://test.pypi.org/legacy/
|
|
80
|
+
skip-existing: true
|
|
81
|
+
|
|
82
|
+
publish-pypi:
|
|
83
|
+
name: Publish to PyPI
|
|
84
|
+
needs: build
|
|
85
|
+
runs-on: ubuntu-latest
|
|
86
|
+
if: |
|
|
87
|
+
(github.event_name == 'workflow_dispatch' && github.event.inputs.publish_to_pypi == 'true') ||
|
|
88
|
+
(github.event_name == 'release' && !github.event.release.prerelease)
|
|
89
|
+
|
|
90
|
+
environment:
|
|
91
|
+
name: pypi
|
|
92
|
+
url: https://pypi.org/p/auto-uv
|
|
93
|
+
|
|
94
|
+
permissions:
|
|
95
|
+
id-token: write
|
|
96
|
+
|
|
97
|
+
steps:
|
|
98
|
+
- name: Download artifacts
|
|
99
|
+
uses: actions/download-artifact@v4
|
|
100
|
+
with:
|
|
101
|
+
name: python-package-distributions
|
|
102
|
+
path: dist/
|
|
103
|
+
|
|
104
|
+
- name: Publish to PyPI
|
|
105
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
106
|
+
|
|
107
|
+
create-github-release-notes:
|
|
108
|
+
name: Create GitHub Release Notes
|
|
109
|
+
needs: build
|
|
110
|
+
runs-on: ubuntu-latest
|
|
111
|
+
if: github.event_name == 'release'
|
|
112
|
+
|
|
113
|
+
permissions:
|
|
114
|
+
contents: write
|
|
115
|
+
|
|
116
|
+
steps:
|
|
117
|
+
- name: Download artifacts
|
|
118
|
+
uses: actions/download-artifact@v4
|
|
119
|
+
with:
|
|
120
|
+
name: python-package-distributions
|
|
121
|
+
path: dist/
|
|
122
|
+
|
|
123
|
+
- name: Upload to GitHub Release
|
|
124
|
+
env:
|
|
125
|
+
GITHUB_TOKEN: ${{ github.token }}
|
|
126
|
+
run: |
|
|
127
|
+
gh release upload '${{ github.ref_name }}' dist/** --repo '${{ github.repository }}'
|
|
128
|
+
|
auto_uv-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
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
|
+
pip-wheel-metadata/
|
|
24
|
+
share/python-wheels/
|
|
25
|
+
*.egg-info/
|
|
26
|
+
.installed.cfg
|
|
27
|
+
*.egg
|
|
28
|
+
MANIFEST
|
|
29
|
+
|
|
30
|
+
# PyInstaller
|
|
31
|
+
*.manifest
|
|
32
|
+
*.spec
|
|
33
|
+
|
|
34
|
+
# Installer logs
|
|
35
|
+
pip-log.txt
|
|
36
|
+
pip-delete-this-directory.txt
|
|
37
|
+
|
|
38
|
+
# Unit test / coverage reports
|
|
39
|
+
htmlcov/
|
|
40
|
+
.tox/
|
|
41
|
+
.nox/
|
|
42
|
+
.coverage
|
|
43
|
+
.coverage.*
|
|
44
|
+
.cache
|
|
45
|
+
nosetests.xml
|
|
46
|
+
coverage.xml
|
|
47
|
+
*.cover
|
|
48
|
+
*.py,cover
|
|
49
|
+
.hypothesis/
|
|
50
|
+
.pytest_cache/
|
|
51
|
+
|
|
52
|
+
# Translations
|
|
53
|
+
*.mo
|
|
54
|
+
*.pot
|
|
55
|
+
|
|
56
|
+
# Django stuff:
|
|
57
|
+
*.log
|
|
58
|
+
local_settings.py
|
|
59
|
+
db.sqlite3
|
|
60
|
+
db.sqlite3-journal
|
|
61
|
+
|
|
62
|
+
# Flask stuff:
|
|
63
|
+
instance/
|
|
64
|
+
.webassets-cache
|
|
65
|
+
|
|
66
|
+
# VS Code:
|
|
67
|
+
.vscode/
|
|
68
|
+
|
|
69
|
+
# Scrapy stuff:
|
|
70
|
+
.scrapy
|
|
71
|
+
|
|
72
|
+
# Sphinx documentation
|
|
73
|
+
docs/_build/
|
|
74
|
+
|
|
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
|
+
.python-version
|
|
87
|
+
|
|
88
|
+
# pipenv
|
|
89
|
+
Pipfile.lock
|
|
90
|
+
|
|
91
|
+
# PEP 582
|
|
92
|
+
__pypackages__/
|
|
93
|
+
|
|
94
|
+
# Celery stuff
|
|
95
|
+
celerybeat-schedule
|
|
96
|
+
celerybeat.pid
|
|
97
|
+
|
|
98
|
+
# SageMath parsed files
|
|
99
|
+
*.sage.py
|
|
100
|
+
|
|
101
|
+
# Environments
|
|
102
|
+
.env
|
|
103
|
+
!.env.example
|
|
104
|
+
.venv
|
|
105
|
+
env/
|
|
106
|
+
venv/
|
|
107
|
+
ENV/
|
|
108
|
+
env.bak/
|
|
109
|
+
venv.bak/
|
|
110
|
+
|
|
111
|
+
# Spyder project settings
|
|
112
|
+
.spyderproject
|
|
113
|
+
.spyproject
|
|
114
|
+
|
|
115
|
+
# Rope project settings
|
|
116
|
+
.ropeproject
|
|
117
|
+
|
|
118
|
+
# mkdocs documentation
|
|
119
|
+
/site
|
|
120
|
+
|
|
121
|
+
# mypy
|
|
122
|
+
.mypy_cache/
|
|
123
|
+
.dmypy.json
|
|
124
|
+
dmypy.json
|
|
125
|
+
|
|
126
|
+
# Pyre type checker
|
|
127
|
+
.pyre/
|
|
128
|
+
|
|
129
|
+
# IDEs
|
|
130
|
+
.vscode/
|
|
131
|
+
.idea/
|
|
132
|
+
*.swp
|
|
133
|
+
*.swo
|
|
134
|
+
*~
|
|
135
|
+
|
|
136
|
+
# OS
|
|
137
|
+
.DS_Store
|
|
138
|
+
Thumbs.db
|
|
139
|
+
|
|
140
|
+
# UV specific
|
|
141
|
+
.uv/
|
|
142
|
+
uv.lock
|
|
143
|
+
|
|
144
|
+
# Auto-dotenv example (if present)
|
|
145
|
+
auto-dotenv-main/
|
|
146
|
+
|
|
147
|
+
# Act (local GitHub Actions) uses .env which is already ignored above
|
|
148
|
+
|
|
149
|
+
# Pre-commit
|
|
150
|
+
.pre-commit-cache/
|
|
151
|
+
|
|
152
|
+
# Bump2version
|
|
153
|
+
.bumpversion.cfg
|
|
154
|
+
|
|
155
|
+
# pytest
|
|
156
|
+
.pytest_cache/
|
|
157
|
+
|
|
158
|
+
# Coverage
|
|
159
|
+
.coverage
|
|
160
|
+
htmlcov/
|
|
161
|
+
coverage.xml
|
|
162
|
+
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Pre-commit hooks configuration
|
|
2
|
+
# See https://pre-commit.com for more information
|
|
3
|
+
|
|
4
|
+
repos:
|
|
5
|
+
# General file checks
|
|
6
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
7
|
+
rev: v6.0.0
|
|
8
|
+
hooks:
|
|
9
|
+
- id: trailing-whitespace
|
|
10
|
+
exclude: ^tests/
|
|
11
|
+
- id: end-of-file-fixer
|
|
12
|
+
exclude: ^tests/
|
|
13
|
+
- id: check-yaml
|
|
14
|
+
args: [--safe]
|
|
15
|
+
- id: check-toml
|
|
16
|
+
- id: check-added-large-files
|
|
17
|
+
args: [--maxkb=1000]
|
|
18
|
+
- id: check-case-conflict
|
|
19
|
+
- id: check-merge-conflict
|
|
20
|
+
- id: check-json
|
|
21
|
+
- id: pretty-format-json
|
|
22
|
+
args: [--autofix, --no-sort-keys]
|
|
23
|
+
- id: mixed-line-ending
|
|
24
|
+
args: [--fix=lf]
|
|
25
|
+
- id: detect-private-key
|
|
26
|
+
|
|
27
|
+
# Python code formatting with Black
|
|
28
|
+
- repo: https://github.com/psf/black
|
|
29
|
+
rev: 25.11.0
|
|
30
|
+
hooks:
|
|
31
|
+
- id: black
|
|
32
|
+
language_version: python3.11
|
|
33
|
+
args: [--line-length=88]
|
|
34
|
+
files: ^(src/|tests/|example\.py)
|
|
35
|
+
|
|
36
|
+
# Python import sorting
|
|
37
|
+
- repo: https://github.com/pycqa/isort
|
|
38
|
+
rev: 7.0.0
|
|
39
|
+
hooks:
|
|
40
|
+
- id: isort
|
|
41
|
+
args: [--profile, black, --line-length, "88"]
|
|
42
|
+
files: ^(src/|tests/|example\.py)
|
|
43
|
+
|
|
44
|
+
# Python linting with Ruff (fast)
|
|
45
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
46
|
+
rev: v0.14.5
|
|
47
|
+
hooks:
|
|
48
|
+
- id: ruff
|
|
49
|
+
args: [--fix, --exit-non-zero-on-fix]
|
|
50
|
+
files: ^(src/|tests/|example\.py)
|
|
51
|
+
|
|
52
|
+
# Python type checking with mypy
|
|
53
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
54
|
+
rev: v1.18.2
|
|
55
|
+
hooks:
|
|
56
|
+
- id: mypy
|
|
57
|
+
additional_dependencies: [types-all]
|
|
58
|
+
args: [--ignore-missing-imports, --no-strict-optional]
|
|
59
|
+
files: ^src/
|
|
60
|
+
|
|
61
|
+
# Security checks
|
|
62
|
+
- repo: https://github.com/PyCQA/bandit
|
|
63
|
+
rev: 1.9.1
|
|
64
|
+
hooks:
|
|
65
|
+
- id: bandit
|
|
66
|
+
args: [-c, pyproject.toml]
|
|
67
|
+
additional_dependencies: ["bandit[toml]"]
|
|
68
|
+
files: ^src/
|
|
69
|
+
|
|
70
|
+
# Markdown linting
|
|
71
|
+
- repo: https://github.com/igorshubovych/markdownlint-cli
|
|
72
|
+
rev: v0.46.0
|
|
73
|
+
hooks:
|
|
74
|
+
- id: markdownlint
|
|
75
|
+
args: [--fix]
|
|
76
|
+
exclude: ^(CHANGELOG\.md|\.github/)
|
|
77
|
+
|
|
78
|
+
# Spell checking
|
|
79
|
+
- repo: https://github.com/codespell-project/codespell
|
|
80
|
+
rev: v2.4.1
|
|
81
|
+
hooks:
|
|
82
|
+
- id: codespell
|
|
83
|
+
args: [--ignore-words-list=crate]
|
|
84
|
+
exclude: ^(\.git/|\.github/|dist/|build/)
|
|
85
|
+
|
|
86
|
+
# YAML linting
|
|
87
|
+
- repo: https://github.com/adrienverge/yamllint
|
|
88
|
+
rev: v1.37.1
|
|
89
|
+
hooks:
|
|
90
|
+
- id: yamllint
|
|
91
|
+
args: [--strict, -c, .yamllint.yml]
|
|
92
|
+
files: \.ya?ml$
|
|
93
|
+
|
|
94
|
+
# Global settings
|
|
95
|
+
default_install_hook_types: [pre-commit, commit-msg]
|
|
96
|
+
default_stages: [commit]
|
|
97
|
+
fail_fast: false
|
|
98
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# YAML linting configuration
|
|
2
|
+
extends: default
|
|
3
|
+
|
|
4
|
+
rules:
|
|
5
|
+
line-length:
|
|
6
|
+
max: 120
|
|
7
|
+
level: warning
|
|
8
|
+
|
|
9
|
+
indentation:
|
|
10
|
+
spaces: 2
|
|
11
|
+
indent-sequences: true
|
|
12
|
+
|
|
13
|
+
comments:
|
|
14
|
+
min-spaces-from-content: 1
|
|
15
|
+
|
|
16
|
+
comments-indentation: {}
|
|
17
|
+
|
|
18
|
+
document-start: disable
|
|
19
|
+
|
|
20
|
+
truthy:
|
|
21
|
+
allowed-values: ['true', 'false', 'on', 'off']
|
|
22
|
+
check-keys: false
|
|
23
|
+
|
|
24
|
+
ignore: |
|
|
25
|
+
.github/
|
|
26
|
+
dist/
|
|
27
|
+
build/
|
|
28
|
+
|