Skip to content

Commit

Permalink
Merge branch 'v3-dev' into qgis_data_objects
Browse files Browse the repository at this point in the history
  • Loading branch information
KatKatKateryna authored Jan 24, 2025
2 parents 04cb4bf + 826dadc commit 8d7523e
Show file tree
Hide file tree
Showing 37 changed files with 48 additions and 4,182 deletions.
13 changes: 11 additions & 2 deletions src/speckle_automate/automation_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,17 @@ def receive_version(self) -> Base:
commit = self.speckle_client.commit.get(
self.automation_run_data.project_id, version_id
)
if not commit.referencedObject:
raise ValueError("The commit has no referencedObject, cannot receive it.")
if not commit or not commit.referencedObject:
raise ValueError(
f"""\
Could not receive specified version.
{"The commit has no referencedObject." if not commit.referencedObject else ""}
Is your environment configured correctly?
project_id: {self.automation_run_data.project_id}
model_id: {self.automation_run_data.triggers[0].payload.model_id}
version_id: {self.automation_run_data.triggers[0].payload.version_id}
"""
)
base = operations.receive(
commit.referencedObject, self._server_transport, self._memory_transport
)
Expand Down
2 changes: 1 addition & 1 deletion src/specklepy/core/api/models/current.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class Version(BaseModel):


class Model(BaseModel):
author: LimitedUser
author: Optional[LimitedUser]
createdAt: datetime
description: Optional[str]
displayName: str
Expand Down
9 changes: 9 additions & 0 deletions src/specklepy/objects/tests/asdasd.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from specklepy.objects.geometry import Point, Line
from specklepy.objects.models.units import Units

p_1 = Point(x=0, y=0, z=0, units=Units.m)
p_2 = Point(x=3, y=0, z=0, units=Units.m)

line = Line(start=p_1, end=p_2, units=Units.m)
line.length = line.calculate_length()
print(line.length)
15 changes: 0 additions & 15 deletions src/specklepy/objects_v2/GIS/CRS.py

This file was deleted.

24 changes: 0 additions & 24 deletions src/specklepy/objects_v2/GIS/__init__.py

This file was deleted.

74 changes: 0 additions & 74 deletions src/specklepy/objects_v2/GIS/geometry.py

This file was deleted.

142 changes: 0 additions & 142 deletions src/specklepy/objects_v2/GIS/layers.py

This file was deleted.

23 changes: 0 additions & 23 deletions src/specklepy/objects_v2/__init__.py

This file was deleted.

Loading

0 comments on commit 8d7523e

Please sign in to comment.