Commit 781aa36
authored
[SYNPY-1589] Implement "Evaluation" OOP model (#1244)
* TDD: initial proof of concept integration tests (async)
* [SYNPY-1589] Implement core functionality of Evaluation OOP model (#1245)
* 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 <17128019+BryanFauble@users.noreply.github.com>
* 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 <17128019+BryanFauble@users.noreply.github.com>
* [SYNPY-1589] Implement documentation of Evaluation OOP model (#1247)
* first draft of docs
* style
* update tutorial to reflect new code in tutorial script. update formatting of model examples.
* add more examples to API reference docs
* update tutorial source code
* enforce principal_id is not none
* move PRINCIPAL_ID assert. update tutorial .md
* Update docs/tutorials/python/evaluation.md
Co-authored-by: BryanFauble <17128019+BryanFauble@users.noreply.github.com>
* force uppercase
* fix uppercase force
* additional prereq
* fix indentation. fix example
* change eval names
---------
Co-authored-by: BryanFauble <17128019+BryanFauble@users.noreply.github.com>
* no colons.
* always rely on client logger
* document refresh
* update sync update_acl examples
* fix vulnerability in assert statement1 parent 525e8c8 commit 781aa36
File tree
18 files changed
+4182
-20
lines changed- docs
- reference/experimental
- async
- sync
- tutorials/python
- tutorial_scripts
- synapseclient
- api
- core
- models
- protocols
- tests
- integration/synapseclient/models
- async
- synchronous
- unit/synapseclient/models
18 files changed
+4182
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| 89 | + | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
| |||
104 | 106 | | |
105 | 107 | | |
106 | 108 | | |
| 109 | + | |
107 | 110 | | |
108 | 111 | | |
109 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
66 | 77 | | |
67 | 78 | | |
68 | 79 | | |
| |||
261 | 272 | | |
262 | 273 | | |
263 | 274 | | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
264 | 285 | | |
0 commit comments