-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 detailed documentation for Pyreverse command-line options #10045
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10045 +/- ##
==========================================
- Coverage 95.80% 95.79% -0.02%
==========================================
Files 174 174
Lines 18937 18937
==========================================
- Hits 18143 18141 -2
- Misses 794 796 +2
|
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.
Thank you for your work on this. I feel like it should be based on the output of argparse so it's up to date automatically when we modify pyreverse input but it should be stable enough. Waiting for the pyreverse's experts opinion :D
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.
Could you add this documentation to the options like so:
pylint/pylint/pyreverse/main.py
Line 244 in 3fca43a
"help": "set the output directory path.", |
It would be a waste to not save the effort you made to write these.
We can then look into rendering these help texts correctly.
We probably need a doc
extension very similar to:
https://github.com/pylint-dev/pylint/blob/3fca43aa15047ff62f775c27d0c3e85aaa935549/doc/exts/pylint_options.py
Thanks for the feedback. I agree, that it feels right to automate this for the future and maintaining the documenation texts directly in the code is a lot better for consistency. I will add my docs to the options, like you mentioned. Regarding the automation part I will have to look into this, but it feels like a bigger change, so I am not sure if I find the time for this right now :D |
for more information, see https://pre-commit.ci
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I really like the grouped output, it is also a great benefit for the help output on the command line. Thanks! One minor thing I noticed when running it locally: The docstring of the Filtering and Scope:
Base class providing common behaviour for pyreverse commands.
--filter-mode <mode>, -f <mode> From a first glance I would say that is a side-effect from As the |
Thanks for the feedback. I think turning the docstring into a regular python comment to preserve documentation would be a good idea. |
β¦d unwanted output
This comment has been minimized.
This comment has been minimized.
Fighting with CI and tests but wrote a quick little docs extension that renders your awesome documentation as a page: I'll make sure CI is green and then you can take over again in case you want to tweak how stuff looks. |
Awesome, thank you! Will look into itπ |
Since I also changed the API for @Pierre-Sassoulas rest of the PR can probably be reviewed by you? Unless @Julfried wants to make many changes to the documentation I would probably review this and do any follow up to the documentation itself in a subsequent PR that is fixed on the documentation. This is already doing quite a bit π |
π€ According to the primer, this change has no effect on the checked open source code. π€π This comment was generated for commit c4cc8a5 |
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.
Wow this sphinx plugin and the generated result looks amazing. Right now it's hard to see the new page because the main page have no link to it. So I would just reorganize the pyreverse doc a little accommodate the newly created page. Probably a main page with a lot less text and two links, one to the new page, and one to a new subpage with most of the current main page's text. What do you think ?
Do you mind if we do that in a follow up? This is already a pretty big PR as it is. With the new framework it would be fairly trivial to move around pages and do some better formatting everywhere |
@Julfried Let me know if there is anything you want to change in this PR. If not, I will merge this! |
I think the description of the pyreverse options looks very good to me and I would leave it as it is. I agree that the pages for pyreverse should be better structured, however this is better for a follow upπ |
Merged! @Julfried Are you up for making those last improvements? |
Type of Changes
Description
Add detailed documentation for all Pyreverse command-line options, organized into logical sections:
Closes #9573