gpp-client 26.11.1.dev1__tar.gz → 26.11.2.dev1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/PKG-INFO +1 -1
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/domains/scheduler.py +96 -94
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/__init__.py +12 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/custom_fields.py +160 -3
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/custom_mutations.py +36 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/custom_typing_fields.py +24 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/enums.py +13 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/input_types.py +79 -1
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/.gitignore +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/LICENSE +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/README.md +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/graphql/README.md +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/pyproject.toml +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/__init__.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/cli/__init__.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/cli/cli.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/cli/commands/__init__.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/cli/commands/attachment.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/cli/commands/goats.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/cli/commands/observation.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/cli/commands/program.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/cli/commands/scheduler.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/cli/commands/site_status.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/cli/commands/target.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/cli/commands/workflow_state.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/cli/console.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/cli/output.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/cli/utils.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/client.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/constants.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/domains/__init__.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/domains/atom.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/domains/attachment.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/domains/base.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/domains/goats.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/domains/observation.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/domains/program.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/domains/site_status.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/domains/target.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/domains/workflow_state.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/environment.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/exceptions.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/async_base_client.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/base_model.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/base_operation.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/client.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/clone_observation.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/clone_target.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/create_call_for_proposals.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/create_observation.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/create_program.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/create_target_by_program_id.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/create_target_by_program_reference.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/create_target_by_proposal_reference.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/custom_queries.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/delete_call_for_proposals_by_id.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/delete_observation_by_id.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/delete_observation_by_reference.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/delete_program_by_id.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/delete_target_by_id.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/exceptions.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/fragments.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/get_call_for_proposals.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/get_calls_for_proposals.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/get_goats_config_options.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/get_goats_configuration_requests.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/get_goats_observations.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/get_goats_programs.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/get_observation.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/get_observation_attachments_by_id.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/get_observation_attachments_by_reference.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/get_observation_workflow_state_by_id.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/get_observation_workflow_state_by_reference.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/get_observations.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/get_program_attachments_by_id.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/get_program_attachments_by_proposal_reference.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/get_program_attachments_by_reference.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/get_program_by_id.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/get_program_by_proposal_reference.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/get_program_by_reference.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/get_programs.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/get_scheduler_all_programs_id.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/get_scheduler_programs.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/get_target_by_id.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/get_targets.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/obs_calculation_update.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/observation_edit.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/package_environment.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/ping.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/program_edit.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/restore_call_for_proposals_by_id.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/restore_observation_by_id.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/restore_observation_by_reference.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/restore_program_by_id.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/restore_target_by_id.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/scheduler_executed_events.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/scheduler_observations_updates.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/set_observation_workflow_state.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/target_edit.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/update_call_for_proposals_by_id.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/update_calls_for_proposals.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/update_observation_by_id.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/update_observation_by_reference.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/update_observations.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/update_program_by_id.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/update_programs.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/update_target_by_id.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/update_targets.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/logging_utils.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/rest/__init__.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/rest/client.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/rest/models.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/rest/utils.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/settings.py +0 -0
- {gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/urls.py +0 -0
|
@@ -5,9 +5,10 @@ Module for retrieving scheduler information.
|
|
|
5
5
|
__all__ = ["SchedulerDomain"]
|
|
6
6
|
|
|
7
7
|
from datetime import datetime
|
|
8
|
-
from typing import Any, AsyncIterator,
|
|
8
|
+
from typing import Any, AsyncIterator, Iterator
|
|
9
9
|
|
|
10
10
|
from gpp_client.domains.base import BaseDomain
|
|
11
|
+
from gpp_client.exceptions import GPPClientError
|
|
11
12
|
from gpp_client.rest.models import VisibilityChanges, parse_visibility_changes
|
|
12
13
|
from gpp_client.generated import (
|
|
13
14
|
SchedulerObservationsUpdates,
|
|
@@ -25,83 +26,81 @@ from gpp_client.generated.input_types import (
|
|
|
25
26
|
ObservationWorkflowState,
|
|
26
27
|
WhereCalculatedObservationWorkflow,
|
|
27
28
|
WhereObservation,
|
|
29
|
+
WhereOrderObservationId,
|
|
28
30
|
WhereOrderObservationWorkflowState,
|
|
29
|
-
WhereOrderProgramId,
|
|
30
|
-
WhereProgram,
|
|
31
31
|
)
|
|
32
32
|
|
|
33
|
-
#
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
# The ODB returns at most this many matches per select. Asking for at most this
|
|
34
|
+
# many IDs at a time means a batch can never be cut short.
|
|
35
|
+
ID_BATCH_SIZE = 1000
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
"""
|
|
40
|
-
Domain for retrieving scheduler information.
|
|
38
|
+
def _id_batches(ids: list[str]) -> Iterator[list[str]]:
|
|
41
39
|
"""
|
|
40
|
+
Split IDs into batches no larger than the ODB select cap, dropping repeats.
|
|
42
41
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
) -> list[Any]:
|
|
48
|
-
"""
|
|
49
|
-
Walk an ``OFFSET``/``LIMIT`` selection one page at a time and return
|
|
50
|
-
every match.
|
|
42
|
+
Parameters
|
|
43
|
+
----------
|
|
44
|
+
ids : list[str]
|
|
45
|
+
IDs to split, in the order to query them.
|
|
51
46
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
47
|
+
Yields
|
|
48
|
+
------
|
|
49
|
+
list[str]
|
|
50
|
+
The next batch of at most ``ID_BATCH_SIZE`` unique IDs.
|
|
51
|
+
"""
|
|
52
|
+
unique = list(dict.fromkeys(ids))
|
|
53
|
+
for start in range(0, len(unique), ID_BATCH_SIZE):
|
|
54
|
+
yield unique[start : start + ID_BATCH_SIZE]
|
|
59
55
|
|
|
60
|
-
Returns
|
|
61
|
-
-------
|
|
62
|
-
list[Any]
|
|
63
|
-
Every match across all pages, without repeats.
|
|
64
56
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
57
|
+
def _require_complete(result: Any, what: str) -> None:
|
|
58
|
+
"""
|
|
59
|
+
Fail when the ODB says it left matches out.
|
|
60
|
+
|
|
61
|
+
Parameters
|
|
62
|
+
----------
|
|
63
|
+
result : Any
|
|
64
|
+
Select result with ``matches`` and ``has_more``.
|
|
65
|
+
what : str
|
|
66
|
+
Plural name of the selected items, for the message.
|
|
67
|
+
|
|
68
|
+
Raises
|
|
69
|
+
------
|
|
70
|
+
GPPClientError
|
|
71
|
+
If ``result.has_more`` is set.
|
|
72
|
+
"""
|
|
73
|
+
# The scheduler must see every observation. A partial answer is worse than
|
|
74
|
+
# no answer, so stop instead of returning it.
|
|
75
|
+
if result.has_more:
|
|
76
|
+
raise GPPClientError(
|
|
77
|
+
f"ODB returned {len(result.matches)} {what} and reported more that "
|
|
78
|
+
"were left out; refusing to return an incomplete result."
|
|
79
|
+
)
|
|
74
80
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
if offset is not None and page_matches and page_matches[0].id == offset:
|
|
81
|
-
page_matches = page_matches[1:]
|
|
82
|
-
matches.extend(page_matches)
|
|
83
|
-
|
|
84
|
-
if not result.has_more or not page_matches:
|
|
85
|
-
return matches
|
|
86
|
-
offset = page_matches[-1].id
|
|
81
|
+
|
|
82
|
+
class SchedulerDomain(BaseDomain):
|
|
83
|
+
"""
|
|
84
|
+
Domain for retrieving scheduler information.
|
|
85
|
+
"""
|
|
87
86
|
|
|
88
87
|
async def get_programs(
|
|
89
88
|
self,
|
|
90
89
|
*,
|
|
91
90
|
programs_list: list[str] | None = None,
|
|
92
|
-
page_size: int = PROGRAMS_PAGE_SIZE,
|
|
93
91
|
) -> GetSchedulerPrograms:
|
|
94
92
|
"""
|
|
95
|
-
Get active scheduler programs
|
|
96
|
-
|
|
93
|
+
Get active scheduler programs.
|
|
94
|
+
|
|
95
|
+
Given a list, the IDs are queried in batches that the ODB can always
|
|
96
|
+
answer in full, so every active program in the list comes back. Without
|
|
97
|
+
a list, all active programs come from a single query.
|
|
97
98
|
|
|
98
99
|
Parameters
|
|
99
100
|
----------
|
|
100
101
|
programs_list : list[str] | None, optional
|
|
101
102
|
Optional list of program IDs to restrict the result set. Inactive
|
|
102
103
|
programs in the list are left out.
|
|
103
|
-
page_size : int, optional
|
|
104
|
-
Number of programs requested per page. Must be at least 2.
|
|
105
104
|
|
|
106
105
|
Returns
|
|
107
106
|
-------
|
|
@@ -110,17 +109,19 @@ class SchedulerDomain(BaseDomain):
|
|
|
110
109
|
|
|
111
110
|
Raises
|
|
112
111
|
------
|
|
113
|
-
|
|
114
|
-
If
|
|
112
|
+
GPPClientError
|
|
113
|
+
If the ODB reports matches it did not return.
|
|
115
114
|
"""
|
|
115
|
+
if programs_list is None:
|
|
116
|
+
response = await self._graphql.get_scheduler_programs(programs_list=None)
|
|
117
|
+
_require_complete(response.programs, "programs")
|
|
118
|
+
return response
|
|
116
119
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
)
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
matches = await self._fetch_all_pages(fetch_page, page_size)
|
|
120
|
+
matches = []
|
|
121
|
+
for batch in _id_batches(programs_list):
|
|
122
|
+
response = await self._graphql.get_scheduler_programs(programs_list=batch)
|
|
123
|
+
_require_complete(response.programs, "programs")
|
|
124
|
+
matches.extend(response.programs.matches)
|
|
124
125
|
return GetSchedulerPrograms(
|
|
125
126
|
programs=GetSchedulerProgramsPrograms(matches=matches, has_more=False)
|
|
126
127
|
)
|
|
@@ -288,6 +289,11 @@ class SchedulerDomain(BaseDomain):
|
|
|
288
289
|
-------
|
|
289
290
|
list[dict[str, Any]]
|
|
290
291
|
A list of dictionaries representing the programs and their elements.
|
|
292
|
+
|
|
293
|
+
Raises
|
|
294
|
+
------
|
|
295
|
+
GPPClientError
|
|
296
|
+
If the ODB reports programs or observations it did not return.
|
|
291
297
|
"""
|
|
292
298
|
|
|
293
299
|
if not programs_list:
|
|
@@ -339,39 +345,35 @@ class SchedulerDomain(BaseDomain):
|
|
|
339
345
|
pass
|
|
340
346
|
program["root"] = root
|
|
341
347
|
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
348
|
+
tree_obs_ids = [
|
|
349
|
+
g["observation"]["id"]
|
|
350
|
+
for program in programs
|
|
351
|
+
for g in program["all_group_elements"]
|
|
352
|
+
if g.get("observation")
|
|
353
|
+
]
|
|
354
|
+
obs_mapping = {}
|
|
355
|
+
# Query on 1000 observation ids (max pagination limit)
|
|
356
|
+
for batch in _id_batches(tree_obs_ids):
|
|
357
|
+
obs_response = await self._graphql.get_observations(
|
|
358
|
+
where=WhereObservation(
|
|
359
|
+
id=WhereOrderObservationId(in_=batch),
|
|
360
|
+
workflow=WhereCalculatedObservationWorkflow(
|
|
361
|
+
workflow_state=WhereOrderObservationWorkflowState(
|
|
362
|
+
in_=[
|
|
363
|
+
ObservationWorkflowState.READY,
|
|
364
|
+
ObservationWorkflowState.ONGOING,
|
|
365
|
+
]
|
|
366
|
+
)
|
|
367
|
+
),
|
|
368
|
+
observing_mode_type=WhereOptionEqObservingModeType(
|
|
369
|
+
is_null=False,
|
|
370
|
+
),
|
|
371
|
+
),
|
|
365
372
|
include_deleted=False,
|
|
366
373
|
)
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
fetch_observations_page, OBSERVATIONS_PAGE_SIZE
|
|
371
|
-
)
|
|
372
|
-
obs_mapping = {
|
|
373
|
-
o.id: self._move_timing_windows_to_root(o.model_dump()) for o in obs_matches
|
|
374
|
-
}
|
|
374
|
+
_require_complete(obs_response.observations, "observations")
|
|
375
|
+
for o in obs_response.observations.matches:
|
|
376
|
+
obs_mapping[o.id] = self._move_timing_windows_to_root(o.model_dump())
|
|
375
377
|
|
|
376
378
|
# Get sequence for filtered observations (READY/ONGOING)
|
|
377
379
|
if obs_mapping:
|
|
@@ -113,6 +113,7 @@ from .enums import (
|
|
|
113
113
|
ExecutionState,
|
|
114
114
|
Existence,
|
|
115
115
|
FieldLens,
|
|
116
|
+
Flamingos2AcquisitionType,
|
|
116
117
|
Flamingos2CustomSlitWidth,
|
|
117
118
|
Flamingos2Decker,
|
|
118
119
|
Flamingos2Disperser,
|
|
@@ -237,6 +238,7 @@ from .enums import (
|
|
|
237
238
|
SubaruCallForProposalsType,
|
|
238
239
|
SubaruInstrument,
|
|
239
240
|
TacCategory,
|
|
241
|
+
TacPartnerDecision,
|
|
240
242
|
TargetDisposition,
|
|
241
243
|
TelescopeConfigGeneratorType,
|
|
242
244
|
TelluricTag,
|
|
@@ -1120,6 +1122,7 @@ from .input_types import (
|
|
|
1120
1122
|
DeleteProgramUserInput,
|
|
1121
1123
|
DeleteProposalInput,
|
|
1122
1124
|
DeleteSequenceInput,
|
|
1125
|
+
DeleteTacFeedbackInput,
|
|
1123
1126
|
DemoScienceInput,
|
|
1124
1127
|
DirectorsTimeInput,
|
|
1125
1128
|
EditAsterismsPatchInput,
|
|
@@ -1289,6 +1292,7 @@ from .input_types import (
|
|
|
1289
1292
|
SetProgramReferenceInput,
|
|
1290
1293
|
SetProgramResourceLimitInput,
|
|
1291
1294
|
SetProposalStatusInput,
|
|
1295
|
+
SetTacFeedbackInput,
|
|
1292
1296
|
SiderealInput,
|
|
1293
1297
|
SignalToNoiseExposureTimeModeInput,
|
|
1294
1298
|
SiteCoordinateLimitsInput,
|
|
@@ -1304,6 +1308,8 @@ from .input_types import (
|
|
|
1304
1308
|
SubaruCallPropertiesInput,
|
|
1305
1309
|
SubaruProposalTypeInput,
|
|
1306
1310
|
SystemVerificationInput,
|
|
1311
|
+
TacFeedbackInput,
|
|
1312
|
+
TacRecommendedTimeInput,
|
|
1307
1313
|
TargetEditInput,
|
|
1308
1314
|
TargetEnvironmentInput,
|
|
1309
1315
|
TargetPropertiesInput,
|
|
@@ -1764,6 +1770,7 @@ __all__ = [
|
|
|
1764
1770
|
"DeleteProgramUserInput",
|
|
1765
1771
|
"DeleteProposalInput",
|
|
1766
1772
|
"DeleteSequenceInput",
|
|
1773
|
+
"DeleteTacFeedbackInput",
|
|
1767
1774
|
"DeleteTargetById",
|
|
1768
1775
|
"DeleteTargetByIdUpdateTargets",
|
|
1769
1776
|
"DeleteTargetByIdUpdateTargetsTargets",
|
|
@@ -1791,6 +1798,7 @@ __all__ = [
|
|
|
1791
1798
|
"ExposureTimeModeInput",
|
|
1792
1799
|
"FastTurnaroundInput",
|
|
1793
1800
|
"FieldLens",
|
|
1801
|
+
"Flamingos2AcquisitionType",
|
|
1794
1802
|
"Flamingos2AtomInput",
|
|
1795
1803
|
"Flamingos2CustomMaskInput",
|
|
1796
1804
|
"Flamingos2CustomSlitWidth",
|
|
@@ -2893,6 +2901,7 @@ __all__ = [
|
|
|
2893
2901
|
"SetProgramReferenceInput",
|
|
2894
2902
|
"SetProgramResourceLimitInput",
|
|
2895
2903
|
"SetProposalStatusInput",
|
|
2904
|
+
"SetTacFeedbackInput",
|
|
2896
2905
|
"SiderealInput",
|
|
2897
2906
|
"SiderealTargetDetails",
|
|
2898
2907
|
"SiderealTargetDetailsDec",
|
|
@@ -2924,6 +2933,9 @@ __all__ = [
|
|
|
2924
2933
|
"SubaruProposalTypeInput",
|
|
2925
2934
|
"SystemVerificationInput",
|
|
2926
2935
|
"TacCategory",
|
|
2936
|
+
"TacFeedbackInput",
|
|
2937
|
+
"TacPartnerDecision",
|
|
2938
|
+
"TacRecommendedTimeInput",
|
|
2927
2939
|
"TargetCore",
|
|
2928
2940
|
"TargetDetails",
|
|
2929
2941
|
"TargetDetailsNonsidereal",
|
{gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/custom_fields.py
RENAMED
|
@@ -114,6 +114,7 @@ from .custom_typing_fields import (
|
|
|
114
114
|
DeleteProgramUserResultGraphQLField,
|
|
115
115
|
DeleteProposalResultGraphQLField,
|
|
116
116
|
DeleteSequenceResultGraphQLField,
|
|
117
|
+
DeleteTacFeedbackResultGraphQLField,
|
|
117
118
|
DemoScienceGraphQLField,
|
|
118
119
|
DetectorEstimateGraphQLField,
|
|
119
120
|
DirectorsTimeGraphQLField,
|
|
@@ -386,6 +387,9 @@ from .custom_typing_fields import (
|
|
|
386
387
|
SubaruProposalTypeGraphQLField,
|
|
387
388
|
SystemProgramReferenceGraphQLField,
|
|
388
389
|
SystemVerificationGraphQLField,
|
|
390
|
+
TacFeedbackGraphQLField,
|
|
391
|
+
TacFeedbackResultGraphQLField,
|
|
392
|
+
TacRecommendedTimeGraphQLField,
|
|
389
393
|
TargetEnvironmentGraphQLField,
|
|
390
394
|
TargetGraphQLField,
|
|
391
395
|
TargetGroupGraphQLField,
|
|
@@ -1765,14 +1769,26 @@ class CalibrationSetFields(GraphQLField):
|
|
|
1765
1769
|
"""IGRINS-2 setup, when the instrument is IGRINS-2."""
|
|
1766
1770
|
return Igrins2DynamicFields("igrins2")
|
|
1767
1771
|
|
|
1772
|
+
@classmethod
|
|
1773
|
+
def gnirs(cls) -> "GnirsDynamicFields":
|
|
1774
|
+
"""GNIRS setup, when the instrument is GNIRS."""
|
|
1775
|
+
return GnirsDynamicFields("gnirs")
|
|
1776
|
+
|
|
1777
|
+
@classmethod
|
|
1778
|
+
def ghost(cls) -> "GhostDynamicFields":
|
|
1779
|
+
"""GHOST setup, when the instrument is GHOST."""
|
|
1780
|
+
return GhostDynamicFields("ghost")
|
|
1781
|
+
|
|
1768
1782
|
def fields(
|
|
1769
1783
|
self,
|
|
1770
1784
|
*subfields: Union[
|
|
1771
1785
|
CalibrationSetGraphQLField,
|
|
1772
1786
|
"CalibrationSetGcalFields",
|
|
1773
1787
|
"Flamingos2DynamicFields",
|
|
1788
|
+
"GhostDynamicFields",
|
|
1774
1789
|
"GmosNorthDynamicFields",
|
|
1775
1790
|
"GmosSouthDynamicFields",
|
|
1791
|
+
"GnirsDynamicFields",
|
|
1776
1792
|
"Igrins2DynamicFields",
|
|
1777
1793
|
],
|
|
1778
1794
|
) -> "CalibrationSetFields":
|
|
@@ -3886,6 +3902,26 @@ class DeleteSequenceResultFields(GraphQLField):
|
|
|
3886
3902
|
return self
|
|
3887
3903
|
|
|
3888
3904
|
|
|
3905
|
+
class DeleteTacFeedbackResultFields(GraphQLField):
|
|
3906
|
+
"""The result of deleting TAC feedback."""
|
|
3907
|
+
|
|
3908
|
+
result: "DeleteTacFeedbackResultGraphQLField" = DeleteTacFeedbackResultGraphQLField(
|
|
3909
|
+
"result"
|
|
3910
|
+
)
|
|
3911
|
+
"`true` if TAC feedback was deleted, `false` otherwise."
|
|
3912
|
+
|
|
3913
|
+
def fields(
|
|
3914
|
+
self, *subfields: DeleteTacFeedbackResultGraphQLField
|
|
3915
|
+
) -> "DeleteTacFeedbackResultFields":
|
|
3916
|
+
"""Subfields should come from the DeleteTacFeedbackResultFields class"""
|
|
3917
|
+
self._subfields.extend(subfields)
|
|
3918
|
+
return self
|
|
3919
|
+
|
|
3920
|
+
def alias(self, alias: str) -> "DeleteTacFeedbackResultFields":
|
|
3921
|
+
self._alias = alias
|
|
3922
|
+
return self
|
|
3923
|
+
|
|
3924
|
+
|
|
3889
3925
|
class DemoScienceFields(GraphQLField):
|
|
3890
3926
|
"""Proposal properties for Demo Science CallForProposals."""
|
|
3891
3927
|
|
|
@@ -5132,10 +5168,23 @@ class Flamingos2LongSlitAcquisitionFields(GraphQLField):
|
|
|
5132
5168
|
"""The exposure time mode used for ITC lookup for the acquisition sequence."""
|
|
5133
5169
|
return ExposureTimeModeFields("exposureTimeMode")
|
|
5134
5170
|
|
|
5171
|
+
explicit_acquisition_type: "Flamingos2LongSlitAcquisitionGraphQLField" = (
|
|
5172
|
+
Flamingos2LongSlitAcquisitionGraphQLField("explicitAcquisitionType")
|
|
5173
|
+
)
|
|
5174
|
+
"An explicitly specified acquisition type (if any). When null, the ITC\nclassifies the target: BRIGHT when it reaches a signal-to-noise of 10 in a\ntotal exposure time of at most 2 seconds, FAINT otherwise."
|
|
5175
|
+
|
|
5176
|
+
@classmethod
|
|
5177
|
+
def sky_offset(cls) -> "OffsetFields":
|
|
5178
|
+
"""Where the sky frames of a FAINT acquisition are taken. Present exactly when
|
|
5179
|
+
`explicitAcquisitionType` is FAINT."""
|
|
5180
|
+
return OffsetFields("skyOffset")
|
|
5181
|
+
|
|
5135
5182
|
def fields(
|
|
5136
5183
|
self,
|
|
5137
5184
|
*subfields: Union[
|
|
5138
|
-
Flamingos2LongSlitAcquisitionGraphQLField,
|
|
5185
|
+
Flamingos2LongSlitAcquisitionGraphQLField,
|
|
5186
|
+
"ExposureTimeModeFields",
|
|
5187
|
+
"OffsetFields",
|
|
5139
5188
|
],
|
|
5140
5189
|
) -> "Flamingos2LongSlitAcquisitionFields":
|
|
5141
5190
|
"""Subfields should come from the Flamingos2LongSlitAcquisitionFields class"""
|
|
@@ -5279,10 +5328,23 @@ class Flamingos2MosAcquisitionFields(GraphQLField):
|
|
|
5279
5328
|
"""The Time & Count exposure time mode used for the acquisition sequence."""
|
|
5280
5329
|
return ExposureTimeModeFields("exposureTimeMode")
|
|
5281
5330
|
|
|
5331
|
+
explicit_acquisition_type: "Flamingos2MosAcquisitionGraphQLField" = (
|
|
5332
|
+
Flamingos2MosAcquisitionGraphQLField("explicitAcquisitionType")
|
|
5333
|
+
)
|
|
5334
|
+
"An explicitly specified acquisition type (if any). When null, the acquisition\nis FAINT: the brightness of the mask's acquisition stars is unknown."
|
|
5335
|
+
|
|
5336
|
+
@classmethod
|
|
5337
|
+
def sky_offset(cls) -> "OffsetFields":
|
|
5338
|
+
"""Where the sky frames of a FAINT acquisition are taken. Present exactly when
|
|
5339
|
+
`explicitAcquisitionType` is FAINT."""
|
|
5340
|
+
return OffsetFields("skyOffset")
|
|
5341
|
+
|
|
5282
5342
|
def fields(
|
|
5283
5343
|
self,
|
|
5284
5344
|
*subfields: Union[
|
|
5285
|
-
Flamingos2MosAcquisitionGraphQLField,
|
|
5345
|
+
Flamingos2MosAcquisitionGraphQLField,
|
|
5346
|
+
"ExposureTimeModeFields",
|
|
5347
|
+
"OffsetFields",
|
|
5286
5348
|
],
|
|
5287
5349
|
) -> "Flamingos2MosAcquisitionFields":
|
|
5288
5350
|
"""Subfields should come from the Flamingos2MosAcquisitionFields class"""
|
|
@@ -11652,7 +11714,18 @@ class PartnerSplitFields(GraphQLField):
|
|
|
11652
11714
|
percent: "PartnerSplitGraphQLField" = PartnerSplitGraphQLField("percent")
|
|
11653
11715
|
"Percentage of requested time that should be associated with the partner."
|
|
11654
11716
|
|
|
11655
|
-
|
|
11717
|
+
@classmethod
|
|
11718
|
+
def lead(cls) -> "ProgramUserFields":
|
|
11719
|
+
"""The partner lead: the investigator the partner contacts during ITAC. Each
|
|
11720
|
+
partner with requested time needs a lead before the proposal can be submitted.
|
|
11721
|
+
The lead is an investigator affiliated with the partner, and the PI is always
|
|
11722
|
+
the lead of the PI's own partner (a non-partner PI leads US). Null until a
|
|
11723
|
+
lead is assigned, and always null for a partner without requested time."""
|
|
11724
|
+
return ProgramUserFields("lead")
|
|
11725
|
+
|
|
11726
|
+
def fields(
|
|
11727
|
+
self, *subfields: Union[PartnerSplitGraphQLField, "ProgramUserFields"]
|
|
11728
|
+
) -> "PartnerSplitFields":
|
|
11656
11729
|
"""Subfields should come from the PartnerSplitFields class"""
|
|
11657
11730
|
self._subfields.extend(subfields)
|
|
11658
11731
|
return self
|
|
@@ -11908,6 +11981,11 @@ class ProgramFields(GraphQLField):
|
|
|
11908
11981
|
"""All partner time allocations."""
|
|
11909
11982
|
return AllocationFields("allocations")
|
|
11910
11983
|
|
|
11984
|
+
@classmethod
|
|
11985
|
+
def tac_feedback(cls) -> "TacFeedbackFields":
|
|
11986
|
+
"""TAC feedback from each partner that has provided it, ordered by partner."""
|
|
11987
|
+
return TacFeedbackFields("tacFeedback")
|
|
11988
|
+
|
|
11911
11989
|
calibration_role: "ProgramGraphQLField" = ProgramGraphQLField("calibrationRole")
|
|
11912
11990
|
"Calibration role of the program"
|
|
11913
11991
|
|
|
@@ -11963,6 +12041,7 @@ class ProgramFields(GraphQLField):
|
|
|
11963
12041
|
"ProgramUserFields",
|
|
11964
12042
|
"ProposalFields",
|
|
11965
12043
|
"ProposalSummaryGenerationFields",
|
|
12044
|
+
"TacFeedbackFields",
|
|
11966
12045
|
"UserInvitationFields",
|
|
11967
12046
|
],
|
|
11968
12047
|
) -> "ProgramFields":
|
|
@@ -12130,6 +12209,10 @@ class ProgramUserFields(GraphQLField):
|
|
|
12130
12209
|
"classicalVisitor"
|
|
12131
12210
|
)
|
|
12132
12211
|
"Whether this investigator will visit to carry out the observations.\nThis property is only meaningful for classical proposals."
|
|
12212
|
+
is_partner_lead: "ProgramUserGraphQLField" = ProgramUserGraphQLField(
|
|
12213
|
+
"isPartnerLead"
|
|
12214
|
+
)
|
|
12215
|
+
"Whether this investigator is the partner lead for their partner (see\n`PartnerSplit.lead`)."
|
|
12133
12216
|
display_name: "ProgramUserGraphQLField" = ProgramUserGraphQLField("displayName")
|
|
12134
12217
|
"Name created preferentially from the fields of the preferred profile, falling back\nto the Orcid profile if the preferred fields are not set."
|
|
12135
12218
|
email: "ProgramUserGraphQLField" = ProgramUserGraphQLField("email")
|
|
@@ -14539,6 +14622,80 @@ class SystemVerificationFields(GraphQLField):
|
|
|
14539
14622
|
return self
|
|
14540
14623
|
|
|
14541
14624
|
|
|
14625
|
+
class TacFeedbackFields(GraphQLField):
|
|
14626
|
+
"""A partner's TAC (Time Allocation Committee) feedback for a program."""
|
|
14627
|
+
|
|
14628
|
+
partner: "TacFeedbackGraphQLField" = TacFeedbackGraphQLField("partner")
|
|
14629
|
+
"The partner whose TAC provided the feedback."
|
|
14630
|
+
decision: "TacFeedbackGraphQLField" = TacFeedbackGraphQLField("decision")
|
|
14631
|
+
"The partner TAC's decision."
|
|
14632
|
+
ranking: "TacFeedbackGraphQLField" = TacFeedbackGraphQLField("ranking")
|
|
14633
|
+
"The partner TAC's ranking of the proposal."
|
|
14634
|
+
|
|
14635
|
+
@classmethod
|
|
14636
|
+
def recommended_times(cls) -> "TacRecommendedTimeFields":
|
|
14637
|
+
"""The time recommended by the partner TAC, at most one entry per science band,
|
|
14638
|
+
sorted by band. Empty if the partner TAC recommends no time."""
|
|
14639
|
+
return TacRecommendedTimeFields("recommendedTimes")
|
|
14640
|
+
|
|
14641
|
+
comments: "TacFeedbackGraphQLField" = TacFeedbackGraphQLField("comments")
|
|
14642
|
+
"The partner TAC's comments, if any."
|
|
14643
|
+
|
|
14644
|
+
def fields(
|
|
14645
|
+
self, *subfields: Union[TacFeedbackGraphQLField, "TacRecommendedTimeFields"]
|
|
14646
|
+
) -> "TacFeedbackFields":
|
|
14647
|
+
"""Subfields should come from the TacFeedbackFields class"""
|
|
14648
|
+
self._subfields.extend(subfields)
|
|
14649
|
+
return self
|
|
14650
|
+
|
|
14651
|
+
def alias(self, alias: str) -> "TacFeedbackFields":
|
|
14652
|
+
self._alias = alias
|
|
14653
|
+
return self
|
|
14654
|
+
|
|
14655
|
+
|
|
14656
|
+
class TacFeedbackResultFields(GraphQLField):
|
|
14657
|
+
"""The result of setting TAC feedback."""
|
|
14658
|
+
|
|
14659
|
+
@classmethod
|
|
14660
|
+
def tac_feedback(cls) -> "TacFeedbackFields":
|
|
14661
|
+
"""The TAC feedback, as updated."""
|
|
14662
|
+
return TacFeedbackFields("tacFeedback")
|
|
14663
|
+
|
|
14664
|
+
def fields(
|
|
14665
|
+
self, *subfields: Union[TacFeedbackResultGraphQLField, "TacFeedbackFields"]
|
|
14666
|
+
) -> "TacFeedbackResultFields":
|
|
14667
|
+
"""Subfields should come from the TacFeedbackResultFields class"""
|
|
14668
|
+
self._subfields.extend(subfields)
|
|
14669
|
+
return self
|
|
14670
|
+
|
|
14671
|
+
def alias(self, alias: str) -> "TacFeedbackResultFields":
|
|
14672
|
+
self._alias = alias
|
|
14673
|
+
return self
|
|
14674
|
+
|
|
14675
|
+
|
|
14676
|
+
class TacRecommendedTimeFields(GraphQLField):
|
|
14677
|
+
"""The time recommended by a partner TAC for a science band."""
|
|
14678
|
+
|
|
14679
|
+
band: "TacRecommendedTimeGraphQLField" = TacRecommendedTimeGraphQLField("band")
|
|
14680
|
+
"The science band for which the time is recommended."
|
|
14681
|
+
|
|
14682
|
+
@classmethod
|
|
14683
|
+
def time(cls) -> "TimeSpanFields":
|
|
14684
|
+
"""The time recommended for this band."""
|
|
14685
|
+
return TimeSpanFields("time")
|
|
14686
|
+
|
|
14687
|
+
def fields(
|
|
14688
|
+
self, *subfields: Union[TacRecommendedTimeGraphQLField, "TimeSpanFields"]
|
|
14689
|
+
) -> "TacRecommendedTimeFields":
|
|
14690
|
+
"""Subfields should come from the TacRecommendedTimeFields class"""
|
|
14691
|
+
self._subfields.extend(subfields)
|
|
14692
|
+
return self
|
|
14693
|
+
|
|
14694
|
+
def alias(self, alias: str) -> "TacRecommendedTimeFields":
|
|
14695
|
+
self._alias = alias
|
|
14696
|
+
return self
|
|
14697
|
+
|
|
14698
|
+
|
|
14542
14699
|
class TargetFields(GraphQLField):
|
|
14543
14700
|
"""Target description"""
|
|
14544
14701
|
|
{gpp_client-26.11.1.dev1 → gpp_client-26.11.2.dev1}/src/gpp_client/generated/custom_mutations.py
RENAMED
|
@@ -27,6 +27,7 @@ from .custom_fields import (
|
|
|
27
27
|
DeleteProgramUserResultFields,
|
|
28
28
|
DeleteProposalResultFields,
|
|
29
29
|
DeleteSequenceResultFields,
|
|
30
|
+
DeleteTacFeedbackResultFields,
|
|
30
31
|
EmailFields,
|
|
31
32
|
InsertSmartGcalResultFields,
|
|
32
33
|
LinkUserResultFields,
|
|
@@ -53,6 +54,7 @@ from .custom_fields import (
|
|
|
53
54
|
SetProgramReferenceResultFields,
|
|
54
55
|
SetProgramResourceLimitResultFields,
|
|
55
56
|
SetProposalStatusResultFields,
|
|
57
|
+
TacFeedbackResultFields,
|
|
56
58
|
UnlinkUserResultFields,
|
|
57
59
|
UpdateAsterismsResultFields,
|
|
58
60
|
UpdateAttachmentsResultFields,
|
|
@@ -94,6 +96,7 @@ from .input_types import (
|
|
|
94
96
|
DeleteProgramUserInput,
|
|
95
97
|
DeleteProposalInput,
|
|
96
98
|
DeleteSequenceInput,
|
|
99
|
+
DeleteTacFeedbackInput,
|
|
97
100
|
InsertSmartGcalInput,
|
|
98
101
|
LinkUserInput,
|
|
99
102
|
RecordDatasetInput,
|
|
@@ -119,6 +122,7 @@ from .input_types import (
|
|
|
119
122
|
SetProgramReferenceInput,
|
|
120
123
|
SetProgramResourceLimitInput,
|
|
121
124
|
SetProposalStatusInput,
|
|
125
|
+
SetTacFeedbackInput,
|
|
122
126
|
UnlinkUserInput,
|
|
123
127
|
UpdateAsterismsInput,
|
|
124
128
|
UpdateAttachmentsInput,
|
|
@@ -777,6 +781,38 @@ class Mutation:
|
|
|
777
781
|
field_name="setAllocations", arguments=cleared_arguments
|
|
778
782
|
)
|
|
779
783
|
|
|
784
|
+
@classmethod
|
|
785
|
+
def set_tac_feedback(cls, input: SetTacFeedbackInput) -> TacFeedbackResultFields:
|
|
786
|
+
"""Sets, or updates, a partner's TAC feedback for a program. Feedback may only
|
|
787
|
+
be provided by partners with a non-zero time split in the proposal. NGO users
|
|
788
|
+
may only set feedback for their own partner, and only for programs they can
|
|
789
|
+
read."""
|
|
790
|
+
arguments: dict[str, dict[str, Any]] = {
|
|
791
|
+
"input": {"type": "SetTacFeedbackInput!", "value": input}
|
|
792
|
+
}
|
|
793
|
+
cleared_arguments = {
|
|
794
|
+
key: value for key, value in arguments.items() if value["value"] is not None
|
|
795
|
+
}
|
|
796
|
+
return TacFeedbackResultFields(
|
|
797
|
+
field_name="setTacFeedback", arguments=cleared_arguments
|
|
798
|
+
)
|
|
799
|
+
|
|
800
|
+
@classmethod
|
|
801
|
+
def delete_tac_feedback(
|
|
802
|
+
cls, input: DeleteTacFeedbackInput
|
|
803
|
+
) -> DeleteTacFeedbackResultFields:
|
|
804
|
+
"""Deletes a partner's TAC feedback for a program. NGO users may only delete
|
|
805
|
+
feedback for their own partner, and only for programs they can read."""
|
|
806
|
+
arguments: dict[str, dict[str, Any]] = {
|
|
807
|
+
"input": {"type": "DeleteTacFeedbackInput!", "value": input}
|
|
808
|
+
}
|
|
809
|
+
cleared_arguments = {
|
|
810
|
+
key: value for key, value in arguments.items() if value["value"] is not None
|
|
811
|
+
}
|
|
812
|
+
return DeleteTacFeedbackResultFields(
|
|
813
|
+
field_name="deleteTacFeedback", arguments=cleared_arguments
|
|
814
|
+
)
|
|
815
|
+
|
|
780
816
|
@classmethod
|
|
781
817
|
def set_guide_target_name(
|
|
782
818
|
cls, input: SetGuideTargetNameInput
|