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-623] Get team properties backported to client #749

Merged
merged 46 commits into from
Dec 15, 2023
Merged
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
25d1545
base annotation darwin
Nathanjp91 Dec 7, 2023
5aae6a6
fixes for annotations
Nathanjp91 Dec 7, 2023
5eda478
base str vs url
Nathanjp91 Dec 7, 2023
1b47f2f
tests for base annotation loading
Nathanjp91 Dec 7, 2023
7dce8ff
cleanup
Nathanjp91 Dec 7, 2023
a78fbb0
cleanup 2: electric boogaloo
Nathanjp91 Dec 7, 2023
fe50af7
test bounding box auto-calculate
Nathanjp91 Dec 7, 2023
1a23448
typing
Nathanjp91 Dec 7, 2023
bd9f035
cleanup
Nathanjp91 Dec 7, 2023
ffa0b28
property addition
Dec 8, 2023
153960a
property metadata parsing
Dec 8, 2023
3680490
cleanup validator
Dec 8, 2023
581d63e
test for properties base example
Dec 8, 2023
87074d5
linting
Dec 8, 2023
20def95
Merge branch 'py-573' into py-578
Nathanjp91 Dec 11, 2023
802c217
Changes for list/get endpoint
Nathanjp91 Dec 11, 2023
6decf44
linting
Nathanjp91 Dec 11, 2023
b6e6b50
Merge branch 'py-573' into py-578
Nathanjp91 Dec 11, 2023
b000467
get_all_properties
Nathanjp91 Dec 11, 2023
7965480
get properties and get by id
Nathanjp91 Dec 12, 2023
d15b8ff
Merge branch 'master' into py-578
Nathanjp91 Dec 12, 2023
c79d8aa
linting
Nathanjp91 Dec 12, 2023
7865e11
base annotation darwin
Nathanjp91 Dec 7, 2023
a9dcbb1
fixes for annotations
Nathanjp91 Dec 7, 2023
62e841f
base str vs url
Nathanjp91 Dec 7, 2023
11e193b
tests for base annotation loading
Nathanjp91 Dec 7, 2023
780b0e8
cleanup
Nathanjp91 Dec 7, 2023
48b26a8
cleanup 2: electric boogaloo
Nathanjp91 Dec 7, 2023
05b057a
test bounding box auto-calculate
Nathanjp91 Dec 7, 2023
f5a795a
typing
Nathanjp91 Dec 7, 2023
7aae491
cleanup
Nathanjp91 Dec 7, 2023
8a32881
property metadata parsing
Dec 8, 2023
088e37c
cleanup validator
Dec 8, 2023
653697a
test for properties base example
Dec 8, 2023
f1670d1
Changes for list/get endpoint
Nathanjp91 Dec 11, 2023
f55a12c
get_all_properties
Nathanjp91 Dec 11, 2023
c5fd349
get properties and get by id
Nathanjp91 Dec 12, 2023
91ac90b
linting
Nathanjp91 Dec 12, 2023
92cd2b3
linting
Nathanjp91 Dec 12, 2023
e11593b
Merge branch 'py-578' of github.com:v7labs/darwin-py into py-578
Nathanjp91 Dec 12, 2023
69d8ebf
QS helper and params checker on team_full_properties
Nathanjp91 Dec 12, 2023
3b0463c
add client.get_team_properties
saurbhc Dec 13, 2023
bb26331
Merge branch 'master' into PY-623
saurbhc Dec 13, 2023
f9554a5
add DarwinConfig.from_old method
saurbhc Dec 13, 2023
a9581f2
add tests for config conversion + get_team_properties
saurbhc Dec 13, 2023
67ce0e9
Update client.py for property_value renaming
Nathanjp91 Dec 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
cleanup 2: electric boogaloo
Nathanjp91 committed Dec 12, 2023
commit 48b26a8edec6abb785a29059cf7958cb012a9343
16 changes: 8 additions & 8 deletions darwin/future/data_objects/darwin.py
Original file line number Diff line number Diff line change
@@ -52,10 +52,10 @@ def validate_bounding_box(cls, v: Optional[BoundingBox], values: dict) -> Boundi
if v is None:
h, w, x, y = 0.0, 0.0, 0.0, 0.0
for point in values['polygon']['paths']:
h = max(h, point.y)
w = max(w, point.x)
x = min(x, point.x)
y = min(y, point.y)
h = max(h, point["y"])
w = max(w, point["x"])
x = min(x, point["x"])
y = min(y, point["y"])
v = BoundingBox(h=h, w=w, x=x, y=y)
return v

@@ -68,6 +68,10 @@ class FrameAnnotation(AnnotationBase):

AllowedAnnotation = Union[PolygonAnnotation, BoundingBoxAnnotation, EllipseAnnotation, FrameAnnotation]

class Item(BaseModel):
name: str
path: str

class DarwinV2(BaseModel):
version: Literal["2.0"] = "2.0"
schema_ref: str
@@ -79,9 +83,5 @@ def validate_schema_ref(cls, v: str) -> str:
assert v.startswith("http")
return v


class Item(BaseModel):
name: str
path: str