Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collections namespace, clean PolygonGeometry class #351

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

KatKatKateryna
Copy link
Contributor

No description provided.

Copy link

codecov bot commented Oct 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.66%. Comparing base (f1b5184) to head (4e91bed).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #351   +/-   ##
=======================================
  Coverage   87.65%   87.66%           
=======================================
  Files          95       95           
  Lines        5670     5674    +4     
=======================================
+ Hits         4970     4974    +4     
  Misses        700      700           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

name: Optional[str] = None,
elements: Optional[List[Base]] = None,
units: Optional[str] = None,
) -> None:
Copy link
Contributor Author

@KatKatKateryna KatKatKateryna Oct 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

possibly a breaking change for the constructors that were passing collectionType
P.S. removed

units: Optional[str] = None,
boundary: Optional[Polyline] = None,
voids: Optional[List[Polyline]] = None,
) -> None:
Copy link
Contributor Author

@KatKatKateryna KatKatKateryna Oct 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ideally all these should be Required, but we need to have an option for an empty constructor because of the serializer design. On Receive, objects are being initialized from JSON with empty constructors first

@KatKatKateryna KatKatKateryna marked this pull request as ready for review October 23, 2024 00:08
class Collection(
Base, speckle_type="Speckle.Core.Models.Collection", detachable={"elements"}
):
name: Optional[str] = None
collectionType: Optional[str] = None
elements: Optional[List[Base]] = None


class Collection( # noqa: F811
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will two classes with the same name work? is that what this F811 suppression is for?
I'm a bit worried that this may break the Blender connector...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JR-Morgan oops didn't see your review 🙈
yep, I tested, and it is the same way it works with VectorLayer for example. But I am open to any other possibility, it's just I haven't found a way to safely change one speckle_type to another

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants