-
Notifications
You must be signed in to change notification settings - Fork 9.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
simplified diff for PRs #33205
simplified diff for PRs #33205
Conversation
Thanks for contributing to openpilot! In order for us to review your PR as quickly as possible, check the following:
|
Hopefully the workflow issues go away. That's embarrassing. Anyway, @sshane mentioned hoverable tooltips, which looks like its possible. It would require changing it to format the template into something like |
Ok, so the PR workflow should be working now. I don't really understand what exactly is going on and why you can't just do something like: - name: Get info
run: |
mkdir -p /path/
wget -O /path/CARS.md link
- name: Save diff
id: save_diff
run: |
output=$(${{ env.RUN }} "python selfdrive/debug/print_docs_diff.py --path /tmp/openpilot_cache/base_car_docs")
output="${output//$'\n'/'%0A'}"
echo "::set-output name=diff::$output" Otherwise it takes a bit of time on the |
All right. @sshane please let me know how this looks. Sorry it took so long (and so many checks!). |
Can you show a few example comments it might leave, testing a few diffs (column value change, adding/removing row, and detail sentence)? You might need to open a PR to your own repo to allow the workflow to run and comment |
…diff to be more robust
@sshane , should be fully done now. Updated it so that commons wasn't imported. Also updated the handling of the file so that icons were appropriately shown. The issue with displaying an example is that they're often just too long lol. Here's a short one linked below. from grabbing a log, this is what the detail sentences look like untrimmed: https://github.com/agniv-the-marker/openpilot/actions/runs/10283427115/job/28457236785?pr=4 📖 Detail Sentence Changes
|
dislike how this is a little longer and could definitely be faster. would love advice on how to do that, though now with the new import restriction i think you have to build openpilot to get access to the detail sentence builder/relevant Enums, so I think this is ok. in terms of shorter code, there are probably nicer more pythonic ways of dealing with the stars/videos than how i did it. definetly gets the job done (and i like using the same function twice in a cute way). also i think parts deserves a bit more oopmh to it. like, iterating through them and seeing which ones got removed, added, and formatting it like
since there's also a buy tag it might be fun to check the delta of prices? |
Closing, responded on Discord |
Description
Should resolve #32690. Uses the ideas from #32720.
The workflow now pulls the main CARS.md file with
wget
and passes it to the doc printer. The doc printer now usesdiff
which simplifies most columns. For detail sentence handling, updated docs_defns so that detail sentence was writable from the data in the row. Also simplified a function in docs.py (thought I could use it to generate the detail sentence) and updated the testing within dump car docs to get the main CARS.md as well.Verification
Manually edited CARS.md on my machine, got expected results.