Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
vortexasdk/api/fixture.py:26
- Renaming the
Fixturefield fromtonestotonnesis a breaking change for SDK consumers who may still accessfixture.tones. Consider keeping a deprecated alias property so existing code keeps working while the correct field name is used going forward.
id: ID
vessel: Optional[VesselEntity] = None
laycan_from: Optional[str] = None
laycan_to: Optional[str] = None
tonnes: Optional[int] = None
fixing_timestamp: Optional[str] = None
vtx_fulfilled: Optional[bool] = None
origin: Optional[Entity] = None
destination: Optional[Entity] = None
product: Optional[Entity] = None
charterer: Optional[Entity] = None
| """Convert nested `Fixture` object to flat dictionary, keeping *cols*.""" | ||
| as_dict = _group_fixture_attributes_by_layer(fixture) | ||
|
|
||
| formatted = flatten_dictionary(as_dict) |
Author
There was a problem hiding this comment.
Would appreciate some input on this. I think because changing to tonnes could be a breaking change it is doing this to make sure that people don't have to modify anything but idk if that's a good practice
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RELATED TICKETS
https://vortexa.atlassian.net/jira/software/c/projects/RND/boards/465?selectedIssue=RND-21448
! Do not post related PRs here, unless they are open source !
CHANGELOG
convert_fixture_to_flat_dictto groupvessel.corporate_entitiesby layer name before flatteningtones→tonnestypo in model, DEFAULT_COLUMNS, and docstringsTESTS
vessel.corporate_entities.effective_controller.labelandtime_charterer.labelnow populate correctly into_df(), along with other fields. Has the ability to fill 'vessel.corporate_entities.effective_controller.label' which by definition exists in the schema, and if it exists like ticket says, but across all the fixtures it doesn't existCOMMENTS
vessels.corporate_entities.charterer.labelbut the API returnsvessel(singular) and never includeschartererincorporate_entities, only at high level