-
Notifications
You must be signed in to change notification settings - Fork 54
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
Use git-source-track to track updates to examples #89
Comments
@fletch3555 I think this would be a useful thing to do since you're reviewing existing examples |
Oh interesting. A very similar thought crossed my mind the other day, but I didn't realize this tool actually existed. Yeah, I'll take a look. |
@virtuald, when I run that command, it prepends that line to the file above the shebang. I can submit a PR to change the positioning, but where do we want it instead?
I'm partial to end of the file, but not hard-set on anything. |
It can be any line in the file: https://github.com/virtuald/git-source-track/blob/master/git_source_track/cmd.py#L201, it just defaults to the first if there's no validation line. Previously we did it at the beginning before the copyright line, which I think looks nice. https://github.com/robotpy/mostrobotpy/blob/aabdb769c211f87e74c351478f4778a9fd45df84/subprojects/robotpy-wpilib/wpilib/wpilib/adxl362.py#L1 I think end of file is fine too. |
Yeah, I'm thinking more the default place it'll create the line if it doesn't exist (which it won't for any of these examples until we start adding it). I'm hoping to avoid having to validate each file, manually move the line, then commit. I also like it above the copywrite line, but it can't be above the shebang without breaking the ability to just run Also, putting it in that header (shebang + copyright) breaks the automated header validation. Either way, end of the file is super easy to implement in cmd.py and bypasses the problem entirely. If you're cool with that, I'll open the PR momentarily. |
I personally always do I think end of file is probably fine for the examples. |
I only looked at one, so probably just missed it. I can commit them all (the robot.py at least) as executable while I'm at it if you'd like |
And 💥 goes the dynomite: virtuald/git-source-track#9 |
With git-source-track 0.4, you can use the following .gittrack file:
For older examples, I think it would make sense to make the upstream commit match 2023, add the annotations, then update allwpilib to 2024 and do the |
See https://robotpy.readthedocs.io/en/2019.1.2/dev/porting.html#using-git-source-track
The text was updated successfully, but these errors were encountered: