-
Notifications
You must be signed in to change notification settings - Fork 72
[SYNPY-1437] INCOMPLETE/DRAFT - Start the process to move to use the /bundle2 rest API #1201
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: develop
Are you sure you want to change the base?
Conversation
… entity date. NOTE: This is incomplete, and contains a number of non-working changes. Progress was topped after being blocked due to ticket (PLFM-8313)
# For creation, parent ID is required | ||
# TODO: Projects won't have a parent in this case | ||
# if parent_id: | ||
# # Add parentId to the entity if not already set | ||
# if not entity.get("parentId"): | ||
# entity["parentId"] = parent_id | ||
# elif not entity.get("parentId"): | ||
# raise ValueError("Parent ID must be provided for entity creation") |
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.
To be addressed
# For updates we might need to retrieve the existing entity to merge data | ||
# Only retrieve if we need |
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.
update functionality is incomplete
Folder, | ||
Project, | ||
Table, | ||
) | ||
|
||
|
||
async def store_entity( |
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.
This function is incomplete, more work to support all functionality from the existing synapse class .store()
function is needed
@@ -120,6 +120,77 @@ async def store_entity_components( | |||
return re_read_required | |||
|
|||
|
|||
async def store_entity_components_file_folder_only( |
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.
This was a hack to make sure that storing files/folders attached to the project
and folder
class could still be saved. See the logic for annotations
and activity
is commented out in this code.
NOTE: This is an incomplete solution. All the changes included here are largely un-tested. Development on this jira stopped when I re-discovered that https://sagebionetworks.jira.com/browse/PLFM-8313 blocks us from being able to move to the
/bundle2
rest APIs, as this prevents our ability to forcefully increment entities as available in an API like https://rest-docs.synapse.org/rest/PUT/entity/id.htmlProblem:
Solution:
/bundle2
API callsTesting: