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

Feat: Active presets init #806

Merged
merged 10 commits into from
Dec 13, 2024
Merged

Feat: Active presets init #806

merged 10 commits into from
Dec 13, 2024

Conversation

deoracord
Copy link
Contributor

Introduction and Explanation

Add active preset functions to the sdk

  1. List presets
  2. get preset json raw
  3. delete preset

JIRA

Fixes https://linear.app/encord/issue/EC-5247/sdk-changes-to-support-active-presets

Documentation

Docs are being added as well

Copy link

github-actions bot commented Nov 27, 2024

Unit test report (Pydantic 1.x)

189 tests   189 ✅  5s ⏱️
  1 suites    0 💤
  1 files      0 ❌

Results for commit 4e85b64.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Nov 27, 2024

Unit test report ((Pydantic 2.x)

189 tests   189 ✅  6s ⏱️
  1 suites    0 💤
  1 files      0 ❌

Results for commit 4e85b64.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Nov 27, 2024

SDK integration test report

271 tests  ±0   271 ✅ +1   19m 27s ⏱️ - 6m 8s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌  - 1 

Results for commit 4e85b64. ± Comparison against base commit df7cd5c.

♻️ This comment has been updated with latest results.

@Jim-Encord Jim-Encord force-pushed the deora/feat/active-presets branch 2 times, most recently from 1d709f0 to 7caa1b8 Compare December 4, 2024 17:02
@@ -51,11 +55,9 @@ class CreatePresetParams(BaseDTO):

class CreatePresetPayload(BaseDTO):
name: str
description: Optional[str] = ""
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not a real parameter

Copy link
Contributor

Choose a reason for hiding this comment

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

This is emblematic of Active/ Index being a bad overload of two very similiar functionalitys branching at random points. For some reason, we do have a description that we don't render

class FilterDefinition(BaseDTO):
filters: List[Dict] = Field(default_factory=list)


class FilterPresetDefinition(BaseDTO):
local_filters: Dict[str, FilterDefinition] = Field(
default_factory=lambda: {str(uuid.UUID(int=0)): FilterDefinition()}, alias="local_filters"
default_factory=lambda: {str(uuid.UUID(int=0)): FilterDefinition()}, alias="localFilters"
Copy link
Contributor

Choose a reason for hiding this comment

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

This is somewhat concerning that this changed. Same is shared between Active and Index and Index already used so this can't change.

Copy link
Contributor

Choose a reason for hiding this comment

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

Checked that that change is compatible with master so we're chilling

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually we are camel-to-str on DTO anyway so this is un-necessary

)
global_filters: FilterDefinition = Field(default_factory=FilterDefinition, alias="global_filters")

@dto_validator(mode="after")
Copy link
Contributor

Choose a reason for hiding this comment

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

Lengthy commit message describing why this had to go

@Jim-Encord Jim-Encord force-pushed the deora/feat/active-presets branch 2 times, most recently from c5fe4db to e1db9d3 Compare December 6, 2024 15:25
@Jim-Encord Jim-Encord force-pushed the deora/feat/active-presets branch from e1db9d3 to 4e85b64 Compare December 9, 2024 16:59
@Jim-Encord Jim-Encord marked this pull request as ready for review December 11, 2024 15:35
@Jim-Encord Jim-Encord merged commit 51e95c4 into master Dec 13, 2024
7 checks passed
@Jim-Encord Jim-Encord deleted the deora/feat/active-presets branch December 13, 2024 13:55
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.

3 participants