Skip to content

Commit a83fd1d

Browse files
authored
Merge pull request #235 from tuttle-dev/vibe-style
Vibe-style
2 parents ddd8758 + b5574b5 commit a83fd1d

53 files changed

Lines changed: 7481 additions & 3796 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3-
41
name: Python package
52

63
on:
@@ -16,25 +13,21 @@ jobs:
1613
strategy:
1714
fail-fast: false
1815
matrix:
19-
python-version: ["3.8", "3.9", "3.10", "3.11"]
16+
python-version: ["3.11", "3.12", "3.13"]
2017

2118
steps:
22-
- uses: actions/checkout@main
23-
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@main
19+
- uses: actions/checkout@v4
20+
- name: Install uv
21+
uses: astral-sh/setup-uv@v4
2522
with:
26-
python-version: ${{ matrix.python-version }}
23+
version: "latest"
24+
- name: Set up Python ${{ matrix.python-version }}
25+
run: uv python install ${{ matrix.python-version }}
2726
- name: Install dependencies
28-
run: |
29-
python -m pip install --upgrade pip
30-
python -m pip install flake8 pytest
31-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
27+
run: uv sync --python ${{ matrix.python-version }}
3228
- name: Lint with flake8
3329
run: |
34-
# stop the build if there are Python syntax errors or undefined names
35-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
36-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
37-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
30+
uv run --with flake8 flake8 . --exclude=.venv --count --select=E9,F63,F7,F82 --show-source --statistics
31+
uv run --with flake8 flake8 . --exclude=.venv --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
3832
- name: Test with pytest
39-
run: |
40-
pytest
33+
run: uv run pytest

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"python.testing.unittestEnabled": false,
33
"python.testing.pytestEnabled": true,
4-
"python.formatting.provider": "black"
4+
"python.formatting.provider": "black",
5+
"makefile.configureOnOpen": false
56
}

MANIFEST.in

Lines changed: 0 additions & 12 deletions
This file was deleted.

Makefile

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,28 +48,25 @@ clean-test: ## remove test and coverage artifacts
4848
rm -fr .pytest_cache
4949

5050
lint/flake8: ## check style with flake8
51-
flake8 tuttle tests
51+
uv run flake8 tuttle tests
5252
lint/black: ## check style with black
53-
black --check tuttle tests
53+
uv run black --check tuttle tests
5454

5555
lint: lint/flake8 lint/black ## check style
5656

5757
test: ## run tests quickly with the default Python
58-
pytest
59-
60-
test-all: ## run tests on every Python version with tox
61-
tox
58+
uv run pytest
6259

6360
coverage: ## check code coverage quickly with the default Python
64-
coverage run --source tuttle -m pytest
65-
coverage report -m
66-
coverage html
61+
uv run coverage run --source tuttle -m pytest
62+
uv run coverage report -m
63+
uv run coverage html
6764
$(BROWSER) htmlcov/index.html
6865

6966
docs: ## generate Sphinx HTML documentation, including API docs
7067
rm -f docs/tuttle.rst
7168
rm -f docs/modules.rst
72-
sphinx-apidoc -o docs/ tuttle
69+
uv run sphinx-apidoc -o docs/ tuttle
7370
$(MAKE) -C docs clean
7471
$(MAKE) -C docs html
7572
$(BROWSER) docs/_build/html/index.html
@@ -78,12 +75,14 @@ servedocs: docs ## compile the docs watching for changes
7875
watchmedo shell-command -p '*.rst' -c '$(MAKE) -C docs html' -R -D .
7976

8077
release: dist ## package and upload a release
81-
twine upload dist/*
78+
uv run twine upload dist/*
8279

8380
dist: clean ## builds source and wheel package
84-
python setup.py sdist
85-
python setup.py bdist_wheel
81+
uv build
8682
ls -l dist
8783

88-
install: clean ## install the package to the active Python's site-packages
89-
python setup.py install
84+
install: ## install the package with uv
85+
uv sync
86+
87+
install-dev: ## install the package with dev dependencies
88+
uv sync --all-groups

0 commit comments

Comments
 (0)