Skip to content

allow specifying extras instead of requirements.txt #3484

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

Closed
davidism opened this issue Jan 5, 2018 · 11 comments
Closed

allow specifying extras instead of requirements.txt #3484

davidism opened this issue Jan 5, 2018 · 11 comments
Labels
Improvement Minor improvement to code Needed: design decision A core team decision is required

Comments

@davidism
Copy link

davidism commented Jan 5, 2018

Our projects rely on setup.py instead of requirements.txt for specifying requirements. I'd like to be able to add an extras_require named "docs" and tell RTD about it so that it can do pip install .[docs] when building, instead of creating a separate docs-require.txt file.

@agjohnson agjohnson added Improvement Minor improvement to code Needed: design decision A core team decision is required labels Jan 5, 2018
@ericholscher
Copy link
Member

Believe this will do it: http://docs.readthedocs.io/en/latest/yaml-config.html#python-extra-requirements

@davidism
Copy link
Author

davidism commented Jan 8, 2018

That can work, I was thinking of trying out the YAML support. How does this work when building multiple versions? Does each tag need the YAML file or is it always pulled from master?

I still think it would be convenient to have a web interface for this.

@humitos
Copy link
Member

humitos commented May 30, 2018

That can work, I was thinking of trying out the YAML support. How does this work when building multiple versions? Does each tag need the YAML file or is it always pulled from master?

Each tag will have its own yaml version file with its specific settings.

As a general rule (although, it's not 100% strict yet), we are having "global settings" (those that affect all the builds/versions) under the web admin interface and "version specific settings" on the YAML file.

@davidism
Copy link
Author

davidism commented May 30, 2018

That won't work for us. We want to build docs for old versions, but we've already released those tags, we don't usually go back and add new commits / releases just for docs. This is the same motivation for #3483. So I'd definitely like to see a global interface for this.

@davidfischer
Copy link
Contributor

davidfischer commented Jul 6, 2018

I thought you weren't going to building off of tags but rather branches. Taking flask's branches for example, you would just have to commit a readthedocs.yml to master and cherry pick it to the other two branches. Or do I have this wrong and you were going to build from tags?

python:
   pip_install: true
   extra_requirements:
       - docs

@davidism
Copy link
Author

davidism commented Jul 6, 2018

Wasn't sure if it would be possible to do the branches, so wanted to cover the tag case as well. If what we want to do with branches will work, then I'm fine using the YAML config for specifying requirements.

@davidfischer
Copy link
Contributor

It is definitely possible to do branches. For Flask for example, you'd go to https://readthedocs.org/projects/flask/versions/ and set the branches you want to build.

There are still some other complications building Flask's docs which I'm working on. Flask's conf.py sets data into the html_context['versions'] variable which has a naming conflict with us. I think the best way to resolve that is to actually implement @humitos' proposals in #3490.

@humitos
Copy link
Member

humitos commented Jul 10, 2018

There are still some other complications building Flask's docs which I'm working on. Flask's conf.py sets data into the html_context['versions'] variable which has a naming conflict with us. I think the best way to resolve that is to actually implement @humitos' proposals in #3490.

We discussed this yesterday and since it may take us some time to do it as a general solution, we wanted to have a quicker and simple solution to don't break on this case. @davidfischer opened the PR #4349 that will make your project to not interferes with the RTD context data. Once merged, we will need to know all the projects that use the pallets theme to add this feature to them.

@davidism
Copy link
Author

Actually, Flask's conf shouldn't be setting versions, that was a leftover from some testing I was doing. However, RTD still shouldn't set versions, because the Pallets theme checks for that key and expects a certain format.

@davidfischer
Copy link
Contributor

I think the short term fix is #4349.

The longer term fix will be to implement https://docs.readthedocs.io/en/latest/design/theme-context.html

@davidism
Copy link
Author

That's fine, I can make that work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Minor improvement to code Needed: design decision A core team decision is required
Projects
None yet
Development

No branches or pull requests

5 participants