-
Notifications
You must be signed in to change notification settings - Fork 29
feat: add domain API architecture with lazy loading namespaces #1965
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
base: main
Are you sure you want to change the base?
feat: add domain API architecture with lazy loading namespaces #1965
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
4066b49 to
e278d87
Compare
- Add new domain_api module with base namespace system - Add lazy loading mechanism for domain namespaces - Update client to support both legacy and domain API modes
e278d87 to
4f42437
Compare
9a395ec to
eb94dd6
Compare
|
I'll remove the new recipes once the review is complete |
a7f7e30 to
ed37edc
Compare
|
For an asset in Labeling - Done, the first call pass but the second one never ends : |
|
is that intentional ? |
|
This leads to an error : I think this'll happen a lot when client will try the domain SDK for the first time. Maybe we can have a better error message? Something like : |
|
BTW we still have very long & indigestible error messages when there is a GraphQLError error involved Traceback (most recent call last):File "/Users/paulruelle/kili-python-sdk/src/kili/core/graphql/graphql_client.py", line 265, in execute The above exception was the direct cause of the following exception: Traceback (most recent call last): The above exception was the direct cause of the following exception: Traceback (most recent call last): Process finished with exit code 1 |
Yes, but this should be a separated ticket / PR, as it should profit to both legacy or non legacy api methods |
-> error message is ambiguous: we talk about ids in the plural, but we can also put asset_id |
|
Sometime we use Same for : |
|
I now have a geospatial project with videos inside 😬 I think we can remove it, |
|
I think it's a bit confusing to have :
|
return a weird type for members : I would expect : |
src/kili/domain_api/projects.py
Outdated
| return self._parent.client.delete_from_roles(role_id=role_id) | ||
|
|
||
| @typechecked | ||
| def update(self, role_id: str, project_id: str, user_id: str, role: str) -> Dict: |
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.
role is not typed correctly here (should be role: Literal["ADMIN", "TEAM_MANAGER", "REVIEWER", "LABELER"] like above).
- Add new exports domain namespace for export operations - Remove notifications namespace from domain API - Update client_domain.py to register exports namespace - Refactor domain API namespaces (assets, labels, projects, etc.) - Update tests for domain API changes
Replace role_id with project_id + email in user operations for a more intuitive API. Add new update_properties_in_project_user method and deprecate the old role-based methods while maintaining backward compatibility in delete_from_roles.
Separates generic `create()` method into type-specific methods: - `create_default()`, `create_review()`, `create_inference()` - Similar split for geojson and shapefile imports - Adds `reviewed_label_id` parameter for review labels - Removes deprecated parameters (author_id, seconds_to_label) - Simplifies method signatures for better type safety and clarity
Replace generic create() method with specialized methods (create_image(), create_video_native(), create_video_frame(), create_geosat(), create_pdf(), create_text(), create_rich_text()) for improved type safety and clearer API surface. Add processing parameter support for video and geosat assets with automatic snake_case to camelCase conversion.
Introduces kili.questions namespace with dedicated methods for question management. Refactors issues namespace to explicitly filter for issue type, ensuring clear separation between issues and questions in the domain API.
46bb4ec to
f330465
Compare

Assets
assetsas_generatorcount_assetsappend_many_to_datasetdelete_many_from_datasetassign_assets_to_labelerssend_back_to_queuereturn_to_queueadd_to_reviewsubmit_for_reviewupdate_properties_in_assetskili.assets.update_processing_parameterschange_asset_external_idsadd_metadataset_metadataStorages
cloud_storage_connectionsadd_cloud_storage_connectionsynchronize_cloud_storage_connectioncloud_storage_integrationscount_cloud_storage_integrationscreate_cloud_storage_integrationupdate_cloud_storage_integrationdelete_cloud_storage_integrationIssues
issuescount_issuescreate_issuesupdate_issue_statusupdate_issue_statusupdate_issue_statusLabels
labelscount_labelsappend_labelsappend_labels_from_geojson_filesappend_labels_from_shapefilesdelete_labelsexport_labelscreate_predictionspredictionsinferencescreate_honeypotNotifications
Removed
Organizations
organizationscount_organizationsorganization_metricsPlugins
list_pluginsget_plugin_statusget_plugin_logsget_plugin_build_errorsactivate_plugin_on_projectdeactivate_plugin_on_projectcreate_webhookupdate_webhookupload_pluginupdate_plugindelete_pluginProject → Users
project_userscount_project_usersProjectVersions
Removed
Projects
projectscount_projectscreate_projectupdate_properties_in_projectupdate_infoupdate_interfaceupdate_workflow_settingsupdate_metadata_propertiesarchive_projectunarchive_projectcopy_projectdelete_projectupdate_project_anonymizationappend_to_rolesdelete_from_rolesupdate_properties_in_roleupdate_project_workflowget_stepsTags
tagscreate_tagupdate_tagdelete_tagtag_projectuntag_projectUsers
userscount_userscreate_userupdate_properties_in_userupdate_password