Skip to content

Commit

Permalink
release bump
Browse files Browse the repository at this point in the history
  • Loading branch information
arihant2math committed Oct 11, 2023
1 parent a65df73 commit a1fb0d0
Show file tree
Hide file tree
Showing 24 changed files with 1,651 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ftc_api/custom_templates/pyproject.toml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "ftc_api"
description = "A python client to access the FIRST Tech Challenge API"
authors = [
{name = "Ashwin Naren", email="[email protected]"}
{ name = "Ashwin Naren", email = "[email protected]" }
]
license = {file = "LICENSE"}
readme = "README.md"
Expand Down
30 changes: 30 additions & 0 deletions ftc_api/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@
from .award_assignment_list import AwardAssignmentList
from .award_list import AwardList
from .barcode_element import BarcodeElement
from .coordinate import Coordinate
from .coordinate_equality_comparer import CoordinateEqualityComparer
from .coordinate_sequence import CoordinateSequence
from .coordinate_sequence_factory import CoordinateSequenceFactory
from .dimension import Dimension
from .endgame_parked_status import EndgameParkedStatus
from .envelope import Envelope
from .event import Event
from .event_list import EventList
from .event_ranking_list import EventRankingList
Expand All @@ -23,6 +29,9 @@
FreightFrenzySingleTeamScoreDetails,
)
from .ftc_event_level import FTCEventLevel
from .geometry import Geometry
from .geometry_factory import GeometryFactory
from .geometry_overlay import GeometryOverlay
from .get_v20_season_schedule_event_code_tournament_level_hybrid_tournament_level import (
GetV20SeasonScheduleEventCodeTournamentLevelHybridTournamentLevel,
)
Expand All @@ -40,10 +49,16 @@
from .match_result_list import MatchResultList
from .match_result_team import MatchResultTeam
from .match_score_list import MatchScoreList
from .nts_geometry_services import NtsGeometryServices
from .ogc_geometry_type import OgcGeometryType
from .ordinates import Ordinates
from .point import Point
from .power_play_alliance_score_breakdown import PowerPlayAllianceScoreBreakdown
from .power_play_alliance_score_details import PowerPlayAllianceScoreDetails
from .power_play_remote_score_breakdown import PowerPlayRemoteScoreBreakdown
from .power_play_single_team_score_details import PowerPlaySingleTeamScoreDetails
from .precision_model import PrecisionModel
from .precision_models import PrecisionModels
from .scheduled_match import ScheduledMatch
from .scheduled_match_list import ScheduledMatchList
from .scheduled_match_team import ScheduledMatchTeam
Expand Down Expand Up @@ -74,7 +89,13 @@
"AwardAssignmentList",
"AwardList",
"BarcodeElement",
"Coordinate",
"CoordinateEqualityComparer",
"CoordinateSequence",
"CoordinateSequenceFactory",
"Dimension",
"EndgameParkedStatus",
"Envelope",
"Event",
"EventList",
"EventRankingList",
Expand All @@ -84,6 +105,9 @@
"FreightFrenzyRemoteScoreBreakdown",
"FreightFrenzySingleTeamScoreDetails",
"FTCEventLevel",
"Geometry",
"GeometryFactory",
"GeometryOverlay",
"GetV20SeasonScheduleEventCodeTournamentLevelHybridTournamentLevel",
"GetV20SeasonScoresEventCodeTournamentLevelTournamentLevel",
"HybridSchedule",
Expand All @@ -97,10 +121,16 @@
"MatchResultList",
"MatchResultTeam",
"MatchScoreList",
"NtsGeometryServices",
"OgcGeometryType",
"Ordinates",
"Point",
"PowerPlayAllianceScoreBreakdown",
"PowerPlayAllianceScoreDetails",
"PowerPlayRemoteScoreBreakdown",
"PowerPlaySingleTeamScoreDetails",
"PrecisionModel",
"PrecisionModels",
"ScheduledMatch",
"ScheduledMatchList",
"ScheduledMatchTeam",
Expand Down
77 changes: 77 additions & 0 deletions ftc_api/models/coordinate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
from typing import Any, Dict, Type, TypeVar, Union

import attr

from ..types import UNSET, Unset

T = TypeVar("T", bound="Coordinate")


@attr.s(auto_attribs=True)
class Coordinate:
"""
Attributes:
x (Union[Unset, float]):
y (Union[Unset, float]):
z (Union[Unset, float]):
m (Union[Unset, float]):
coordinate_value (Union[Unset, Coordinate]):
"""

x: Union[Unset, float] = UNSET
y: Union[Unset, float] = UNSET
z: Union[Unset, float] = UNSET
m: Union[Unset, float] = UNSET
coordinate_value: Union[Unset, "Coordinate"] = UNSET

def to_dict(self) -> Dict[str, Any]:
x = self.x
y = self.y
z = self.z
m = self.m
coordinate_value: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.coordinate_value, Unset):
coordinate_value = self.coordinate_value.to_dict()

field_dict: Dict[str, Any] = {}
field_dict.update({})
if x is not UNSET:
field_dict["x"] = x
if y is not UNSET:
field_dict["y"] = y
if z is not UNSET:
field_dict["z"] = z
if m is not UNSET:
field_dict["m"] = m
if coordinate_value is not UNSET:
field_dict["coordinateValue"] = coordinate_value

return field_dict

@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
d = src_dict.copy()
x = d.pop("x", UNSET)

y = d.pop("y", UNSET)

z = d.pop("z", UNSET)

m = d.pop("m", UNSET)

_coordinate_value = d.pop("coordinateValue", UNSET)
coordinate_value: Union[Unset, Coordinate]
if isinstance(_coordinate_value, Unset):
coordinate_value = UNSET
else:
coordinate_value = Coordinate.from_dict(_coordinate_value)

coordinate = cls(
x=x,
y=y,
z=z,
m=m,
coordinate_value=coordinate_value,
)

return coordinate
23 changes: 23 additions & 0 deletions ftc_api/models/coordinate_equality_comparer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from typing import Any, Dict, Type, TypeVar

import attr

T = TypeVar("T", bound="CoordinateEqualityComparer")


@attr.s(auto_attribs=True)
class CoordinateEqualityComparer:
""" """

def to_dict(self) -> Dict[str, Any]:
field_dict: Dict[str, Any] = {}
field_dict.update({})

return field_dict

@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
src_dict.copy()
coordinate_equality_comparer = cls()

return coordinate_equality_comparer
111 changes: 111 additions & 0 deletions ftc_api/models/coordinate_sequence.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
from typing import Any, Dict, Type, TypeVar, Union

import attr

from ..models.ordinates import Ordinates
from ..types import UNSET, Unset

T = TypeVar("T", bound="CoordinateSequence")


@attr.s(auto_attribs=True)
class CoordinateSequence:
"""
Attributes:
dimension (Union[Unset, int]):
measures (Union[Unset, int]):
spatial (Union[Unset, int]):
ordinates (Union[Unset, Ordinates]):
has_z (Union[Unset, bool]):
has_m (Union[Unset, bool]):
z_ordinate_index (Union[Unset, int]):
m_ordinate_index (Union[Unset, int]):
count (Union[Unset, int]):
"""

dimension: Union[Unset, int] = UNSET
measures: Union[Unset, int] = UNSET
spatial: Union[Unset, int] = UNSET
ordinates: Union[Unset, Ordinates] = UNSET
has_z: Union[Unset, bool] = UNSET
has_m: Union[Unset, bool] = UNSET
z_ordinate_index: Union[Unset, int] = UNSET
m_ordinate_index: Union[Unset, int] = UNSET
count: Union[Unset, int] = UNSET

def to_dict(self) -> Dict[str, Any]:
dimension = self.dimension
measures = self.measures
spatial = self.spatial
ordinates: Union[Unset, str] = UNSET
if not isinstance(self.ordinates, Unset):
ordinates = self.ordinates.value

has_z = self.has_z
has_m = self.has_m
z_ordinate_index = self.z_ordinate_index
m_ordinate_index = self.m_ordinate_index
count = self.count

field_dict: Dict[str, Any] = {}
field_dict.update({})
if dimension is not UNSET:
field_dict["dimension"] = dimension
if measures is not UNSET:
field_dict["measures"] = measures
if spatial is not UNSET:
field_dict["spatial"] = spatial
if ordinates is not UNSET:
field_dict["ordinates"] = ordinates
if has_z is not UNSET:
field_dict["hasZ"] = has_z
if has_m is not UNSET:
field_dict["hasM"] = has_m
if z_ordinate_index is not UNSET:
field_dict["zOrdinateIndex"] = z_ordinate_index
if m_ordinate_index is not UNSET:
field_dict["mOrdinateIndex"] = m_ordinate_index
if count is not UNSET:
field_dict["count"] = count

return field_dict

@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
d = src_dict.copy()
dimension = d.pop("dimension", UNSET)

measures = d.pop("measures", UNSET)

spatial = d.pop("spatial", UNSET)

_ordinates = d.pop("ordinates", UNSET)
ordinates: Union[Unset, Ordinates]
if isinstance(_ordinates, Unset):
ordinates = UNSET
else:
ordinates = Ordinates(_ordinates)

has_z = d.pop("hasZ", UNSET)

has_m = d.pop("hasM", UNSET)

z_ordinate_index = d.pop("zOrdinateIndex", UNSET)

m_ordinate_index = d.pop("mOrdinateIndex", UNSET)

count = d.pop("count", UNSET)

coordinate_sequence = cls(
dimension=dimension,
measures=measures,
spatial=spatial,
ordinates=ordinates,
has_z=has_z,
has_m=has_m,
z_ordinate_index=z_ordinate_index,
m_ordinate_index=m_ordinate_index,
count=count,
)

return coordinate_sequence
46 changes: 46 additions & 0 deletions ftc_api/models/coordinate_sequence_factory.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
from typing import Any, Dict, Type, TypeVar, Union

import attr

from ..models.ordinates import Ordinates
from ..types import UNSET, Unset

T = TypeVar("T", bound="CoordinateSequenceFactory")


@attr.s(auto_attribs=True)
class CoordinateSequenceFactory:
"""
Attributes:
ordinates (Union[Unset, Ordinates]):
"""

ordinates: Union[Unset, Ordinates] = UNSET

def to_dict(self) -> Dict[str, Any]:
ordinates: Union[Unset, str] = UNSET
if not isinstance(self.ordinates, Unset):
ordinates = self.ordinates.value

field_dict: Dict[str, Any] = {}
field_dict.update({})
if ordinates is not UNSET:
field_dict["ordinates"] = ordinates

return field_dict

@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
d = src_dict.copy()
_ordinates = d.pop("ordinates", UNSET)
ordinates: Union[Unset, Ordinates]
if isinstance(_ordinates, Unset):
ordinates = UNSET
else:
ordinates = Ordinates(_ordinates)

coordinate_sequence_factory = cls(
ordinates=ordinates,
)

return coordinate_sequence_factory
14 changes: 14 additions & 0 deletions ftc_api/models/dimension.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from enum import Enum


class Dimension(str, Enum):
P = "P"
CURVE = "Curve"
A = "A"
COLLAPSE = "Collapse"
DONTCARE = "Dontcare"
TRUE = "True"
UNKNOWN = "Unknown"

def __str__(self) -> str:
return str(self.value)
Loading

0 comments on commit a1fb0d0

Please sign in to comment.