Skip to content

Commit 288893e

Browse files
Merge pull request #402 from UKPythonAssociation/feature/uv
Move from pipenv to uv
2 parents 56c077f + 53f6328 commit 288893e

File tree

8 files changed

+435
-399
lines changed

8 files changed

+435
-399
lines changed

.github/workflows/pythonapp.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,19 @@ name: Sphinx site
22

33
on: [push]
44

5+
env:
6+
UV_LOCKED: 1
7+
58
jobs:
69
build:
710

811
runs-on: ubuntu-latest
912

1013
steps:
1114
- uses: actions/checkout@v1
12-
- name: Set up Python 3.11
13-
uses: actions/setup-python@v1
15+
- uses: astral-sh/setup-uv@v7
1416
with:
15-
python-version: 3.11
16-
cache: "pipenv"
17-
- name: Install Pipenv
18-
run: |
19-
curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
20-
- name: Install dependencies
21-
run: |
22-
pipenv install
17+
enable-cache: true
2318
- name: Build
2419
run: |
25-
pipenv run make html dirhtml
20+
make html dirhtml

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.11

.readthedocs.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ build:
77
tools:
88
python: "3.11"
99
jobs:
10-
pre_install:
11-
- "pip install pipenv"
12-
- "pipenv requirements > requirements.txt"
10+
pre_create_environment:
11+
- "asdf plugin add uv"
12+
- "asdf install uv latest"
13+
- "asdf global uv latest"
14+
create_environment:
15+
- 'uv venv "${READTHEDOCS_VIRTUALENV_PATH}"'
16+
install:
17+
- 'UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv sync --frozen'
1318

1419
sphinx:
1520
builder: "dirhtml"
1621
configuration: "source/conf.py"
17-
18-
python:
19-
install:
20-
- requirements: "requirements.txt"

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ BUILDDIR = build
1010

1111
# Put it first so that "make" without argument is like "make help".
1212
help:
13-
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
13+
uv run $(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
1414

1515
.PHONY: help Makefile
1616

1717
# Catch-all target: route all unknown targets to Sphinx using the new
1818
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
1919
%: Makefile
20-
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
20+
uv run $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

Pipfile

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

Pipfile.lock

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

pyproject.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[project]
2+
name = "ukpa-internaldocs"
3+
version = "0.1.0"
4+
description = "Add your description here"
5+
readme = "README.md"
6+
requires-python = ">=3.11"
7+
dependencies = [
8+
"sphinx>=8.2.3",
9+
"sphinx-rtd-theme>=3.0.2",
10+
]

uv.lock

Lines changed: 408 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)