Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change: Update README regarding installation and updates #448

Merged
merged 3 commits into from
Feb 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 41 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,41 @@ https://greenbone.github.io/docs/

For a manual build locally Python >= 3.9 and [poetry] is required.

## Install Dependencies
## Install Poetry

To install poetry it is recommended to use [pipx]. pipx can be installed with
the following command on Debian based systems:

```sh
sudo apt install pipx
```

Install poetry using pipx

To install poetry it is recommended to use [pipx]
```sh
python3 -m pipx install poetry
```

To install the project dependencies via [poetry] run
## Install and Upgrade Dependencies

When building the docs you should ensure that all the dependencies are installed
and up to date. To install for the first time or to update the project
dependencies via [poetry] run:

```sh
poetry install
poetry install --no-root
```

You should run this command once a week to install the latest dependencies.

## Manual Build

After installing [poetry] and the project's dependencies, the docs can be build with
After installing [poetry] and the project's dependencies, the docs can be built with:
```sh
poetry run make html
```

To open the generated HTML docs with Firefox you can run
To open the generated HTML docs with Firefox you can run:

```sh
firefox _build/html/index.html
Expand All @@ -37,17 +52,35 @@ firefox _build/html/index.html
## Auto Rebuild

Alternatively it is possible to start a local HTTP server that automatically
rebuilds the docs on every file change
rebuilds the docs on every file change:

```sh
poetry run make livehtml
```

To open the served docs with Firefox you can run
To open the served docs with Firefox you can run:

```sh
firefox http://127.0.0.1:8000
```

## Starting From Scratch

If something is wrong with your dependencies or you just want to re-start from
a clean environment you need to remove the [virtual environment](https://docs.python.org/3/library/venv.html).
First of all ensure that poetry's virtual environment is placed within the
project:

```sh
poetry config virtualenvs.in-project true
```

Afterwards the virtual environment including all installed dependencies can be
deleted:

```sh
rm -rf .venv
```

[poetry]: https://python-poetry.org/
[pipx]: https://pipx.pypa.io/stable/