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

Better document the requirements file format #7386

Merged
merged 1 commit into from
Nov 20, 2019
Merged

Better document the requirements file format #7386

merged 1 commit into from
Nov 20, 2019

Conversation

maxwell-k
Copy link
Contributor

@maxwell-k maxwell-k commented Nov 19, 2019

Change the documentation for the requirements file format so that it matches the implementation.

Before this change the documentation included an incomplete list of supported options.

This change adds the missing options and changes the order to match, so that the two locations are easier to keep in sync. After this change the list in the documentation matches SUPPORTED_OPTIONS in src/pip/_internal/req/req_file.py.

Addresses #7385

Copy link
Member

@chrahunt chrahunt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for finding this and fixing it! Just one comment, otherwise this is OK for me.

The new ordering is a little odd (index options are not together, for example) but no problem fixing it in both places later.

If you want, as a followup (you can make a separate issue if you are interested) it may also be possible to generate this list automatically from SUPPORTED_OPTIONS similar to what we do for command option help here.

docs/html/reference/pip_install.rst Outdated Show resolved Hide resolved
Change the documentation for the requirements file format so that it
matches the implementation [0]. Also change the order of the options in
the implementation so that the documentation reads better.

Before this change the documentation included an incomplete list of
supported options.

This change adds the missing options and changes the order to match, so
that the two locations are easier to keep in sync. After this change the
list in the documentation matches SUPPORTED_OPTIONS in
src/pip/_internal/req/req_file.py

[0]: https://github.com/pypa/pip/blob/master/src/pip/_internal/req/req_file.py#L60
@maxwell-k
Copy link
Contributor Author

Just one comment, otherwise this is OK for me.

Addressed in latest push, thank you.

The new ordering is a little odd (index options are not together, for example) but no problem fixing it in both places later.

I agree. To address this I have adjusted the order in the implementation, so that the documentation isn't so odd! I am happy to action any feedback on ordering.

If you want, as a followup (you can make a separate issue if you are interested) it may also be possible to generate this list automatically from SUPPORTED_OPTIONS similar to what we do for command option help here.

I would like to try that and will open a separate issue and PR later. Thank you for the suggestion. I'll keep this PR to improving the hand written documentation.

@chrahunt
Copy link
Member

chrahunt commented Nov 20, 2019

Something is up with Azure, we'll give it some time to resolve.

@chrahunt chrahunt merged commit b7a4b02 into pypa:master Nov 20, 2019
@maxwell-k maxwell-k deleted the docs/requirements-file-format branch November 20, 2019 09:31
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Dec 20, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Dec 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants