From 4f93ddcaf361cefd251ec4e9b18ec3b2d9da1fda Mon Sep 17 00:00:00 2001 From: 908599 Date: Mon, 16 Jan 2023 16:01:33 +0100 Subject: [PATCH] Update speckle_type of SectionProfile to match C#, update type hints with C# Enum values to int. For the SectionProfile, a separate static variable e.g. STRUCTURAL_PROFILE could be created later, I now just made an easy fix. For the enumeration attributes, I believe they should be integer, as e.g. Revit pushes them as integers, not strings. --- src/specklepy/api/models.py | 2 +- src/specklepy/objects/structural/axis.py | 2 +- src/specklepy/objects/structural/properties.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/specklepy/api/models.py b/src/specklepy/api/models.py index defec36..b36795b 100644 --- a/src/specklepy/api/models.py +++ b/src/specklepy/api/models.py @@ -150,7 +150,7 @@ class PendingStreamCollaborator(BaseModel): class Activity(BaseModel): - actionType: Optional[str] + actionType: Optional[int] info: Optional[dict] userId: Optional[str] streamId: Optional[str] diff --git a/src/specklepy/objects/structural/axis.py b/src/specklepy/objects/structural/axis.py index a7fc06e..e1c7ee6 100644 --- a/src/specklepy/objects/structural/axis.py +++ b/src/specklepy/objects/structural/axis.py @@ -6,5 +6,5 @@ from specklepy.objects.geometry import Plane class Axis(Base, speckle_type="Objects.Structural.Geometry.Axis"): name: Optional[str] = None - axisType: Optional[str] = None + axisType: Optional[int] = None plane: Optional[Plane] = None diff --git a/src/specklepy/objects/structural/properties.py b/src/specklepy/objects/structural/properties.py index 91ba5dd..65810c8 100644 --- a/src/specklepy/objects/structural/properties.py +++ b/src/specklepy/objects/structural/properties.py @@ -90,7 +90,7 @@ class Property(Base, speckle_type=STRUCTURAL_PROPERTY): name: Optional[str] = None -class SectionProfile(Base, speckle_type=STRUCTURAL_PROPERTY + ".SectionProfile"): +class SectionProfile(Base, speckle_type=STRUCTURAL_PROPERTY + ".Profiles.SectionProfile"): name: Optional[str] = None shapeType: Optional[ShapeType] = None area: float = 0.0