Skip to content

Commit

Permalink
Summary of local setup for quickstart for devs (#372)
Browse files Browse the repository at this point in the history
# References and relevant issues
I used the `napari` docs website for all the referenced material.
Closes #265 

# Description
This PR provides a quick bulleted summary of how to locally build and
preview the docs, and to set up the necessary environment.

---------

Co-authored-by: Peter Sobolewski <76622105+psobolewskiPhD@users.noreply.github.com>
  • Loading branch information
vreuter and psobolewskiPhD authored Mar 19, 2024
1 parent d55997e commit b950e0f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,26 @@ You can see details of [the project roadmap here](https://napari.org/roadmaps/in

## contributing

Contributions are encouraged! Please read our [contributing guide](https://napari.org/dev/developers/contributing/documentation/index.html) to get started. Given that we're in an early stage, you may want to reach out on our [Github Issues](https://github.com/napari/docs/issues) before jumping in.
Contributions are encouraged! If you're new or unsure about anything check out our [issues tracker](https://github.com/napari/docs/issues) or reach out on [zulip](https://napari.zulipchat.com/) before jumping in.
It's nice to be able preview how your contribution will look on the web, so here we provide a brief summary of what's required for a local setup that will allow you to do so.
Alternatively, our CI setup provides a preview link that shows your changes.
Please read our [contributing guide](https://napari.org/dev/developers/contributing/documentation/index.html) for more comprehensive information about contributing documentation.

### quickstart: local setup
* __Check the prerequisites__
1. Create a clean Python environment (e.g., with conda).
1. In that environment, create a [development installation](https://napari.org/dev/developers/contributing/dev_install.html#dev-installation) of `napari` on your local machine, first forking and cloning the main `napari` project if you've not previously done so.
1. Fork this repository, and then clone your fork to your local machine. NB: you may want to name your fork e.g. `napari-docs` rather than just `docs`.
1. With your local clone's root folder as the working directory, and with the environment created in the first step activated, install the docs requirements with `python -m pip install -r requirements.txt`.
* __Build__ locally
* If you're building on Windows, a few extra steps are required; you can follow [this guide](https://napari.org/stable/developers/documentation/index.html#building-the-documentation-on-windows).
* From the root of your local clone of this repository, run one of these:
* `make docs`, if your changes include the example gallery
* `make docs-install && make html-noplot`, otherwise
* __Preview__ locally, either dragging-and-dropping `docs/_build/index.html` into a browser, or deploying a local server with `python3 -m http.server --directory docs/_build`.

These steps should set you up to build and preview your docs contributions on your local machine.
For more detailed instructions and tips, please visit the relevant sections of our [contribution guide](https://napari.org/dev/developers/contributing/documentation/index.html).

## code of conduct

Expand Down
2 changes: 1 addition & 1 deletion docs/developers/contributing/documentation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ cd napari-docs/
Since the API reference documentation (autogenerated from the napari code docstrings) and the example gallery are sourced from the `napari/napari` repository, before you can build the documentation locally, you need:

- a clean `conda` environment;
- a development installation of napari. Follow the [contributor guide](dev-installation) for details on how to do this;
- a development installation of napari in that environment. Follow the [contributor guide](dev-installation) for details on how to do this;
- the napari documentation requirements. Starting at the folder where you cloned the `napari/docs` repository, and after activating your clean `conda` environment, you can install these with `python -m pip install -r requirements.txt`.

This setup, with these dependencies, will allow you to preview your document locally as it would appear on `napari.org`. It will also install [Jupyter notebook](https://jupyter.org/) and [jupytext](https://jupytext.readthedocs.io), which you will need to contribute documents containing code or viewer interactions.
Expand Down

0 comments on commit b950e0f

Please sign in to comment.