Skip to content

Commit 9bd2723

Browse files
committed
1 parent da05360 commit 9bd2723

File tree

8 files changed

+814
-1154
lines changed

8 files changed

+814
-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: 77 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,87 @@
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-
129
homepage = "https://www.git-pull.com"
10+
license = { text = "All rights reserved." }
1311

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

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)