Skip to content
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

Sphinx REST api #306

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open

Conversation

boyska
Copy link
Member

@boyska boyska commented Aug 1, 2016

With this PR we can have HTTP API documentation. However, this requires some little change to the command you use to generate documentation. Please note: just sticking to the current commands does not break anything: you will only miss what I added.

Just tell me how

Here is what you used to do till today:

python setup.py build_sphinx

which is great. If you do it after merging this, you will see

WARNING: sphinxcontrib-httpdomain not installed,you will get no REST API doc
  You might want to do pip install -U pip && pip install '.[doc]'

Despite the warning, there is no error: documentation is still built, but the "HTTP API" page is empty.

Do what it says, and your favourite command will produce HTTP API, too.

The theory

The sphinx extension that does all the magic must be installed. You could do it running pip install sphinxdomain-httpcontrib but that's so unelegant. The right way is specify an "extras set" inside setup.py; doc sounds like a good name for it. After that, you can just install it with pip install .[doc] and everything works. Except that extra set in local directory are only supported in pip >= 7, which is still not very widespread. So pip install -U pip will install it; after that, you can install libreant with the doc extra set.

This will require some small change to readthedocs configuration. This will close #168

@boyska
Copy link
Member Author

boyska commented Sep 30, 2016

Is someone willing to test/merge it? I think this is a coll thing to add to libreant documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rest api docs
1 participant