doc: add uv configuration for building documentation#54
Open
Conversation
Add pyproject.toml with doc dependencies, .python-version pinning Python 3.10, and uv.lock for reproducible installs. This allows building docs with `uv sync && uv run make -C doc html`. Signed-off-by: Wojciech Bober <wojciech.bober@nordicsemi.no>
annwoj
reviewed
Mar 4, 2026
| @@ -0,0 +1,43 @@ | |||
| # Building documentation locally | |||
|
|
|||
Contributor
There was a problem hiding this comment.
Suggested change
| If you wish to build the documentation locally, complete the following steps. |
Comment on lines
+5
to
+7
| - The west workspace must be initialized and the west manifest must point to | ||
| `sdk-edge-ai`. See `.west/config`. | ||
| - Doxygen must be installed (`sudo apt install doxygen`). |
Contributor
There was a problem hiding this comment.
Suggested change
| - The west workspace must be initialized and the west manifest must point to | |
| `sdk-edge-ai`. See `.west/config`. | |
| - Doxygen must be installed (`sudo apt install doxygen`). | |
| Make sure you have: | |
| - Initialized the west workspace and checked if the west manifest points to `sdk-edge-ai`. See `.west/config`. | |
| - Installed doxygen (`sudo apt install doxygen`). |
Comment on lines
+11
to
+12
| [uv](https://docs.astral.sh/uv/) manages the Python version, virtual | ||
| environment, and dependencies automatically from `pyproject.toml`. |
Contributor
There was a problem hiding this comment.
Suggested change
| [uv](https://docs.astral.sh/uv/) manages the Python version, virtual | |
| environment, and dependencies automatically from `pyproject.toml`. | |
| [uv](https://docs.astral.sh/uv/) manages the Python version, virtual environment, and dependencies automatically from `pyproject.toml`. |
| [uv](https://docs.astral.sh/uv/) manages the Python version, virtual | ||
| environment, and dependencies automatically from `pyproject.toml`. | ||
|
|
||
| Install uv if you don't have it: |
Contributor
There was a problem hiding this comment.
Suggested change
| Install uv if you don't have it: | |
| Install uv if you do not have it: |
Comment on lines
+42
to
+43
| The generated HTML pages are placed in `doc/_build/html/`. Open | ||
| `doc/_build/html/index.html` in a browser to view the documentation. |
Contributor
There was a problem hiding this comment.
Suggested change
| The generated HTML pages are placed in `doc/_build/html/`. Open | |
| `doc/_build/html/index.html` in a browser to view the documentation. | |
| The generated HTML pages are placed in `doc/_build/html/`. | |
| Open `doc/_build/html/index.html` in a browser to view the documentation. |
Szynkaa
reviewed
Mar 4, 2026
Comment on lines
+7
to
+15
| docs = [ | ||
| "doxmlparser", | ||
| "python-dotenv", | ||
| "sphinx>=7.2,<8.2", | ||
| "sphinx-copybutton", | ||
| "sphinx-ncs-theme==0.7.4", | ||
| "sphinx-tabs>=3.4", | ||
| "west", | ||
| ] |
Member
There was a problem hiding this comment.
now we have two places which specify python packages: this file and requirements.txt
Collaborator
Author
There was a problem hiding this comment.
Treat the PR as a proposal. I found uv easy for the purpose of building docs. No objections to drop the PR.
Contributor
There was a problem hiding this comment.
Maybe lets think about it after the release?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pyproject.tomlwith doc dependencies in adocsdependency group,uv.lockfor reproducible installs, and.python-versionpinning Python 3.10.doc/README.mdwith instructions for building docs locally with and without uv.uv sync && uv run make -C doc html.Test plan
uv sync && uv run make -C doc htmlfrom the repo root and verify HTML is generated indoc/_build/html/.doc/README.mdinstructions work for the manual (pip) path as well.