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

[PY-576][PY-581] Create + Update of properties #756

Merged
merged 12 commits into from Dec 18, 2023
Merged

[PY-576][PY-581] Create + Update of properties #756

merged 12 commits into from Dec 18, 2023

Conversation

Nathanjp91
Copy link
Contributor

@Nathanjp91 Nathanjp91 commented Dec 16, 2023

Problem

No Support exists for creation or updating of properties

Solution

Added functions for supporting creation and updating

def update_property(...) -> FullProperty:
    ...
def update_property_value(...) -> PropertyValue:
    ...
def create_property(...) -> FullProperty:
    ...

Also added in e2e tests to support these new features in preparation for support of imports

To Do

  • unit tests for new validators, pydantic functions and endpoint core functions

Changelog

Creation and updating of properties now possible in darwin.future

Copy link

linear bot commented Dec 16, 2023

@@ -85,13 +85,13 @@
],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

e2e tests broke again because of the ordering. Will put in a ticket for a fix on the coco exporter to always sort before saving.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

and it reverted itself and had to be redone.

def to_create_endpoint(
self,
) -> dict:
if not getattr(self, "annotation_class_id") or self.annotation_class_id is None:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

rest of the fields are non-optional so they'll already be captured by ValidationErrors

@Nathanjp91 Nathanjp91 marked this pull request as ready for review December 17, 2023 16:10
@@ -4,7 +4,7 @@
"editor.formatOnSave": true,
"editor.tabSize": 4,
"editor.codeActionsOnSave": {
"source.organizeImports": true,
"source.organizeImports": "explicit"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

vscode keeps saving the file like this even if I revert it. So I assume it's vscode deprecating or changing a naming convention

Copy link
Member

Choose a reason for hiding this comment

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

+1
I can confirm that my vscode updated the same change!

Copy link
Member

@saurbhc saurbhc left a comment

Choose a reason for hiding this comment

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

Great Work!! The E2E tests seem very helpful. :)

@Nathanjp91 Nathanjp91 merged commit dc3f887 into master Dec 18, 2023
16 checks passed
@saurbhc saurbhc deleted the py-576 branch December 19, 2023 03:24
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.

None yet

2 participants