Skip to content

Commit 2fe938f

Browse files
committed
misc: Replace poetry with uv
uv is faster and always updates the virtual env on every run which avoids a lot of common issues.
1 parent b6f83e4 commit 2fe938f

File tree

7 files changed

+987
-1293
lines changed

7 files changed

+987
-1293
lines changed

.github/CODEOWNERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@
44
# devops
55
.github/ @greenbone/devops @greenbone/docs-maintainers
66
pyproject.toml @greenbone/devops @greenbone/docs-maintainers
7-
poetry.lock @greenbone/devops @greenbone/docs-maintainers

.github/workflows/ci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
uses: actions/setup-python@v5
1515
with:
1616
python-version: "3.11"
17-
- name: Install poetry and dependencies
18-
uses: greenbone/actions/poetry@v3
17+
- name: Install uv
18+
uses: greenbone/actions/uv@v3
1919
- name: Build docs
20-
run: poetry run sphinx-build -W --keep-going -b html src _build
20+
run: uv run sphinx-build -W --keep-going -b html src _build
2121
- name: Upload Documentation Artifact
2222
uses: actions/upload-artifact@v4
2323
with:

.github/workflows/github-pages.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
uses: actions/setup-python@v5
1616
with:
1717
python-version: "3.11"
18-
- name: Install poetry and dependencies
19-
uses: greenbone/actions/poetry@v3
18+
- name: Install uv
19+
uses: greenbone/actions/uv@v3
2020
- name: Build docs
21-
run: poetry run sphinx-build -b html src _build
21+
run: uv run sphinx-build -b html src _build
2222
- name: Upload Documentation Artifact
2323
uses: actions/upload-artifact@v4
2424
with:

README.md

Lines changed: 12 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3,47 +3,36 @@
33
# Documentation for the Greenbone Community Edition
44

55
The documentation is build automatically via GitHub Actions and available at
6-
https://greenbone.github.io/docs/
6+
[https://greenbone.github.io/docs/](https://greenbone.github.io/docs/)
77

88
## Requirements
99

10-
For a manual build locally Python >= 3.9 and [poetry] is required.
10+
For a manual build locally Python >= 3.9 and [uv] is required.
1111

12-
## Install Poetry
12+
## Install uv
1313

14-
The project requires poetry >= 1.8.0.
14+
The project requires [uv]. See [https://docs.astral.sh/uv/getting-started/installation/](https://docs.astral.sh/uv/getting-started/installation/)
15+
for detailed instructions for installing uv.
1516

16-
To install poetry it is recommended to use [pipx]. pipx can be installed with
17+
A simple method to install uv is to use [pipx]. pipx can be installed with
1718
the following command on Debian based systems:
1819

1920
```sh
2021
sudo apt install pipx
2122
```
2223

23-
Install poetry using pipx
24+
Install uv using pipx
2425

2526
```sh
26-
python3 -m pipx install poetry
27+
python3 -m pipx install uv
2728
```
2829

29-
## Install and Upgrade Dependencies
30-
31-
When building the docs you should ensure that all the dependencies are installed
32-
and up to date. To install for the first time or to update the project
33-
dependencies via [poetry] run:
34-
35-
```sh
36-
poetry install
37-
```
38-
39-
You should run this command once a week to install the latest dependencies.
40-
4130
## Manual Build
4231

43-
After installing [poetry] and the project's dependencies, the docs can be built with:
32+
After installing [uv], the docs can be built with:
4433

4534
```sh
46-
poetry run make html
35+
uv run make html
4736
```
4837

4938
To open the generated HTML docs with Firefox you can run:
@@ -58,7 +47,7 @@ Alternatively it is possible to start a local HTTP server that automatically
5847
rebuilds the docs on every file change:
5948

6049
```sh
61-
poetry run make livehtml
50+
uv run make livehtml
6251
```
6352

6453
To open the served docs with Firefox you can run:
@@ -67,23 +56,5 @@ To open the served docs with Firefox you can run:
6756
firefox http://127.0.0.1:8000
6857
```
6958

70-
## Starting From Scratch
71-
72-
If something is wrong with your dependencies or you just want to re-start from
73-
a clean environment you need to remove the [virtual environment](https://docs.python.org/3/library/venv.html).
74-
First of all ensure that poetry's virtual environment is placed within the
75-
project:
76-
77-
```sh
78-
poetry config virtualenvs.in-project true
79-
```
80-
81-
Afterwards the virtual environment including all installed dependencies can be
82-
deleted:
83-
84-
```sh
85-
rm -rf .venv
86-
```
87-
88-
[poetry]: https://python-poetry.org/
59+
[uv]: https://docs.astral.sh/uv/
8960
[pipx]: https://pipx.pypa.io/stable/

0 commit comments

Comments
 (0)