|
1 | 1 | # Installation |
2 | 2 |
|
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. |
7 | 4 |
|
8 | 5 | ## Prerequisites |
9 | 6 |
|
10 | 7 | - **Python**: Version 3.10 or higher. |
11 | | -- **Git**: To clone the repository. |
| 8 | +- **Git**: To clone the repository (only required for source installation). |
12 | 9 |
|
| 10 | +--- |
13 | 11 |
|
14 | | -First, clone the _FlooNoC_ repository: |
| 12 | +## Install from PyPI |
15 | 13 |
|
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`. |
21 | 15 |
|
22 | 16 | === "uv" |
23 | 17 |
|
| 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 | + ``` |
24 | 25 |
|
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 | + ``` |
35 | 31 |
|
36 | 32 | === "pip" |
37 | 33 |
|
38 | | - 1. **Create and activate a virtual environment** (optional but recommended): |
| 34 | + 1. **Create and activate a virtual environment** (recommended): |
39 | 35 | ```bash |
40 | 36 | python3 -m venv .venv |
41 | 37 | source .venv/bin/activate |
42 | 38 | ``` |
43 | 39 |
|
44 | 40 | 2. **Install the package**: |
45 | 41 | ```bash |
46 | | - pip install . |
| 42 | + pip install floogen |
47 | 43 | ``` |
| 44 | + |
| 45 | + 3. **Verify installation:** |
| 46 | + ```bash |
| 47 | + floogen --help |
| 48 | + ``` |
| 49 | + |
| 50 | +--- |
| 51 | + |
| 52 | +## Install from Source |
48 | 53 |
|
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. |
50 | 55 |
|
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 | +``` |
52 | 61 |
|
53 | 62 | === "uv" |
| 63 | + |
| 64 | + When using `uv` inside the repository, no manual installation step is strictly necessary. `uv` will automatically detect the project configuration. |
| 65 | + |
54 | 66 | ```bash |
55 | 67 | uv run floogen --help |
56 | 68 | ``` |
57 | 69 |
|
| 70 | + _This command will automatically set up the environment and install dependencies defined in `pyproject.toml`._ |
58 | 71 | === "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 | | - ``` |
71 | 72 |
|
| 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 | + ``` |
72 | 83 |
|
73 | | -=== "pip" |
74 | | - ```bash |
75 | | - pip install .[dev] |
76 | | - ``` |
| 84 | +## Documentation |
77 | 85 |
|
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: |
79 | 87 |
|
80 | 88 | === "uv" |
81 | 89 | ```bash |
82 | 90 | uv run zensical build |
83 | 91 | ``` |
| 92 | + |
| 93 | + _The development dependencies are implicit in `uv` i.e. `uv run --group dev` is not necessary._ |
84 | 94 |
|
85 | 95 | === "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 | + |
90 | 107 | If you want to serve the documentation locally for easier browsing, run: |
91 | 108 |
|
92 | 109 | === "uv" |
|
0 commit comments