Skip to content

Conversation

@jaymedina
Copy link
Contributor

See #1244

…he class object itself rather than feeding it into the method. new to_synapse_request
@jaymedina jaymedina marked this pull request as ready for review September 22, 2025 16:38
@jaymedina jaymedina requested a review from a team as a code owner September 22, 2025 16:39
Copy link
Contributor

@linglp linglp left a comment

Choose a reason for hiding this comment

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

Hi @jaymedina ! Thanks for your hard work. I looked through the PR too and added some comments. To summarize:

  1. Just like @BryanFauble's earlier comment about pagination, I wonder if it would make sense to implement pagination for all functions that return a Pagination<Evaluation> response based on the documentation. That includes the following function:
  • get_evaluations_by_project_async (see doc)
  • get_all_evaluations_async (see doc)
  • get_available_evaluations_async (see doc)
  1. I also suggest adding two dataclasses:
  • UserEvaluationPermissions: link
  • AccessControlList: link

AccessControlList would wrap results from GET /evaluation/{evalId}/acl, and UserEvaluationPermissions would handle GET /evaluation/{evalId}/permissions.

Copy link
Member

@thomasyu888 thomasyu888 left a comment

Choose a reason for hiding this comment

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

🔥 I'll defer to @BryanFauble or @andrewelamb for final review when they a chance. I let them know that we're focussed on everything Curator related but this is coming together nicely!

Copy link
Member

@BryanFauble BryanFauble left a comment

Choose a reason for hiding this comment

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

Great work here! I didn't see anything else that popped out at me. Thanks for implementing this.

@jaymedina jaymedina merged commit eb6e692 into synpy-1589-evaluation-model-main Oct 17, 2025
3 of 4 checks passed
@jaymedina jaymedina deleted the synpy-1589-evaluation-model-functionality branch October 17, 2025 22:41
jaymedina added a commit that referenced this pull request Oct 17, 2025
)

* Initialize protocol class + Evaluation dataclass

* exposing Evaluation API services. dataclass updates. syntax updates.

* dataclass methods are added which wrap API service functions

* fixed missing imports and syntax failures

* Evaluations can be imported like from synapseclient.models import Evaluation

* correct ACL inputs and output types. first pass at fixing async integration tests.

* fix import issues

* fix type errors. api module and its functions can now be imported individually. test improvements.

* add etag to prevent issues from OCC when updating an evaluation

* some formatting

* refactor: update and create will rely on the attributes changing in the class object itself rather than feeding it into the method. new to_synapse_request

* remove principal_id param. cannot be used. adding examples to docstrings

* patch all async tests

* style

* remove unnecessary imports

* complete refactor of store/update. store is now used for updating too

* add example to Evaluation dataclass

* new evaluation protocol class. moved out to protocols subfolder

* add synchronous integration tests

* new unit tests. updated integration tests. content_source is an immutable field. style

* show available access types

* remove todo

* get logger instance

* no need for request_type param in store_evaluation_async. removing CASE 2 for handling ID of new evals. remove integration test

* docstring example formatting

Co-authored-by: BryanFauble <[email protected]>

* update examples in docstrings

* the logger called in merge_dataclass_entities is now retrieved from active client

* remove _async suffix from evaluation_services functions

* style

* updated docstrings

* store -> create_or_update, updated tests

* style

* refactor update_acl dataclass method for user qol

* give users option to remove principals from ACL

* convert sync test methods to async so it calls schedule_for_cleanup fixture properly

* style

* if/elif -> if/else

* iteratively grab the attributes instead

* request_type is now a CREATE/UPDATE enum

* feed query params directly into client httpx response call so it can parse params with urlencode

* style

* grab the logger outside of the for-loop

---------

Co-authored-by: BryanFauble <[email protected]>
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.

5 participants