Skip to content

Commit 707311f

Browse files
committed
docs: Update installation guide
1 parent ae85c61 commit 707311f

File tree

1 file changed

+63
-46
lines changed

1 file changed

+63
-46
lines changed

docs/floogen/installation.md

Lines changed: 63 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,92 +1,109 @@
11
# Installation
22

3-
_FlooGen_ is distributed as a standard Python package. It provides the `floogen` command-line interface (CLI) to generate your networks.
4-
5-
!!! note "PyPI Availability"
6-
_FlooGen_ is currently **not** published on PyPI. You must clone the repository and install it locally from the source.
3+
_FlooGen_ is distributed as a standard Python package available on PyPI. It provides the `floogen` command-line interface (CLI) to generate your networks.
74

85
## Prerequisites
96

107
- **Python**: Version 3.10 or higher.
11-
- **Git**: To clone the repository.
8+
- **Git**: To clone the repository (only required for source installation).
129

10+
---
1311

14-
First, clone the _FlooNoC_ repository:
12+
## Install from PyPI
1513

16-
```bash
17-
git clone https://github.com/pulp-platform/FlooNoC.git && cd FlooNoC
18-
```
19-
20-
Then install _FlooGen_ using with either `uv` or `pip`. We recommend using [uv](https://github.com/astral-sh/uv) for installation. It is significantly faster than `pip` and automatically manages virtual environments and dependencies for you, keeping your system Python clean. However, if you prefer the standard Python workflow, `pip` works just as well.
14+
If you just want to use the tool to generate networks, install it directly from PyPI with either [`uv`](https://github.com/astral-sh/uv) (recommended) or `pip`.
2115

2216
=== "uv"
2317

18+
**To install globally (recommended):**
19+
This makes the `floogen` command available everywhere in your terminal.
20+
```bash
21+
uv tool install floogen
22+
# and verify installation
23+
floogen --help
24+
```
2425

25-
26-
1. **Install uv** (if you haven't already):
27-
```bash
28-
curl -LsSf https://astral.sh/uv/install.sh | sh
29-
```
30-
2. **Run with uv**:
31-
You can run _FlooGen_ directly in an ephemeral environment without manual installation:
32-
```bash
33-
uv run floogen --help
34-
```
26+
**To run without installing (ephemeral):**
27+
You can run _FlooGen_ instantly without cluttering your system:
28+
```bash
29+
uvx floogen --help
30+
```
3531

3632
=== "pip"
3733

38-
1. **Create and activate a virtual environment** (optional but recommended):
34+
1. **Create and activate a virtual environment** (recommended):
3935
```bash
4036
python3 -m venv .venv
4137
source .venv/bin/activate
4238
```
4339

4440
2. **Install the package**:
4541
```bash
46-
pip install .
42+
pip install floogen
4743
```
44+
45+
3. **Verify installation:**
46+
```bash
47+
floogen --help
48+
```
49+
50+
---
51+
52+
## Install from Source
4853

49-
## Verification
54+
Use this method if you need to modify _FlooGen_, contribute to the project, or if you are working with the full _FlooNoC_ hardware repository.
5055

51-
To verify that the installation was successful, try running the help command. You should see the CLI usage information.
56+
First, clone the _FlooNoC_ repository:
57+
58+
```bash
59+
git clone https://github.com/pulp-platform/FlooNoC.git && cd FlooNoC
60+
```
5261

5362
=== "uv"
63+
64+
When using `uv` inside the repository, no manual installation step is strictly necessary. `uv` will automatically detect the project configuration.
65+
5466
```bash
5567
uv run floogen --help
5668
```
5769

70+
_This command will automatically set up the environment and install dependencies defined in `pyproject.toml`._
5871
=== "pip"
59-
```bash
60-
floogen --help
61-
```
62-
63-
## Development & Documentation
64-
65-
If you plan to contribute to _FlooGen_ or build the documentation locally, you should install the optional dependencies.
66-
67-
=== "uv"
68-
```bash
69-
# Nothing to do, `uv run` will download dependencies automatically
70-
```
7172

73+
1. **Create and activate a virtual environment**:
74+
```bash
75+
python3 -m venv .venv
76+
source .venv/bin/activate
77+
```
78+
79+
2. **Install in editable mode**:
80+
```bash
81+
pip install -e .
82+
```
7283

73-
=== "pip"
74-
```bash
75-
pip install .[dev]
76-
```
84+
## Documentation
7785

78-
The documentation is built using [Zensical](https://zensical.org/). To build the documentation locally, run:
86+
The documentation is built using [`zensical`](https://zensical.org/), which is defined as a development dependency. To build it you can run:
7987

8088
=== "uv"
8189
```bash
8290
uv run zensical build
8391
```
92+
93+
_The development dependencies are implicit in `uv` i.e. `uv run --group dev` is not necessary._
8494

8595
=== "pip"
86-
```bash
87-
zensical build
88-
```
89-
96+
1. **Create and activate a virtual environment** (if not already done):
97+
```bash
98+
python3 -m venv .venv
99+
source .venv/bin/activate
100+
```
101+
102+
2. **Install the development dependencies**:
103+
```bash
104+
pip install .[dev]
105+
```
106+
90107
If you want to serve the documentation locally for easier browsing, run:
91108

92109
=== "uv"

0 commit comments

Comments
 (0)