Skip to content
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

[choreo] Document Updater #926

Merged
merged 29 commits into from
Dec 4, 2024
Merged

Conversation

oh-yes-0-fps
Copy link
Collaborator

@oh-yes-0-fps oh-yes-0-fps commented Nov 15, 2024

Needs unit tests but has been tested on my robot project

This pr also adds trackwidth to .traj output field to show off the upgrader, its just a dummy value of 1.0 for now

Fixes #570.

@calcmogul
Copy link
Member

calcmogul commented Nov 15, 2024

What are the steps for adding another schema version upgrade? We should document whatever that is in the interest of documenting maintenance tasks.

@oh-yes-0-fps
Copy link
Collaborator Author

oh-yes-0-fps commented Nov 15, 2024

What are the steps for adding another schema version upgrade?

Incrementing the constants for the schema version (its just an incrementing integer now for simplicity idk how you define semver for the schema stuff when any change is "breaking").
Add a new upgrader action in upgraders.rs for the changes you made
Update the choreolib code if its needed.

I admit there is more that goes into it than i would like but most actions that reduce complexity in schema management add complexity to some build step.

shueja
shueja previously requested changes Nov 16, 2024
Copy link
Collaborator

@shueja shueja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Architecturally this seems reasonable. I'll have to think about ramifications of changing save file versioning to an int. I also don't know if we should require that Choreolib changes matching spec changes must go in the same PR.

src-core/src/spec/trajectory.rs Outdated Show resolved Hide resolved
@spacey-sooty
Copy link
Collaborator

I also don't know if we should require that Choreolib changes matching spec changes must go in the same PR.

I think we risk creating issues/having Choreolib fall behind similar to how C++ does if it's not updated in the same PR.

@shueja
Copy link
Collaborator

shueja commented Nov 21, 2024

I agree. I'm just wondering what effect that will have on PRs getting carried through to mergeability.

@calcmogul
Copy link
Member

calcmogul commented Nov 21, 2024

If we can't get it done in the PR itself, I'd be concerned about it ever getting done, since maintainers can push directly to PRs.

@calcmogul
Copy link
Member

calcmogul commented Nov 22, 2024

Items to address:

  • What is the "trackwidth" field in the .traj when it's a swerve trajectory Removed for this PR.
  • ChoreoLib C++/Java/Python changes to use an int for version number
  • Make ChoreoLib C++/Java/Python JSON load fail non-fatally if version is a string
  • Unit tests for the already implemented upgrader, and a clear place to put more

Item 3 is somewhat related to another issue about assembling a common set of test JSONs for all sorts of tests.

@shueja
Copy link
Collaborator

shueja commented Dec 4, 2024

Trackwidth work moved to #969

@shueja shueja enabled auto-merge December 4, 2024 19:55
@calcmogul calcmogul disabled auto-merge December 4, 2024 20:01
@calcmogul calcmogul added this pull request to the merge queue Dec 4, 2024
@shueja shueja removed this pull request from the merge queue due to a manual request Dec 4, 2024
@shueja shueja enabled auto-merge December 4, 2024 20:18
@shueja shueja added this pull request to the merge queue Dec 4, 2024
Merged via the queue into SleipnirGroup:main with commit 2b15099 Dec 4, 2024
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reimplement data upgrader in Rust for both types of 2025 files
4 participants