-
Notifications
You must be signed in to change notification settings - Fork 9.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
Car docs bot: diff on generated readme file #33273
Conversation
Thanks for contributing to openpilot! In order for us to review your PR as quickly as possible, check the following:
|
Need to fix: the code for parsing the markdown table is too naive and doesn't handle potential escaped pipes. Will do it in a bit. |
The sentence is not very easy to read, is there something we can do about that? Tooltip, comment? We don't currently show it, so it's not a requirement to show it now. And does this satisfy this point in the issue?
|
Pushed a change that should improve that. I automatically add some
I think so, as long as the changes aren't made to the columns I use for identifying a row (i.e., I also added a length limit to the generated comment, so that it won't show more than 10 rows per category, with an indication of the number of hidden rows (e.g., + 31 other rows). I believe the comment would get truncated anyway if too long so it's better to handle it more gracefully.
Still gotta fix this. |
27b8b62
to
b6bd70a
Compare
Getting this, why doesn't CI catch it?: batman@workstation-shane:~/openpilot/selfdrive/debug$ python3 print_docs_diff.py
File "/home/batman/openpilot/selfdrive/debug/print_docs_diff.py", line 22
results = {f'{r['Make']} {r['Model']}': r for r in results}
^^^^
SyntaxError: f-string: unmatched '[' I would say it's okay to hide the sentence for now, it changes the style of the table too much and pushes the other columns near the end off the screen. Another user put it in the markdown file as comments, with some small special handling. The current differ makes use of the platform name to detect model year/name changes, which while would be nice to keep, are a bit more difficult if we just have the column values, so I'm fine with losing that ability for now. I see some |
base_headers, base_cars = get_cars_docs_in_markdown(base_docs_content) | ||
new_headers, new_cars = get_cars_docs_in_markdown(new_docs_content) |
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.
It makes more sense if new_docs_content
is hardcoded using BASEDIR + CARS.md file locally, and base_docs_content
should be passed in as a path, using the base commit on the PR (downloaded in the Action)
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 made the change (ce8c77c) and tested it in my fork
0935989
to
af92b3c
Compare
This was partly because I had also enlarged the Regarding I'll look into the other points you raised. Thanks for the feedback. |
@@ -289,9 +289,9 @@ jobs: | |||
ref: ${{ github.event.pull_request.base.ref }} |
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.
We want to get rid of the two checkouts in this PR and just use curl/wget
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.
Done (ddbe964)
d77688c
to
d523d40
Compare
d523d40
to
693bef6
Compare
Rebased after the recent changes, and tested again here The Detail sentence is missing from the docs because I think it looked fine when we added it to the table as a new column (with formatting done through This way, Detail will also be involved in the diff. |
This PR has had no activity for 9 days. It will be automatically closed in 2 days if there is no activity. |
This PR has been automatically closed due to inactivity. Feel free to re-open once activity resumes. |
Closes #32690
Here's an example result: marcellofuschi#2 (comment)
Detail sentence isn't visible in the example because that column is not in master yet.