-
Notifications
You must be signed in to change notification settings - Fork 306
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
Add docs requirements file, update tox & Travis config to fix RtD and builds #297
Conversation
Codecov Report
@@ Coverage Diff @@
## master #297 +/- ##
=======================================
Coverage 67.42% 67.42%
=======================================
Files 12 12
Lines 574 574
Branches 91 91
=======================================
Hits 387 387
Misses 161 161
Partials 26 26 Continue to review full report at Codecov.
|
Might be a good time to update the 'Building the documentation' section of the docs to direct the user to just |
@di Thanks for the suggestion. Done. |
docs/index.rst
Outdated
|
||
Install Sphinx: | ||
Then install the required dependencies: |
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 missed this in the initial review. You don't need to install those to run tox -e docs
.
Instead, let's remove this and rewrite this to just be
Then, build the docs using ``tox``:
And we can update tox.ini
to install from our requirements file so everything works the same way.
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.
Thanks for the suggestion, @sigmavirus24. I looked at the tox documentation and believe I've now successfully done this. f298a8e builds fine on my machine in a virtualenv that does not have Sphinx, et alia installed, and the fresh build of my test project on RtD built successfully. So, ready for re-review.
b846519
to
8452ae9
Compare
The linter and some tests and builds were failing because Tox had the wrong Python versions set for its environments.
For http://twine.readthedocs.io/ to build, the Read the Docs configuration needs a requirements.txt file in `docs/`. This commit also integrates the requirements file into our tox configuration and cuts down on manual steps in the developer documentation.
Evidently PEP8 wants to use Python 2.7 or else it complains: |
I guess we need to rewrite https://github.com/pypa/twine/blob/master/twine/utils.py#L39 to look like try:
input_func = raw_input
except NameError: # Python 3
input_func = input But that's for a different PR. |
For http://twine.readthedocs.io/ to build, the Read the Docs configuration needs a
requirements.txt
file indocs/
.I tested this at https://my-fork-of-twine.readthedocs.io/ and verified that this
requirements.txt
file makes it work. For reference, other configuration bits I had to twiddle in the Admin: Advanced Settings page on RtD:setup.py install
" boxdocs/requirements.txt
in the "Requirements file" box