Skip to content

Commit 29222a6

Browse files
committed
Release version 0.1.0
- Initial release of auto-uv package - Automatically intercepts Python script execution and uses 'uv run' - Added prek for pre-commit config management - Updated all pre-commit hooks to latest versions - Added mbake formatting support for Makefile - Python 3.9+ support - Comprehensive test suite with CI/CD workflows - All tests pass successfully
1 parent 7e9f532 commit 29222a6

5 files changed

Lines changed: 48 additions & 15 deletions

File tree

.github/workflows/test.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
os: [ubuntu-latest, macos-latest, windows-latest]
19-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
19+
python-version: ['3.9', '3.10', '3.11', '3.12']
2020

2121
steps:
2222
- name: Checkout code
@@ -48,22 +48,34 @@ jobs:
4848
run: |
4949
python -m pip install --upgrade pip
5050
pip install build hatch-autorun pytest
51+
env:
52+
AUTO_UV_DISABLE: "1"
5153

5254
- name: Build package
5355
run: python -m build
56+
env:
57+
AUTO_UV_DISABLE: "1"
5458

5559
- name: Install package
5660
run: pip install dist/*.whl
5761
shell: bash
62+
env:
63+
AUTO_UV_DISABLE: "1"
5864

5965
- name: Verify installation
6066
run: python -c "import auto_uv; print('✅ auto-uv imported successfully')"
67+
env:
68+
AUTO_UV_DISABLE: "1"
6169

6270
- name: Run tests
6371
run: python tests/test_auto_uv.py
72+
env:
73+
AUTO_UV_DISABLE: "1"
6474

6575
- name: Test example script
6676
run: python example.py
77+
env:
78+
AUTO_UV_DISABLE: "1"
6779

6880
- name: Test with AUTO_UV_DISABLE
6981
run: python example.py

.pre-commit-config.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
repos:
55
# General file checks
66
- repo: https://github.com/pre-commit/pre-commit-hooks
7-
rev: v4.5.0
7+
rev: v6.0.0
88
hooks:
99
- id: trailing-whitespace
1010
exclude: ^tests/
@@ -26,7 +26,7 @@ repos:
2626

2727
# Python code formatting with Black
2828
- repo: https://github.com/psf/black
29-
rev: 24.1.1
29+
rev: 25.11.0
3030
hooks:
3131
- id: black
3232
language_version: python3.11
@@ -35,23 +35,23 @@ repos:
3535

3636
# Python import sorting
3737
- repo: https://github.com/pycqa/isort
38-
rev: 5.13.2
38+
rev: 7.0.0
3939
hooks:
4040
- id: isort
4141
args: [--profile, black, --line-length, "88"]
4242
files: ^(src/|tests/|example\.py)
4343

4444
# Python linting with Ruff (fast)
4545
- repo: https://github.com/astral-sh/ruff-pre-commit
46-
rev: v0.1.15
46+
rev: v0.14.5
4747
hooks:
4848
- id: ruff
4949
args: [--fix, --exit-non-zero-on-fix]
5050
files: ^(src/|tests/|example\.py)
5151

5252
# Python type checking with mypy
5353
- repo: https://github.com/pre-commit/mirrors-mypy
54-
rev: v1.8.0
54+
rev: v1.18.2
5555
hooks:
5656
- id: mypy
5757
additional_dependencies: [types-all]
@@ -60,7 +60,7 @@ repos:
6060

6161
# Security checks
6262
- repo: https://github.com/PyCQA/bandit
63-
rev: 1.7.6
63+
rev: 1.9.1
6464
hooks:
6565
- id: bandit
6666
args: [-c, pyproject.toml]
@@ -69,23 +69,23 @@ repos:
6969

7070
# Markdown linting
7171
- repo: https://github.com/igorshubovych/markdownlint-cli
72-
rev: v0.39.0
72+
rev: v0.46.0
7373
hooks:
7474
- id: markdownlint
7575
args: [--fix]
7676
exclude: ^(CHANGELOG\.md|\.github/)
7777

7878
# Spell checking
7979
- repo: https://github.com/codespell-project/codespell
80-
rev: v2.2.6
80+
rev: v2.4.1
8181
hooks:
8282
- id: codespell
8383
args: [--ignore-words-list=crate]
8484
exclude: ^(\.git/|\.github/|dist/|build/)
8585

8686
# YAML linting
8787
- repo: https://github.com/adrienverge/yamllint
88-
rev: v1.33.0
88+
rev: v1.37.1
8989
hooks:
9090
- id: yamllint
9191
args: [--strict, -c, .yamllint.yml]

Makefile

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
.PHONY: help install dev-install test lint format clean build publish act-test pre-commit
44

55
# Load .env file if it exists
6-
-include .env
6+
-include .env
77
export
88

99
# Default target
@@ -41,6 +41,9 @@ format: ## Format code
4141
black src/ tests/ example.py
4242
isort src/ tests/ example.py
4343

44+
format-makefile: ## Format Makefile with mbake
45+
AUTO_UV_DISABLE=1 uv run mbake format Makefile
46+
4447
format-check: ## Check formatting without fixing
4548
black --check src/ tests/ example.py
4649
isort --check-only src/ tests/ example.py
@@ -61,7 +64,8 @@ build: clean ## Build package
6164
uv build
6265

6366
build-check: build ## Build and check distribution
64-
uv build --check
67+
@echo "✅ Build complete. Check dist/ directory"
68+
@ls -lh dist/
6569

6670
publish-test: build ## Publish to Test PyPI (reads UV_PUBLISH_TOKEN from .env)
6771
@if [ -z "$$UV_PUBLISH_TOKEN" ]; then \
@@ -97,6 +101,15 @@ pre-commit: ## Run pre-commit on all files
97101
pre-commit-update: ## Update pre-commit hooks
98102
pre-commit autoupdate
99103

104+
prek-update: ## Auto-update pre-commit config to latest versions
105+
AUTO_UV_DISABLE=1 uv run prek auto-update
106+
107+
prek-run: ## Run prek hooks
108+
AUTO_UV_DISABLE=1 uv run prek run --all-files
109+
110+
prek-install: ## Install prek git hooks
111+
AUTO_UV_DISABLE=1 uv run prek install
112+
100113
version-patch: ## Bump patch version (0.1.0 -> 0.1.1)
101114
@echo "Bumping patch version..."
102115
@CURRENT=$$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/'); \
@@ -153,5 +166,4 @@ release: clean build build-check ## Prepare release
153166
@echo "Next steps:"
154167
@echo " 1. Test: pip install dist/*.whl"
155168
@echo " 2. Push: git push origin main --tags"
156-
@echo " 3. Publish: make publish-test OR make publish"
157-
169+
@echo " 3. Publish: make publish-test OR make publish"

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# auto-uv
22

3+
[![Python Version](https://img.shields.io/badge/python-3.9%2B-blue)](https://www.python.org/downloads/)
4+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5+
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
6+
37
Automatically use `uv run` when executing Python scripts. Just type `python script.py` instead of `uv run script.py`!
48

59
## What is This?
@@ -39,7 +43,7 @@ If all conditions are met, it re-executes your script with `uv run`, giving you
3943

4044
## Requirements
4145

42-
- Python 3.8+
46+
- Python 3.9+
4347
- `uv` installed and in your PATH
4448

4549
Install uv:

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ requires-python = ">= 3.9"
1313
license = { file = "LICENSE" }
1414
classifiers = [
1515
"Programming Language :: Python :: 3",
16+
"Programming Language :: Python :: 3.9",
17+
"Programming Language :: Python :: 3.10",
18+
"Programming Language :: Python :: 3.11",
19+
"Programming Language :: Python :: 3.12",
1620
"License :: OSI Approved :: MIT License",
1721
"Operating System :: OS Independent",
1822
"Development Status :: 4 - Beta",
@@ -103,5 +107,6 @@ skip_covered = false
103107
[dependency-groups]
104108
dev = [
105109
"mbake>=1.4.3",
110+
"prek>=0.2.17",
106111
"python-dotenv>=1.2.1",
107112
]

0 commit comments

Comments
 (0)