-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a65df73
commit a1fb0d0
Showing
24 changed files
with
1,651 additions
and
6 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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" | ||
|
This file contains 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
This file contains 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
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 |
This file contains 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
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 |
This file contains 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
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 |
This file contains 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
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 |
This file contains 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
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) |
Oops, something went wrong.