Skip to content

Commit

Permalink
Improve the instructions regarding pandoc (#336)
Browse files Browse the repository at this point in the history
I've also tried to make the developer documentation easier to discover
  • Loading branch information
garrison authored Jul 27, 2023
1 parent d1db839 commit 33371bc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ If you use the Circuit Knitting Toolbox in your research, please cite it accordi
.. literalinclude:: ../CITATION.bib
:language: bibtex

Developer guide
---------------

The developer guide is located at `CONTRIBUTING.md <https://github.com/Qiskit-Extensions/circuit-knitting-toolbox/blob/main/CONTRIBUTING.md>`__ in the root of this project's repository.

Contents
--------

Expand Down
8 changes: 6 additions & 2 deletions test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,18 @@ $ tox -e coverage

## Documentation environment

The `docs` environment builds the [Sphinx] documentation locally. If the build succeeds, it can be viewed by navigating to `docs/_build/html/index.html` in a web browser.
The `docs` environment builds the [Sphinx] documentation locally.

To run:
For the documentation build to succeed, [pandoc](https://pandoc.org/) must be installed. Pandoc is not available via pip, so must be installed through some other means. Linux users are encouraged to install it through their package manager (e.g., `sudo apt-get install -y pandoc`), while macOS users are encouraged to install it via [Homebrew](https://brew.sh/) (`brew install pandoc`). Full instructions are available on [pandoc's installation page](https://pandoc.org/installing.html).

To run this environment:

```sh
$ tox -e docs
```

If the build succeeds, it can be viewed by navigating to `docs/_build/html/index.html` in a web browser. Specifically, run `pwd` in the same terminal in which you built the docs, then copy that location and paste it in your web browser. You should see a directory listing there. If not, prepend `file://` to the path and try again. Once you see the directory listing, click on `docs`, then `_build`, then `html`, and then finally `index.html` to view the documentation.

This comment has been minimized.

Copy link
@caleb-johnson

caleb-johnson Jul 27, 2023

Collaborator

Isn't it true that Ubuntu, RHEL, macOS, and Windows would all open the web browser automatically, if you simply opened the html file through the GUI? We could simplify this a lot if we just told users to open the file. Just a thought

This comment has been minimized.

Copy link
@garrison

garrison Jul 27, 2023

Author Member

Yeah, I believe that's true. @IbrahimShehzad, do you think it would have been as clear what to do if it had simply said "can be viewed by opening docs/_build/html/index.html in a web browser or through your system's file manager." ?

This comment has been minimized.

Copy link
@ibrahim-shehzad

ibrahim-shehzad Jul 27, 2023

Collaborator

Yeah, I agree, @garrison.

This comment has been minimized.

Copy link
@ibrahim-shehzad

ibrahim-shehzad Jul 27, 2023

Collaborator

I actually think we may not even need to say ''or through your system's file manager part,'' since that ought to be obvious, @garrison?

This comment has been minimized.

Copy link
@garrison

garrison Jul 27, 2023

Author Member

OK, we are back to how I originally phrased it before this PR 😂

This comment has been minimized.

Copy link
@ibrahim-shehzad

ibrahim-shehzad Jul 27, 2023

Collaborator

[tox]: https://github.com/tox-dev/tox
[`tox.ini`]: ../tox.ini
[mypy]: https://mypy.readthedocs.io/en/stable/
Expand Down

0 comments on commit 33371bc

Please sign in to comment.