-
Notifications
You must be signed in to change notification settings - Fork 3
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
Allow complex Filters
#2145
base: main
Are you sure you want to change the base?
Allow complex Filters
#2145
Conversation
Benchmark comparisonGET /api/alive/
GET /api/v2/dataset/
GET /api/v2/job/
GET /api/v2/project/
GET /api/v2/task/
GET /api/v2/task-group/
GET /api/v2/workflow/
POST /api/v2/project/3/dataset/417/images/query/
GET /auth/current-user/
POST /auth/token/login/
|
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
class FiltersMock(TypedDict): | ||
types: dict[str, bool] | ||
attributes_include: dict[str, list[Any]] | ||
attributes_exclude: dict[str, list[Any]] | ||
|
||
@classmethod | ||
def get_default(cls): | ||
return cls(types={}, attributes_include={}, attributes_exclude={}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's re-use something like for sqlmodel models, and move it to fractal_server/images/models.py
next to the actual Filters
model.
] = Field( | ||
sa_column=Column( | ||
JSON, | ||
nullable=False, | ||
server_default='{"attributes": {}, "types": {}}', | ||
server_default=json.dumps( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use a FILTERS_DEFAULT_JSON
variable, defined in fractal_server/images/models.py
. It would be something equivalent to
FILTERS_DEFAULT_JSON = json.dumps(FiltersMock.get_defaults()) # replace FiltersMock with name
closes #1401
Checklist before merging
CHANGELOG.md
main
into the current branch.