Skip to content

Commit 40d3f37

Browse files
committed
Upgrade to uv
1 parent 0f903d4 commit 40d3f37

File tree

10 files changed

+1117
-959
lines changed

10 files changed

+1117
-959
lines changed

.devcontainer/devcontainer.json

-8
This file was deleted.

.github/workflows/continuous-deployment.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151

5252
- id: install-python-dependencies
5353
name: Install Python dependencies
54-
run: uv venv && uv pip install . ".[mypy]"
54+
run: uv sync --extra mypy
5555

5656
- id: mypy
5757
name: Run mypy
@@ -81,7 +81,7 @@ jobs:
8181

8282
- id: install-python-dependencies
8383
name: Install Python dependencies
84-
run: uv venv && uv pip install . ".[test]"
84+
run: uv sync --extra test
8585
shell: bash
8686

8787
- id: tests

.github/workflows/docs.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131

3232
- id: install-python-dependencies
3333
name: Install Python dependencies
34-
run: uv venv && uv pip install . ".[docs]"
34+
run: uv sync --extra docs
3535

3636
- id: build-sphinx-documentation
3737
name: Build Sphinx documentation

.pre-commit-config.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: 'https://github.com/pre-commit/pre-commit-hooks'
5-
rev: v4.6.0
5+
rev: v5.0.0
66
hooks:
77
- id: trailing-whitespace
88
- id: end-of-file-fixer
@@ -18,29 +18,29 @@ repos:
1818
- id: check-merge-conflict
1919

2020
- repo: 'https://github.com/astral-sh/ruff-pre-commit'
21-
rev: v0.6.5
21+
rev: v0.11.2
2222
hooks:
2323
- id: ruff
2424
args:
2525
- '--fix'
2626
- id: ruff-format
2727

2828
- repo: 'https://github.com/asottile/blacken-docs'
29-
rev: 1.18.0
29+
rev: 1.19.1
3030
hooks:
3131
- id: blacken-docs
3232
additional_dependencies:
3333
- black
3434

3535
- repo: 'https://github.com/asottile/pyupgrade'
36-
rev: v3.17.0
36+
rev: v3.19.1
3737
hooks:
3838
- id: pyupgrade
3939
args:
4040
- '--py37-plus'
4141

4242
- repo: 'https://github.com/pre-commit/mirrors-mypy'
43-
rev: v1.11.2
43+
rev: v1.15.0
4444
hooks:
4545
- id: mypy
4646
# additional_dependencies:

CONTRIBUTING.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ Clone the repository. Move into the directory on your terminal.
55
Install dependencies for development.
66

77
```sh
8-
pipenv sync --dev
8+
uv sync --all-extras
99
```
1010

1111
Install pre-commit to run a battery of automatic quick fixes against your work.
1212

1313
```sh
14-
pipenv run pre-commit install
14+
uv run pre-commit install
1515
```
1616

1717
Run tests.
1818

1919
```sh
20-
pipenv run pytest
20+
uv run pytest
2121
```
2222

2323
Before you release your package, be sure to customize the `setup.py` file to fit your project.
@@ -31,13 +31,13 @@ The configuration is stored in the `docs` directory. The default settings in `do
3131
To build the documentation as a bundle of HTML files, run the following command:
3232

3333
```zsh
34-
cd docs && pipenv run make html
34+
cd docs && uv run make html
3535
```
3636

3737
You can launch a preview site with the following command:
3838

3939
```zsh
40-
cd docs && pipenv run make livehtml
40+
cd docs && uv run make livehtml
4141
```
4242

4343
The documentation site is automatically built by a [GitHub Actions workflow](https://github.com/palewire/python-open-source-template/blob/main/.github/workflows/docs.yaml) that runs on every push to the repository. If you provide the proper credentials, it will also automatically publish the documentation to an Amazon S3 bucket after a push to the main branch.

Pipfile

-23
This file was deleted.

Pipfile.lock

-908
This file was deleted.

docs/conf.py

+15-3
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@
88
# sys.path.insert(0, os.path.abspath("../your_source_code"))
99

1010
project = "your-package-name"
11+
author = "your-name"
12+
1113
year = datetime.now().year
1214
copyright = f"{year}"
13-
author = "your-name"
1415

1516
templates_path = ["_templates"]
1617
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
1718

18-
# html_theme = "palewire"
19-
html_baseurl = "/docs/"
2019
pygments_style = "sphinx"
2120

2221
autodoc_member_order = "bysource"
@@ -34,3 +33,16 @@
3433
"sphinx.ext.napoleon",
3534
"sphinxcontrib.mermaid",
3635
]
36+
37+
# palewire-sphinx-theme settings
38+
# html_theme = "palewire"
39+
# html_sidebars: dict[Any, Any] = {
40+
# "**": [
41+
# "about.html",
42+
# "navigation.html",
43+
# ]
44+
# }
45+
# html_theme_options: dict[Any, Any] = {
46+
# "canonical_url": "https://palewi.re/docs/first-llm-classifier/",
47+
# }
48+
# html_baseurl = "/docs/"

pyproject.toml

+8-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ build-backend = "setuptools.build_meta"
55
[project]
66
name = "your-package-name"
77
dynamic = ["version"]
8-
requires-python = ">=3.9"
9-
dependencies = [
10-
'exceptiongroup; python_version<"3.11"',
11-
]
8+
requires-python = "==3.12.*"
9+
dependencies = []
1210
authors = [
1311
{ name="Ben Welsh", email="[email protected]" },
1412
]
@@ -26,6 +24,11 @@ classifiers = [
2624
]
2725

2826
[project.optional-dependencies]
27+
dev = [
28+
"pre-commit",
29+
"ipython",
30+
"setuptools-scm",
31+
]
2932
test = [
3033
"pytest-runner",
3134
"pytest-cov",
@@ -38,6 +41,7 @@ docs = [
3841
"sphinx-autobuild",
3942
"sphinxcontrib-mermaid",
4043
"myst-parser",
44+
"palewire-sphinx-theme",
4145
]
4246
mypy = [
4347
"mypy",

0 commit comments

Comments
 (0)