-
Notifications
You must be signed in to change notification settings - Fork 82
Feat/to cdf #502
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
base: master
Are you sure you want to change the base?
Feat/to cdf #502
Conversation
- Add CDFTrackingDataSerializer with placeholder implementation - Add failing test using common-data-format-validator - Add Provider.CDF enum value - Add common-data-format-validator to test requirements
Use bugfix/packaging branch which fixes schema file inclusion
Feat/cdf serializer
Also fixed the test path to the validators
… any convertion with to_df()
get the position_group
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.
This CommonDataFormatCoordinateSystem should instead follow this approach.
Please include it inside this file, instead of the separate file you created. That way everything is organised in 1 place.
class SecondSpectrumCoordinateSystem(ProviderCoordinateSystem):
"""
Second Spectrum coordinate system.
Uses a pitch with the origin at the center and the y-axis oriented from
bottom to top. The coordinates are in meters.
"""
@property
def provider(self) -> Provider:
return Provider.SECONDSPECTRUM
@property
def origin(self) -> Origin:
return Origin.CENTER
@property
def vertical_orientation(self) -> VerticalOrientation:
return VerticalOrientation.BOTTOM_TO_TOP
@property
def pitch_dimensions(self) -> PitchDimensions:
if self._pitch_length is not None and self._pitch_width is not None:
return MetricPitchDimensions(
x_dim=Dimension(
-1 * self._pitch_length / 2, self._pitch_length / 2
),
y_dim=Dimension(
-1 * self._pitch_width / 2, self._pitch_width / 2
),
pitch_length=self._pitch_length,
pitch_width=self._pitch_width,
standardized=False,
)
else:
return MetricPitchDimensions(
x_dim=Dimension(None, None),
y_dim=Dimension(None, None),
pitch_length=None,
pitch_width=None,
standardized=False,
)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 with this the class is well implemented now.
…ion retrieving and get block on handling the class into kloppy.domain...
|
@stephTchembeu can you:
@koenvo what would be the best way to structure the functionality. Like, what did you have in mind for something like below? from kloppy import common_data_format
common_data_format.store() # opposite of .load? |
No description provided.