-
Notifications
You must be signed in to change notification settings - Fork 47
Refactor contributor docs: prioritize pixi for local builds #880
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
base: main
Are you sure you want to change the base?
Conversation
…e to advanced dropdown
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much @rensutheart, this is looking really nice!
I have some general comments about the organization of content, and haven't reviewed everything in detail. I think we can still simplify this a bit, but let's see what others think.
Cheers!
| #### Set up a developer installation of napari for docs building | ||
|
|
||
| Because the API reference documentation (autogenerated from the napari code docstrings), the example gallery, and the documentation dependencies are sourced from the `napari/napari` repository, before you can build the documentation locally you will need to install from the `napari/napari` repository. | ||
| ````{dropdown} (Optional) Fork and clone napari/napari for gallery or API docstring edits |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have used the primary color for the advanced make option, as this might be an important one to highlight.
|
Out of curiosity for those that use |
|
@psobolewskiPhD can you use uv to build napari from source and chain the docs build with that? My impression is that this was not possible in a simple way (you can always activate the venv that uv creates but that kinda defeats the purpose of a task-based workflow I think) The end goal here is to be able to do that as a one-liner, even though right now the pixi.toml file is set to track napari from github. |
|
@melissawm I'm not very familiar with uv, I thought it also has a |
A key difference here is how uv and pixi approach this. Pixi is a cross-platform / cross-language task runner built around environment management, so you can run things like So in the end the major difference is that uv is for python and pixi is for python+ |
|
Also, thanks for the awesome PR @rensutheart . I support these changes in general. Since other folks are reviewing, I'll let that be the case for now, but do ping me if you want me to look at things. |
|
Thanks for the explanation @TimMonko I'm a pixi fan, but wanted to throw a bone to the uv fans! |

Summary
This PR refactors the documentation contributor guide, completing the transition to
pixias the recommended cross-platform workflow for building the napari docs. The guide now highlights a simplepixi-based path for most contributors, while still preserving the fullmakeworkflow for advanced and headless use cases.Key Changes
Pixi-first workflow
pixias the default way to build the docs on Windows, macOS, and Linux.pixi run slimfast,pixi run html,pixi run html-noplot, etc.), and troubleshooting.pixiautomatically manages dependencies and clonesnapari/napariinternally.Reorganized contributor flow
napari/docs.napari/napari(e.g. gallery examples or API docstrings) is described separately and clearly marked as optional.Advanced
makeworkflow retainedmakeinstructions (including partial builds, gallery-only builds, live rebuild targets, cleanup utilities, etc.) are preserved under an “Advanced: Usingmake” dropdown.make(Git Bash / WSL setup, path safety, etc.) is still available, but no longer blocks the main path. It has also been shortened substantially as it is generally not needed anymore.Windows experience clarified
pixiruns natively on Windows in PowerShell/CMD.Why These Changes?
pixisupport to the Makefile and build system.makeflow, including headless / gallery-specific / single-example builds.pixithe default, dependency-managed path.Testing
pixi runtargets (slimfast,html,html-noplot, live targets, cleanup targets) on Windows and Linux.maketargets documented in the advanced section still work.Conclusion
This is an extensive change to the documentation, and I could have overlooked things or made unhelpful changes. Change suggestions welcome.