Skip to content

Commit

Permalink
Remove KNOWN_PROPERTIES 🎉
Browse files Browse the repository at this point in the history
  • Loading branch information
astrojuanlu committed Nov 6, 2019
1 parent 18c8142 commit c950d0f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 269 deletions.
3 changes: 1 addition & 2 deletions src/czml3/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def default(self, o):

@attr.s(repr=False, frozen=True)
class BaseCZMLObject:
KNOWN_PROPERTIES = [] # type: List[str]

def __repr__(self):
return self.dumps(indent=4)
Expand All @@ -48,7 +47,7 @@ def to_json(self):
if getattr(self, "delete", False):
properties_list = NON_DELETE_PROPERTIES
else:
properties_list = self.KNOWN_PROPERTIES
properties_list = list(attr.asdict(self).keys())

obj_dict = {}
for property_name in properties_list:
Expand Down
30 changes: 0 additions & 30 deletions src/czml3/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
class Preamble(BaseCZMLObject):
"""The preamble packet."""

KNOWN_PROPERTIES = ["id", "version", "name", "clock"]

version = attr.ib(default=CZML_VERSION)
name = attr.ib(default=None)
clock = attr.ib(default=None)
Expand All @@ -31,34 +29,6 @@ class Packet(BaseCZMLObject):
for further information.
"""

# https://github.com/AnalyticalGraphicsInc/czml-writer/wiki/Packet
KNOWN_PROPERTIES = [
"id",
"delete",
"name",
"parent",
"description",
"availability",
"properties",
"position",
"orientation",
"viewFrom",
"billboard",
"box",
"corridor",
"cylinder",
"ellipse",
"ellipsoid",
"label",
"model",
"path",
"point",
"polygon",
"polyline",
"rectangle",
"wall",
]

id = attr.ib(factory=lambda: str(uuid4()))
delete = attr.ib(default=None)
name = attr.ib(default=None)
Expand Down

0 comments on commit c950d0f

Please sign in to comment.