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

Add docs requirements file, update tox & Travis config to fix RtD and builds #297

Merged
merged 2 commits into from
Feb 21, 2018

Conversation

brainwane
Copy link
Contributor

For http://twine.readthedocs.io/ to build, the Read the Docs configuration needs a requirements.txt file in docs/.

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:

  • check the "Install your project inside a virtualenv using setup.py install" box
  • point to docs/requirements.txt in the "Requirements file" box
  • Python interpreter: CPython 3.x

@codecov
Copy link

codecov bot commented Feb 13, 2018

Codecov Report

Merging #297 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fa11a12...b590f8b. Read the comment docs.

@di
Copy link
Member

di commented Feb 13, 2018

Might be a good time to update the 'Building the documentation' section of the docs to direct the user to just pip install -r docs/requirements.txt instead of each individual requirement.

@brainwane
Copy link
Contributor Author

@di Thanks for the suggestion. Done.

docs/index.rst Outdated

Install Sphinx:
Then install the required dependencies:
Copy link
Member

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.

Copy link
Contributor Author

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.

@brainwane brainwane force-pushed the fix-rtd branch 2 times, most recently from b846519 to 8452ae9 Compare February 14, 2018 20:14
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.
@brainwane brainwane changed the title Add docs requirements file to fix RtD Add docs requirements file, update tox & Travis config to fix RtD and builds Feb 14, 2018
@brainwane
Copy link
Contributor Author

Evidently PEP8 wants to use Python 2.7 or else it complains: twine/utils.py:39:18: F821 undefined name 'raw_input'.

@sigmavirus24
Copy link
Member

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.

@sigmavirus24 sigmavirus24 merged commit 97095f7 into pypa:master Feb 21, 2018
@brainwane brainwane deleted the fix-rtd branch February 21, 2018 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants