Skip to content

doc: add uv configuration for building documentation#54

Open
wbober wants to merge 1 commit intomainfrom
add-uv-doc-config
Open

doc: add uv configuration for building documentation#54
wbober wants to merge 1 commit intomainfrom
add-uv-doc-config

Conversation

@wbober
Copy link
Copy Markdown
Collaborator

@wbober wbober commented Mar 4, 2026

Summary

  • Add pyproject.toml with doc dependencies in a docs dependency group, uv.lock for reproducible installs, and .python-version pinning Python 3.10.
  • Add doc/README.md with instructions for building docs locally with and without uv.
  • Docs can now be built with uv sync && uv run make -C doc html.

Test plan

  • Run uv sync && uv run make -C doc html from the repo root and verify HTML is generated in doc/_build/html/.
  • Verify doc/README.md instructions work for the manual (pip) path as well.

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>
@wbober wbober requested a review from annwoj March 4, 2026 10:35
@@ -0,0 +1,43 @@
# Building documentation locally

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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`).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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",
]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now we have two places which specify python packages: this file and requirements.txt

Copy link
Copy Markdown
Collaborator Author

@wbober wbober Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Treat the PR as a proposal. I found uv easy for the purpose of building docs. No objections to drop the PR.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe lets think about it after the release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants