Skip to content

Commit 110a925

Browse files
committed
1 parent da05360 commit 110a925

File tree

8 files changed

+812
-1154
lines changed

8 files changed

+812
-1154
lines changed

.github/workflows/publish.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,26 @@ jobs:
3030
python_files:
3131
- '*.py'
3232
- pyproject.toml
33-
- poetry.lock
33+
- uv.lock
3434
- .github/workflows/*
3535
3636
- name: Should publish
3737
if: steps.changes.outputs.docs == 'true' || steps.changes.outputs.root_docs == 'true' || steps.changes.outputs.python_files == 'true'
3838
run: echo "PUBLISH=$(echo true)" >> $GITHUB_ENV
3939

40-
- name: Install poetry
40+
- name: Install uv
4141
if: env.PUBLISH == 'true'
42-
run: pipx install "poetry==1.8.4"
42+
uses: astral-sh/setup-uv@v3
43+
with:
44+
enable-cache: true
4345

44-
- name: Set up Python ${{ matrix.python-version }}
45-
uses: actions/setup-python@v5
46+
- name: "Set up Python"
4647
if: env.PUBLISH == 'true'
47-
with:
48-
python-version: ${{ matrix.python-version }}
49-
cache: 'poetry'
48+
run: uv python install ${{ matrix.python-version }}
5049

5150
- name: Install dependencies [w/ docs]
5251
if: env.PUBLISH == 'true'
53-
run: poetry install --with=docs
52+
run: uv sync --all-extras --dev
5453

5554
- name: Build documentation
5655
if: env.PUBLISH == 'true'

.tmuxp-before-script.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/sh
2-
poetry shell --no-ansi --no-interaction &2> /dev/null
3-
poetry install --no-ansi --no-interaction &2> /dev/null
2+
uv virtualenv --quiet
3+
uv sync --all-extras --dev

.tmuxp.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ session_name: website
22
start_directory: ./ # load session relative to config location (project root).
33
before_script: ./.tmuxp-before-script.sh
44
shell_command_before:
5-
- '[ -f .venv/bin/activate ] && source .venv/bin/activate && reset'
5+
- uv virtualenv --quiet > /dev/null 2>&1 && clear
66
windows:
77
- window_name: website
88
focus: True

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
poetry 1.8.4
1+
uv 0.5.4
22
python 3.13.0 3.12.7 3.11.10 3.10.15 3.9.20 3.8.20 3.7.17

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ WATCH_FILES= find . -type f -not -path '*/\.*' | grep -i '.*[.]\(rst\|md\)\$\|.*
66

77
# You can set these variables from the command line.
88
SPHINXOPTS =
9-
SPHINXBUILD = poetry run sphinx-build
9+
SPHINXBUILD = uv run sphinx-build
1010
PAPER =
1111
BUILDDIR = _build
1212

@@ -181,14 +181,14 @@ format_markdown:
181181
prettier --parser=markdown -w *.md **/*.md
182182

183183
start:
184-
poetry run sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) --port ${HTTP_PORT} $(O)
184+
uv run sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) --port ${HTTP_PORT} $(O)
185185

186186
dev:
187187
$(MAKE) -j watch serve
188188

189189
start:
190-
poetry run sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) --port ${HTTP_PORT} $(O)
190+
uv run sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) --port ${HTTP_PORT} $(O)
191191

192192
design:
193193
# This adds additional watch directories (for _static file changes) and disable incremental builds
194-
poetry run sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) --port ${HTTP_PORT} --watch "." -a $(O)
194+
uv run sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) --port ${HTTP_PORT} --watch "." -a $(O)

poetry.lock

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

pyproject.toml

Lines changed: 75 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,85 @@
1-
[tool.poetry]
1+
[project]
22
name = "website"
33
version = "0.3.0"
44
description = "git-pull website"
5-
6-
license = "All Rights Reserved."
7-
5+
requires-python = ">=3.12,<4.0"
86
authors = [
9-
"Tony Narlock <[email protected]>",
7+
{name = "Tony Narlock", email = "[email protected]"}
108
]
11-
9+
license = { text = "All rights reserved." }
1210
homepage = "https://www.git-pull.com"
11+
dependencies = []
1312

14-
[tool.poetry.urls]
13+
[project.urls]
1514
"Bug Tracker" = "https://github.com/git-pull/website/issues"
1615
Repository = "https://github.com/git-pull/website"
16+
homepage = "https://www.git-pull.com"
17+
18+
[tool.uv]
19+
# Development dependencies
20+
dev-dependencies = [
21+
# Docs
22+
"sphinx",
23+
"furo",
24+
"sphinx-autobuild",
25+
"sphinx-inline-tabs",
26+
"sphinxext-opengraph",
27+
"sphinx-copybutton",
28+
"sphinxext-rediraffe",
29+
"myst-parser",
30+
"docutils",
31+
"linkify-it-py",
32+
# Lint
33+
"ruff",
34+
]
35+
36+
[dependency-groups]
37+
docs = [
38+
"sphinx",
39+
"furo",
40+
"sphinx-autobuild",
41+
"sphinx-inline-tabs",
42+
"sphinxext-opengraph",
43+
"sphinx-copybutton",
44+
"sphinxext-rediraffe",
45+
"myst-parser",
46+
"docutils",
47+
"linkify-it-py"
48+
]
49+
lint = [
50+
"ruff"
51+
]
52+
53+
[build-system]
54+
requires = ["hatchling"]
55+
build-backend = "hatchling.build"
56+
57+
[tool.mypy]
58+
strict = true
59+
exclude = ["venv", ".venv"]
60+
61+
[tool.ruff]
62+
target-version = "py312"
63+
exclude = ["venv", ".venv"]
64+
65+
[tool.ruff.lint]
66+
select = [
67+
"E", # pycodestyle errors
68+
"W", # pycodestyle warnings
69+
"F", # pyflakes
70+
"I", # isort
71+
"B", # flake8-bugbear
72+
"C4", # flake8-comprehensions
73+
"UP", # pyupgrade
74+
"ARG001", # unused arguments in functions
75+
]
76+
ignore = [
77+
"E501", # line too long, handled by black
78+
"B008", # do not perform function calls in argument defaults
79+
"W191", # indentation contains tabs
80+
]
81+
82+
[tool.ruff.lint.pyupgrade]
83+
# Preserve types, even if a file imports `from __future__ import annotations`.
84+
keep-runtime-typing = true
1785

18-
[tool.poetry.dependencies]
19-
python = "^3.12"
20-
21-
[tool.poetry.group.docs.dependencies]
22-
### Docs ###
23-
sphinx = "*"
24-
furo = "*"
25-
sphinx-autobuild = "*"
26-
sphinx-inline-tabs = "*"
27-
sphinxext-opengraph = "<0.8" # https://github.com/wpilibsuite/sphinxext-opengraph/issues/100
28-
sphinx-copybutton = "*"
29-
sphinxext-rediraffe = "*"
30-
myst_parser = "*"
31-
docutils = "*"
32-
linkify-it-py = "*"
33-
34-
[tool.poetry.group.lint.dependencies]
35-
### Lint ###
36-
ruff = "*"

0 commit comments

Comments
 (0)