Skip to content

Conversation

@BryanFauble
Copy link
Member

@BryanFauble BryanFauble commented Sep 20, 2025

Actually covers SYNPY-1653 and SYNPY-1655

Problem:

  • RecordSet and CurationTask are new concepts introduced to the Synapse Rest APIs and need to be implemented in Python.

Solution:

  • Implement these new concepts, new APIs, and some supporting classes

Testing:

  • Unit tests

  • Integration tests

  • Did manual testing during development, but needs more comprehensive testing

@thomasyu888 thomasyu888 requested a review from SageGJ October 14, 2025 23:31
return self
else:
if not self.project_id:
raise ValueError("project_id is required to create a CurationTask")
Copy link
Contributor

Choose a reason for hiding this comment

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

This pattern pops up a lot in the various model classes. I wonder if this should be abstracted out into something that could be used as a function/decorator:

def required_attribute decorator(req_attributes: list[str]) -> None:
    for att in req_attributes:
        val = getattr(self, att)
        if val is None:
             raise ValueError(f"{att} is required for this method")

@BryanFauble
Copy link
Member Author

As a note tests are patched in #1256

@BryanFauble BryanFauble marked this pull request as ready for review October 15, 2025 19:33
@BryanFauble BryanFauble requested a review from a team as a code owner October 15, 2025 19:33
"""Summary statistics from the export response"""

def fill_from_dict(
self, synapse_response: Union[Dict[str, Any], Any]
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: This type is redudant: Union[Dict[str, Any], Any] could replace with just Any

@andrewelamb
Copy link
Contributor

LGTM, Really exciting to see all the OOP Models!

@BryanFauble BryanFauble merged commit 5d21697 into develop Oct 16, 2025
9 of 22 checks passed
@BryanFauble BryanFauble deleted the synpy-1653-metadata-tasks-and-recordsets branch October 16, 2025 22:25
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