-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
HELP WANTED: Help copy content from pylint-errors
over to our own documentation
#5953
Comments
I agree that having community support for this would be awesome, but I think we're not ready for that yet. In my opinion we should do a script to do the grunt work of migrating from pylint-error. Then proper reviews of the current examples when we integrate them and creation of missing examples would be super helpful. Here's what I think we need to do following #5527, we really need community help only at a few steps:
|
Sorry, perhaps I should have discussed with you prior. However, I don't think this is feasible. During the transfer of the two test issues I already noticed a mistake in the examples for Basically, if we want to migrate the data we would need to put in so much effort that it is probably much better to do it by hand and just do one review for each message instead of doing multiple across many different steps. That's why I added the line about adding co-authorship: I do want to credit them for any inspiration we use in our documentation. |
Yes I noticed that, this is why I proposed to review chunk by chunk. If the migration script is complicated / not worth it, it make sense to do it manually. Did you check the work that need to be done to automate this, or is this a wet finger kind of thing ? I could try a proof of concept to see if it works otherwise (once 2.13 is released of course). |
No this is wet finger. But if we're going to review by chunks anyway, why then not do this manually? I mean, anybody who is looking to contribute is free to use a script to make their PR, but I think it makes more sense to do one review for each message for a "final" page than do two or three (initial migration, update of test case, add missing content). |
Sure, multiple messages in the same PR would be messy, let's do "chunk of one" 😄
Maybe it could even be our script and save them a lot of time. I'm going to create a proof of concept to migrate one message from pylint-error to our new doc system (so contributor just have to review/fix and create a PR) and see how it goes. You did the algorithm yourself in the description, I'm going to follow that. The "co-authored by" part in particular look like it would need to be automated to be accurate because it's not that easy to check the git history. |
Co-authors show in the GitHub interface, luckily 😄 One thing we should check and which is more difficult is that the directories have the correct names, you easily miss that on Github. |
Thing like |
Refs pylint-dev#5953 Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
Refs #5953 Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
A longstanding issue of
pylint
has been that there is little documentation about some of the messages and why they are emitted. For some messages the short message that is displayed is not enough to make explicit what needs to be changed or what is considered wrong.With the closure of #5527 and the merge of #5934 we have now set up a system that allows us to do so!
We have also received the okay from @vald-phoenix to base this additional documentation on their wonderful pylint-errors project.
However, now we need some community help to write this documentation. If you'd like to help out and help future users of
pylint
understand whatpylint
is telling them, please continue reading.How to create such pages? The process is quite straightforward.
Within the
doc/data/messages
directory you can find various subdirectories. These are the letters of the alphabet. Within these directories you will find directories for each message thatpylint
can emit. These directories contain the data from which these pages are build.To help build a new page:
doc/data/messages/a/abstract-class-instantiated
.pylint-errors
repo. For example here. If the message is not documented yet you will need to come up with examples yourself.good.py
document in which you include a short code example that shows of good code that won't trigger the message. You can base this onpylint-error
.bad.py
document in which you include a short bad code example. On the line that is supposed to emit the message please add a# [abstract-class-instantiated]
comment. See these examples.pylintrc
file. Here you can include configuration options forpylint
like loading of optional checkers. Seedoc/data/messages/c/confusing-consecutive-elif/pylintrc
for example.details.rst
file. Here you can place additional details in .rst format that will be displayed on the page. Note that some of the details included on thepylint-error
pages are already included in ourMessage
orDescription
sections.related.rst
file. Here you can place .rst style links to external sources that are relevant for the message. Generally we do not include the links toTest Cases
and theIssue Tracker
thatpylint-error
provides as they can break easily.pylint-errors
repo it is appreciated if you add the following line to your commits:Co-authored-by: Vladyslav Krylasov <vladyslav.krylasov@gmail.com>
(or any of the other contributors to that project you're basing yourself on!pytest doc/test_messages_documentation.py
.Two examples of how to do this can be found in #5934.
To make this work somewhat manageable please do not add more than 5 messages in one PR, as otherwise it will be impossible to review the changes correctly.
The big list of messages without any documentation:
As of the 2023-09-09.
Related pull requests:
#5992, #5994, #5995, #6016, #5993, #5996, #6150, #5997, #6026, #6086, #6000, #6088, #6021, #6002, #6090, #6164, #6166, #6020, #6104, #6103, #6167, #6105, #6106, #6107, #6156, #6157, #6131, #6009, #6139, #6083, #6092, #6200, #6203, #6204, #6237, #6159, #6243, #6250, #6115, #6248, #6249, #6339, #6341, #6342, #6343, #6340, #6344, #6345, #6262, #6263, #6264, #6265, #6080, #6079, #6206, #6245, #6205, #6158, #6114, #6114, #6201, #6160, #6149, #6238, #6152, #6153, #6133, #6244, #6230, #6232, #6151, #6247, #6132, #6239, #6240, #6472, #6699, #6679, #6460, #6697, #6630, #6637, #6698, #6472, #6586, #6541, #6472, #6669, #6618, #6690, #6619, #6620, #6621, #6659, #6576, #6574, #6540, #6700, #6590, #6701, #6591, #6583, #6562, #6585 #9042
#7897
(List of related pull request is not exhaustive)
The text was updated successfully, but these errors were encountered: