Skip to content

Instantly share code, notes, and snippets.

@marcosanchotene
Created September 24, 2022 13:58
Show Gist options
  • Save marcosanchotene/11b5297266ba4f158faef0eb0bd6555a to your computer and use it in GitHub Desktop.
Save marcosanchotene/11b5297266ba4f158faef0eb0bd6555a to your computer and use it in GitHub Desktop.
Generate Dash docset for pytest

Essential

  1. Clone https://github.com/pytest-dev/pytest.
  2. Checkout the version you want to build the docs for.
  3. Install the following dependencies (I suggest Poetry for this step):
    • pytest
    • sphinx
    • doc2dash
  4. In pytest/doc/en run make html.
  5. Generate the docs with doc2dash -n pytest _build/html/.

With icon

If you want to generate the docset with the pytest logo, find a png image with it, or create one, and run the command below on step 5:

doc2dash -n pytest -i <path to logo image> _build/html/

With Poetry

If using Poetry, follow these steps to install the dependencies and generate the docs:

  1. Run poetry add pytest.
  2. Run poetry add sphinx.
  3. Run poetry add doc2dash.
  4. Run poetry install.
  5. Run poetry shell.
  6. Continue to step 4 above.

Add docset to Zeal

If using Zeal, copy the folder generated by doc2dash to the path of your docsets, usually something like /home/user/.var/app/org.zealdocs.Zeal/data/Zeal/Zeal/docsets. It can be found under Edit -> Preferences, at the time of this writing.

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