-
-
Notifications
You must be signed in to change notification settings - Fork 629
Describe the output of help in readme #1634
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
Describe the output of help in readme #1634
Conversation
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'm not against this at all, more documentation is good and good documentation is great. I'd like to see the opinions of others on this though as there may be conflicting views to this.
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'm not sure this is a good idea. At least this should be generated automatically somehow. Otherwise, the text would be outdated soon.
I agree, it would be better to be able to automatically put the output of help in the README. |
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 do also agree that this dump is too-likely to get out-of-sync in time.
On the other hand, I do find the need/desire for listing it as valid, so I oppose only the current manual-implementation.
You should write a custom pre-commit hook that regenerates the readme (basically doing a section replace) with the output of the tool. This would prevent making changes that alter the output of the tool without updating the readme. In addition the readme will be updated automatically to match.
I agree with using pre-commit-hooks. Therefore, I will try to set up pre-commit-hooks. |
What about including only the usage lines in README? Full help output would make a long README even longer + description on PyPI. (If you do decide to go for full help output, then cog may help) |
Another option for generating the full output is using wheezy.template:
Usage
=====
``pip-compile``
---------------
::
@(
from subprocess import run
from textwrap import indent
pip_compile_usage = run(['pip-compile', '--help'], capture_output=True).stdout.decode()
pip_compile_usage = indent(pip_compile_usage, ' ')
)
@pip_compile_usage
``pip-sync``
------------
::
@(
from subprocess import run
from textwrap import indent
pip_sync_usage = run(['pip-sync', '--help'], capture_output=True).stdout.decode()
pip_sync_usage = indent(pip_sync_usage, ' ')
)
@pip_sync_usage
|
I am going to close this for the stated reasons. I am not against including output of --help into docs but not on readme, unless the implementation (lint?) will update the readme automatically. I do not want anyone to have to remember that this output needs to updated on each merge. |
Fixes
#1633
Contributor checklist
Provided the tests for the changes.
Assure PR title is short, clear, and good to be included in the user-oriented changelog
Maintainer checklist
backwards incompatible
,feature
,enhancement
,deprecation
,bug
,dependency
,docs
orskip-changelog
as they determine changelog listing.