dkist-processing-common 6.2.4__tar.gz → 7.0.0rc2__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.
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/PKG-INFO +1 -1
- dkist-processing-common-7.0.0rc2/changelog/195.misc.rst +1 -0
- dkist-processing-common-7.0.0rc2/changelog/196.misc.rst +1 -0
- dkist-processing-common-7.0.0rc2/changelog/197.misc.rst +1 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/_util/graphql.py +2 -2
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/_util/scratch.py +2 -2
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/_util/tags.py +3 -3
- {dkist-processing-common-6.2.4/dkist_processing_common/_util → dkist-processing-common-7.0.0rc2/dkist_processing_common}/config.py +41 -15
- dkist-processing-common-7.0.0rc2/dkist_processing_common/models/message.py +65 -0
- dkist-processing-common-7.0.0rc2/dkist_processing_common/models/message_queue_binding.py +25 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/models/wavelength.py +12 -14
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tasks/base.py +2 -2
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tasks/l1_output_data.py +11 -5
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tasks/mixin/globus.py +8 -8
- dkist-processing-common-7.0.0rc2/dkist_processing_common/tasks/mixin/interservice_bus.py +22 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tasks/mixin/metadata_store.py +2 -2
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tasks/mixin/object_store.py +11 -11
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tasks/mixin/quality/_metrics.py +9 -9
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tests/test_publish_catalog_messages.py +14 -14
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common.egg-info/PKG-INFO +1 -1
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common.egg-info/SOURCES.txt +5 -1
- dkist-processing-common-7.0.0rc2/dkist_processing_common.egg-info/requires.txt +52 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/setup.cfg +18 -14
- dkist-processing-common-6.2.4/dkist_processing_common/models/message.py +0 -36
- dkist-processing-common-6.2.4/dkist_processing_common/tasks/mixin/interservice_bus.py +0 -46
- dkist-processing-common-6.2.4/dkist_processing_common.egg-info/requires.txt +0 -53
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/.gitignore +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/.pre-commit-config.yaml +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/.readthedocs.yml +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/CHANGELOG.rst +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/README.rst +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/bitbucket-pipelines.yml +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/changelog/.gitempty +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/check_changelog_updated.sh +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/__init__.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/_util/__init__.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/_util/constants.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/_util/dkist_location.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/codecs/__init__.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/codecs/asdf.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/codecs/bytes.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/codecs/fits.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/codecs/iobase.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/codecs/json.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/codecs/path.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/codecs/quality.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/codecs/str.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/fonts/Lato-Regular.ttf +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/fonts/__init__.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/manual.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/models/__init__.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/models/constants.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/models/fits_access.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/models/flower_pot.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/models/graphql.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/models/parameters.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/models/quality.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/models/tags.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/models/task_name.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/parsers/__init__.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/parsers/cs_step.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/parsers/dsps_repeat.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/parsers/experiment_id_bud.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/parsers/id_bud.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/parsers/l0_fits_access.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/parsers/l1_fits_access.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/parsers/proposal_id_bud.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/parsers/quality.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/parsers/single_value_single_key_flower.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/parsers/task.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/parsers/time.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/parsers/unique_bud.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/parsers/wavelength.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tasks/__init__.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tasks/assemble_movie.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tasks/mixin/__init__.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tasks/mixin/input_dataset.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tasks/mixin/quality/__init__.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tasks/mixin/quality/_base.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tasks/output_data_base.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tasks/parse_l0_input_data.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tasks/quality_metrics.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tasks/teardown.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tasks/transfer_input_data.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tasks/trial_catalog.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tasks/trial_output_data.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tasks/write_l1.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tests/__init__.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tests/conftest.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tests/test_assemble_movie.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tests/test_assemble_quality.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tests/test_base.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tests/test_codecs.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tests/test_constants.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tests/test_cs_step.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tests/test_dkist_location.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tests/test_fits_access.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tests/test_flower_pot.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tests/test_input_dataset.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tests/test_output_data_base.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tests/test_parameters.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tests/test_parse_l0_input_data.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tests/test_quality.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tests/test_quality_mixin.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tests/test_scratch.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tests/test_stems.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tests/test_submit_dataset_metadata.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tests/test_tags.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tests/test_task_name.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tests/test_task_parsing.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tests/test_teardown.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tests/test_transfer_input_data.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tests/test_transfer_l1_output_data.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tests/test_trial_catalog.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tests/test_trial_output_data.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tests/test_workflow_task_base.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common/tests/test_write_l1.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common.egg-info/dependency_links.txt +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/dkist_processing_common.egg-info/top_level.txt +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/docs/Makefile +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/docs/changelog.rst +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/docs/conf.py +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/docs/index.rst +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/docs/make.bat +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/docs/requirements.txt +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/licenses/LICENSE.rst +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/pyproject.toml +0 -0
- {dkist-processing-common-6.2.4 → dkist-processing-common-7.0.0rc2}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dkist-processing-common
|
|
3
|
-
Version:
|
|
3
|
+
Version: 7.0.0rc2
|
|
4
4
|
Summary: Common task classes used by the DKIST Science Data Processing pipelines to process DKIST data.
|
|
5
5
|
Home-page: https://bitbucket.org/dkistdc/dkist-processing-common/src/main/
|
|
6
6
|
Author: NSO / AURA
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Update `sphinx-auotapi` pin to only exclude the breaking version. The bug was fixed in subsequent versions.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Resolve matplotlib version conflict
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Upgrade dkist-processing-core to support airflow to 2.9.1 which includes the dependency on pydantic 2 and consequently a few other libraries that needed upgrading for the same pydantic 2 dependency.
|
|
@@ -10,7 +10,7 @@ from gqlclient.request_wrap import wrap_request
|
|
|
10
10
|
from requests.adapters import HTTPAdapter
|
|
11
11
|
from requests.packages.urllib3.util.retry import Retry
|
|
12
12
|
|
|
13
|
-
from dkist_processing_common.
|
|
13
|
+
from dkist_processing_common.config import common_configurations
|
|
14
14
|
|
|
15
15
|
logger = logging.getLogger(__name__)
|
|
16
16
|
|
|
@@ -41,7 +41,7 @@ class GraphQLClient(GraphQLClientBase):
|
|
|
41
41
|
kwargs["headers"] = {
|
|
42
42
|
**kwargs.get("headers", {}),
|
|
43
43
|
"Service-Name": __name__,
|
|
44
|
-
"Authorization":
|
|
44
|
+
"Authorization": common_configurations.gql_auth_token,
|
|
45
45
|
}
|
|
46
46
|
with requests.sessions.Session() as http:
|
|
47
47
|
http.mount("http://", self.adapter)
|
|
@@ -6,8 +6,8 @@ from pathlib import Path
|
|
|
6
6
|
from shutil import rmtree
|
|
7
7
|
from typing import Generator
|
|
8
8
|
|
|
9
|
-
from dkist_processing_common._util.config import service_configuration
|
|
10
9
|
from dkist_processing_common._util.tags import TagDB
|
|
10
|
+
from dkist_processing_common.config import common_configurations
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
logger = logging.getLogger(__name__)
|
|
@@ -39,7 +39,7 @@ class WorkflowFileSystem:
|
|
|
39
39
|
self.recipe_run_id = recipe_run_id
|
|
40
40
|
self.task_name = task_name
|
|
41
41
|
if not scratch_base_path:
|
|
42
|
-
scratch_base_path =
|
|
42
|
+
scratch_base_path = common_configurations.scratch_base_path
|
|
43
43
|
self.scratch_base_path = scratch_base_path
|
|
44
44
|
self.workflow_base_path = Path(self.scratch_base_path) / str(recipe_run_id)
|
|
45
45
|
with self._mask():
|
|
@@ -7,7 +7,7 @@ from redis.backoff import FullJitterBackoff
|
|
|
7
7
|
from redis.exceptions import ConnectionError
|
|
8
8
|
from redis.retry import Retry
|
|
9
9
|
|
|
10
|
-
from dkist_processing_common.
|
|
10
|
+
from dkist_processing_common.config import common_configurations
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
class TagDB:
|
|
@@ -29,10 +29,10 @@ class TagDB:
|
|
|
29
29
|
def __init__(self, recipe_run_id: int, task_name: str, namespace: str = "path"):
|
|
30
30
|
self.recipe_run_id = recipe_run_id
|
|
31
31
|
self.task_name = task_name
|
|
32
|
-
self._db = self.recipe_run_id %
|
|
32
|
+
self._db = self.recipe_run_id % common_configurations.scratch_inventory_max_db_index
|
|
33
33
|
self.namespace = f"{self.recipe_run_id}:{namespace}:"
|
|
34
34
|
connection_name = f"{self.namespace}{self.task_name}"
|
|
35
|
-
scratch_inventory =
|
|
35
|
+
scratch_inventory = common_configurations.scratch_inventory_mesh_service
|
|
36
36
|
self.db_retry = Retry(
|
|
37
37
|
backoff=FullJitterBackoff(), retries=3, supported_errors=(ConnectionError,)
|
|
38
38
|
)
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"""Common configurations."""
|
|
2
|
-
from
|
|
2
|
+
from dkist_processing_core.config import DKISTProcessingCoreConfiguration
|
|
3
3
|
from dkist_service_configuration.settings import DEFAULT_MESH_SERVICE
|
|
4
4
|
from dkist_service_configuration.settings import MeshService
|
|
5
5
|
from pydantic import BaseModel
|
|
6
6
|
from pydantic import Field
|
|
7
|
+
from talus import ConnectionRetryerFactory
|
|
8
|
+
from talus import ConsumerConnectionParameterFactory
|
|
9
|
+
from talus import ProducerConnectionParameterFactory
|
|
7
10
|
|
|
8
11
|
|
|
9
12
|
class RetryConfig(BaseModel):
|
|
@@ -16,22 +19,16 @@ class RetryConfig(BaseModel):
|
|
|
16
19
|
retry_tries: int = -1
|
|
17
20
|
|
|
18
21
|
|
|
19
|
-
class
|
|
22
|
+
class DKISTProcessingCommonConfiguration(DKISTProcessingCoreConfiguration):
|
|
20
23
|
"""Common configurations."""
|
|
21
24
|
|
|
22
25
|
retry_config: RetryConfig = Field(default_factory=RetryConfig)
|
|
23
|
-
# interservice bus
|
|
24
|
-
isb_username: str = "guest"
|
|
25
|
-
isb_password: str = "guest"
|
|
26
|
-
isb_exchange: str = "master.direct.x"
|
|
27
|
-
isb_heartbeat_timeout: int = 60 # 1 minute
|
|
28
26
|
# metadata-store-api
|
|
29
27
|
gql_auth_token: str | None = None
|
|
30
28
|
# object-store-api
|
|
31
29
|
object_store_access_key: str | None = None
|
|
32
30
|
object_store_secret_key: str | None = None
|
|
33
31
|
object_store_use_ssl: bool = False
|
|
34
|
-
# start object-clerk library
|
|
35
32
|
multipart_threshold: int | None = None
|
|
36
33
|
s3_client_config: dict | None = None
|
|
37
34
|
s3_upload_config: dict | None = None
|
|
@@ -54,11 +51,6 @@ class ServiceConfiguration(MeshServiceConfigurationBase):
|
|
|
54
51
|
gateway = self.service_mesh_detail(service_name="internal-api-gateway")
|
|
55
52
|
return f"http://{gateway.host}:{gateway.port}/graphql"
|
|
56
53
|
|
|
57
|
-
@property
|
|
58
|
-
def isb_mesh_service(self) -> MeshService:
|
|
59
|
-
"""Interservice bus host and port."""
|
|
60
|
-
return self.service_mesh_detail(service_name="interservice-bus")
|
|
61
|
-
|
|
62
54
|
@property
|
|
63
55
|
def object_store_api_mesh_service(self) -> MeshService:
|
|
64
56
|
"""Object store host and port."""
|
|
@@ -77,6 +69,40 @@ class ServiceConfiguration(MeshServiceConfigurationBase):
|
|
|
77
69
|
"""Scratch inventory's largest db index."""
|
|
78
70
|
return self.scratch_inventory_db_count - 1
|
|
79
71
|
|
|
72
|
+
@property
|
|
73
|
+
def isb_producer_connection_parameters(self) -> ProducerConnectionParameterFactory:
|
|
74
|
+
"""Return the connection parameters for the ISB producer."""
|
|
75
|
+
return ProducerConnectionParameterFactory(
|
|
76
|
+
rabbitmq_host=self.isb_mesh_service.host,
|
|
77
|
+
rabbitmq_port=self.isb_mesh_service.port,
|
|
78
|
+
rabbitmq_user=self.isb_username,
|
|
79
|
+
rabbitmq_pass=self.isb_password,
|
|
80
|
+
connection_name="dkist-processing-common-producer",
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
@property
|
|
84
|
+
def isb_consumer_connection_parameters(self) -> ConsumerConnectionParameterFactory:
|
|
85
|
+
"""Return the connection parameters for the ISB producer."""
|
|
86
|
+
return ConsumerConnectionParameterFactory(
|
|
87
|
+
rabbitmq_host=self.isb_mesh_service.host,
|
|
88
|
+
rabbitmq_port=self.isb_mesh_service.port,
|
|
89
|
+
rabbitmq_user=self.isb_username,
|
|
90
|
+
rabbitmq_pass=self.isb_password,
|
|
91
|
+
connection_name="dkist-processing-common-consumer",
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
@property
|
|
95
|
+
def isb_connection_retryer(self) -> ConnectionRetryerFactory:
|
|
96
|
+
"""Return the connection retryer for the ISB connection."""
|
|
97
|
+
return ConnectionRetryerFactory(
|
|
98
|
+
delay_min=self.retry_config.retry_delay,
|
|
99
|
+
delay_max=self.retry_config.retry_max_delay,
|
|
100
|
+
backoff=self.retry_config.retry_backoff,
|
|
101
|
+
jitter_min=self.retry_config.retry_jitter[0],
|
|
102
|
+
jitter_max=self.retry_config.retry_jitter[1],
|
|
103
|
+
attempts=self.retry_config.retry_tries,
|
|
104
|
+
)
|
|
105
|
+
|
|
80
106
|
|
|
81
|
-
|
|
82
|
-
|
|
107
|
+
common_configurations = DKISTProcessingCommonConfiguration()
|
|
108
|
+
common_configurations.log_configurations()
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"""Data structures for messages placed on the interservice bus."""
|
|
2
|
+
from typing import Type
|
|
3
|
+
|
|
4
|
+
from pydantic import Field
|
|
5
|
+
from talus import MessageBodyBase
|
|
6
|
+
from talus import PublishMessageBase
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
########################
|
|
10
|
+
# Message Body Schemas #
|
|
11
|
+
########################
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class CatalogFrameMessageBody(MessageBodyBase):
|
|
15
|
+
"""Schema for the catalog frame message body."""
|
|
16
|
+
|
|
17
|
+
objectName: str
|
|
18
|
+
bucket: str
|
|
19
|
+
incrementDatasetCatalogReceiptCount: bool = True
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class CatalogObjectMessageBody(MessageBodyBase):
|
|
23
|
+
"""Schema for the catalog object message body."""
|
|
24
|
+
|
|
25
|
+
objectType: str
|
|
26
|
+
objectName: str
|
|
27
|
+
bucket: str
|
|
28
|
+
groupId: str
|
|
29
|
+
groupName: str = Field(default="DATASET")
|
|
30
|
+
incrementDatasetCatalogReceiptCount: bool = True
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class CreateQualityReportMessageBody(MessageBodyBase):
|
|
34
|
+
"""Schema for the create quality report message body."""
|
|
35
|
+
|
|
36
|
+
datasetId: str
|
|
37
|
+
bucket: str
|
|
38
|
+
objectName: str
|
|
39
|
+
incrementDatasetCatalogReceiptCount: bool = True
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
###################
|
|
43
|
+
# Message Classes #
|
|
44
|
+
###################
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class CatalogFrameMessage(PublishMessageBase):
|
|
48
|
+
"""Catalog frame message."""
|
|
49
|
+
|
|
50
|
+
message_body_cls: Type[CatalogFrameMessageBody] = CatalogFrameMessageBody
|
|
51
|
+
default_routing_key = "catalog.frame.m"
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class CatalogObjectMessage(PublishMessageBase):
|
|
55
|
+
"""Catalog object message."""
|
|
56
|
+
|
|
57
|
+
message_body_cls: Type[CatalogObjectMessageBody] = CatalogObjectMessageBody
|
|
58
|
+
default_routing_key = "catalog.object.m"
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
class CreateQualityReportMessage(PublishMessageBase):
|
|
62
|
+
"""Create quality report message."""
|
|
63
|
+
|
|
64
|
+
message_body_cls: Type[CreateQualityReportMessageBody] = CreateQualityReportMessageBody
|
|
65
|
+
default_routing_key = "create.quality.report.m"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""Binding between a queue and a message to be published."""
|
|
2
|
+
from talus import Binding
|
|
3
|
+
from talus import Queue
|
|
4
|
+
|
|
5
|
+
from dkist_processing_common.config import common_configurations
|
|
6
|
+
from dkist_processing_common.models.message import CatalogFrameMessage
|
|
7
|
+
from dkist_processing_common.models.message import CatalogObjectMessage
|
|
8
|
+
from dkist_processing_common.models.message import CreateQualityReportMessage
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
catalog_frame_queue = Queue(
|
|
12
|
+
name="catalog.frame.q", arguments=common_configurations.isb_queue_arguments
|
|
13
|
+
)
|
|
14
|
+
catalog_object_queue = Queue(
|
|
15
|
+
name="catalog.object.q", arguments=common_configurations.isb_queue_arguments
|
|
16
|
+
)
|
|
17
|
+
create_quality_report_queue = Queue(
|
|
18
|
+
name="create.quality.report.q", arguments=common_configurations.isb_queue_arguments
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
common_message_queue_bindings = [
|
|
22
|
+
Binding(queue=catalog_frame_queue, message=CatalogFrameMessage),
|
|
23
|
+
Binding(queue=catalog_object_queue, message=CatalogObjectMessage),
|
|
24
|
+
Binding(queue=create_quality_report_queue, message=CreateQualityReportMessage),
|
|
25
|
+
]
|
|
@@ -1,30 +1,28 @@
|
|
|
1
1
|
"""Support classes for manipulating wavelengths."""
|
|
2
2
|
import astropy.units as u
|
|
3
3
|
from pydantic import BaseModel
|
|
4
|
-
from pydantic import
|
|
4
|
+
from pydantic import ConfigDict
|
|
5
|
+
from pydantic import field_validator
|
|
6
|
+
from pydantic import model_validator
|
|
7
|
+
from pydantic import ValidationInfo
|
|
5
8
|
|
|
6
9
|
|
|
7
10
|
class WavelengthRange(BaseModel):
|
|
8
11
|
"""Model for holding a range of wavelengths."""
|
|
9
12
|
|
|
13
|
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
|
14
|
+
|
|
10
15
|
min: u.Quantity
|
|
11
16
|
max: u.Quantity
|
|
12
17
|
|
|
13
|
-
@
|
|
14
|
-
|
|
18
|
+
@field_validator("min", "max")
|
|
19
|
+
@classmethod
|
|
20
|
+
def convert_to_nanometers(cls, v, info: ValidationInfo) -> u.Quantity:
|
|
15
21
|
"""Validate wavelength unit is for distance and convert to nanometers."""
|
|
16
22
|
return v.to(u.nm)
|
|
17
23
|
|
|
18
|
-
@
|
|
19
|
-
def max_greater_than_min(
|
|
24
|
+
@model_validator(mode="after")
|
|
25
|
+
def max_greater_than_min(self):
|
|
20
26
|
"""Validate that the max wavelength is greater than the min wavelength."""
|
|
21
|
-
|
|
22
|
-
min = values["min"]
|
|
23
|
-
if min > max:
|
|
27
|
+
if self.min > self.max:
|
|
24
28
|
raise ValueError("min is greater than max. Values may be reversed.")
|
|
25
|
-
return v
|
|
26
|
-
|
|
27
|
-
class Config:
|
|
28
|
-
"""pydantic.BaseModel configuration."""
|
|
29
|
-
|
|
30
|
-
arbitrary_types_allowed = True
|
|
@@ -12,11 +12,11 @@ from typing import Type
|
|
|
12
12
|
import pkg_resources
|
|
13
13
|
from dkist_processing_core import TaskBase
|
|
14
14
|
|
|
15
|
-
from dkist_processing_common._util.config import service_configuration
|
|
16
15
|
from dkist_processing_common._util.scratch import WorkflowFileSystem
|
|
17
16
|
from dkist_processing_common._util.tags import TagDB
|
|
18
17
|
from dkist_processing_common.codecs.bytes import bytes_encoder
|
|
19
18
|
from dkist_processing_common.codecs.path import path_decoder
|
|
19
|
+
from dkist_processing_common.config import common_configurations
|
|
20
20
|
from dkist_processing_common.models.constants import ConstantsBase
|
|
21
21
|
from dkist_processing_common.models.tags import StemName
|
|
22
22
|
from dkist_processing_common.models.tags import Tag
|
|
@@ -70,7 +70,7 @@ class WorkflowTaskBase(TaskBase, MetadataStoreMixin, ABC):
|
|
|
70
70
|
self.constants = self.constants_model_class(
|
|
71
71
|
recipe_run_id=recipe_run_id, task_name=self.task_name
|
|
72
72
|
)
|
|
73
|
-
self.docs_base_url =
|
|
73
|
+
self.docs_base_url = common_configurations.docs_base_url
|
|
74
74
|
self.filename_counter = TagDB(
|
|
75
75
|
recipe_run_id=recipe_run_id, task_name=self.task_name, namespace="counter"
|
|
76
76
|
)
|
|
@@ -8,8 +8,11 @@ from typing import Iterable
|
|
|
8
8
|
from dkist_processing_common.codecs.quality import quality_data_decoder
|
|
9
9
|
from dkist_processing_common.codecs.quality import quality_data_encoder
|
|
10
10
|
from dkist_processing_common.models.message import CatalogFrameMessage
|
|
11
|
+
from dkist_processing_common.models.message import CatalogFrameMessageBody
|
|
11
12
|
from dkist_processing_common.models.message import CatalogObjectMessage
|
|
13
|
+
from dkist_processing_common.models.message import CatalogObjectMessageBody
|
|
12
14
|
from dkist_processing_common.models.message import CreateQualityReportMessage
|
|
15
|
+
from dkist_processing_common.models.message import CreateQualityReportMessageBody
|
|
13
16
|
from dkist_processing_common.models.tags import Tag
|
|
14
17
|
from dkist_processing_common.tasks.mixin.globus import GlobusMixin
|
|
15
18
|
from dkist_processing_common.tasks.mixin.interservice_bus import InterserviceBusMixin
|
|
@@ -181,14 +184,15 @@ class PublishCatalogAndQualityMessages(L1OutputDataBase, InterserviceBusMixin):
|
|
|
181
184
|
-------
|
|
182
185
|
A list of frame messages
|
|
183
186
|
"""
|
|
184
|
-
|
|
185
|
-
|
|
187
|
+
message_bodies = [
|
|
188
|
+
CatalogFrameMessageBody(
|
|
186
189
|
objectName=self.format_object_key(path=p),
|
|
187
190
|
conversationId=str(self.recipe_run_id),
|
|
188
191
|
bucket=self.destination_bucket,
|
|
189
192
|
)
|
|
190
193
|
for p in paths
|
|
191
194
|
]
|
|
195
|
+
messages = [CatalogFrameMessage(body=body) for body in message_bodies]
|
|
192
196
|
return messages
|
|
193
197
|
|
|
194
198
|
def object_messages(
|
|
@@ -208,8 +212,8 @@ class PublishCatalogAndQualityMessages(L1OutputDataBase, InterserviceBusMixin):
|
|
|
208
212
|
-------
|
|
209
213
|
A list of object messages
|
|
210
214
|
"""
|
|
211
|
-
|
|
212
|
-
|
|
215
|
+
message_bodies = [
|
|
216
|
+
CatalogObjectMessageBody(
|
|
213
217
|
objectType=object_type,
|
|
214
218
|
objectName=self.format_object_key(p),
|
|
215
219
|
bucket=self.destination_bucket,
|
|
@@ -218,19 +222,21 @@ class PublishCatalogAndQualityMessages(L1OutputDataBase, InterserviceBusMixin):
|
|
|
218
222
|
)
|
|
219
223
|
for p in paths
|
|
220
224
|
]
|
|
225
|
+
messages = [CatalogObjectMessage(body=body) for body in message_bodies]
|
|
221
226
|
return messages
|
|
222
227
|
|
|
223
228
|
@property
|
|
224
229
|
def quality_report_message(self) -> CreateQualityReportMessage:
|
|
225
230
|
"""Create the Quality Report Message."""
|
|
226
231
|
file_name = Path(f"{self.constants.dataset_id}_quality_report.pdf")
|
|
227
|
-
|
|
232
|
+
body = CreateQualityReportMessageBody(
|
|
228
233
|
bucket=self.destination_bucket,
|
|
229
234
|
objectName=self.format_object_key(file_name),
|
|
230
235
|
conversationId=str(self.recipe_run_id),
|
|
231
236
|
datasetId=self.constants.dataset_id,
|
|
232
237
|
incrementDatasetCatalogReceiptCount=True,
|
|
233
238
|
)
|
|
239
|
+
return CreateQualityReportMessage(body=body)
|
|
234
240
|
|
|
235
241
|
def run(self) -> None:
|
|
236
242
|
"""Run method for this task."""
|
|
@@ -9,7 +9,7 @@ from globus_sdk import GlobusError
|
|
|
9
9
|
from globus_sdk import TransferClient
|
|
10
10
|
from globus_sdk import TransferData
|
|
11
11
|
|
|
12
|
-
from dkist_processing_common.
|
|
12
|
+
from dkist_processing_common.config import common_configurations
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
logger = logging.getLogger(__name__)
|
|
@@ -37,9 +37,9 @@ class GlobusMixin:
|
|
|
37
37
|
if getattr(self, "_globus_transfer_client", False):
|
|
38
38
|
return self._globus_transfer_client
|
|
39
39
|
confidential_client = ConfidentialAppAuthClient(
|
|
40
|
-
client_id=
|
|
41
|
-
client_secret=
|
|
42
|
-
transport_params=
|
|
40
|
+
client_id=common_configurations.globus_client_id,
|
|
41
|
+
client_secret=common_configurations.globus_client_secret,
|
|
42
|
+
transport_params=common_configurations.globus_transport_params,
|
|
43
43
|
)
|
|
44
44
|
authorizer = ClientCredentialsAuthorizer(
|
|
45
45
|
confidential_client, scopes="urn:globus:auth:scope:transfer.api.globus.org:all"
|
|
@@ -56,8 +56,8 @@ class GlobusMixin:
|
|
|
56
56
|
) -> None:
|
|
57
57
|
"""Transfer data from scratch to the object store."""
|
|
58
58
|
self.globus_transfer(
|
|
59
|
-
source_endpoint=
|
|
60
|
-
destination_endpoint=
|
|
59
|
+
source_endpoint=common_configurations.scratch_endpoint,
|
|
60
|
+
destination_endpoint=common_configurations.object_store_endpoint,
|
|
61
61
|
transfer_items=transfer_items,
|
|
62
62
|
label=label,
|
|
63
63
|
sync_level=sync_level,
|
|
@@ -73,8 +73,8 @@ class GlobusMixin:
|
|
|
73
73
|
) -> None:
|
|
74
74
|
"""Transfer data from the object store to scratch."""
|
|
75
75
|
self.globus_transfer(
|
|
76
|
-
source_endpoint=
|
|
77
|
-
destination_endpoint=
|
|
76
|
+
source_endpoint=common_configurations.object_store_endpoint,
|
|
77
|
+
destination_endpoint=common_configurations.scratch_endpoint,
|
|
78
78
|
transfer_items=transfer_items,
|
|
79
79
|
label=label,
|
|
80
80
|
sync_level=sync_level,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"""Mixin for a WorkflowDataTaskBase subclass which implements interservice bus access functionality."""
|
|
2
|
+
from talus import DurableProducer
|
|
3
|
+
from talus import PublishMessageBase
|
|
4
|
+
|
|
5
|
+
from dkist_processing_common.config import common_configurations
|
|
6
|
+
from dkist_processing_common.models.message_queue_binding import common_message_queue_bindings
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class InterserviceBusMixin:
|
|
10
|
+
"""Mixin for a WorkflowDataTaskBase subclass which implements interservice bus access functionality."""
|
|
11
|
+
|
|
12
|
+
@staticmethod
|
|
13
|
+
def interservice_bus_publish(messages: list[PublishMessageBase] | PublishMessageBase) -> None:
|
|
14
|
+
"""Publish messages on the interservice bus."""
|
|
15
|
+
with DurableProducer(
|
|
16
|
+
queue_bindings=common_message_queue_bindings,
|
|
17
|
+
publish_exchange=common_configurations.isb_publish_exchange,
|
|
18
|
+
connection_parameters=common_configurations.isb_producer_connection_parameters,
|
|
19
|
+
connection_retryer=common_configurations.isb_connection_retryer,
|
|
20
|
+
) as producer:
|
|
21
|
+
for message in messages:
|
|
22
|
+
producer.publish(message)
|
|
@@ -3,9 +3,9 @@ import json
|
|
|
3
3
|
import logging
|
|
4
4
|
from functools import cached_property
|
|
5
5
|
|
|
6
|
-
from dkist_processing_common._util.config import service_configuration
|
|
7
6
|
from dkist_processing_common._util.graphql import GraphQLClient
|
|
8
7
|
from dkist_processing_common.codecs.quality import QualityDataEncoder
|
|
8
|
+
from dkist_processing_common.config import common_configurations
|
|
9
9
|
from dkist_processing_common.models.graphql import DatasetCatalogReceiptAccountMutation
|
|
10
10
|
from dkist_processing_common.models.graphql import DatasetCatalogReceiptAccountResponse
|
|
11
11
|
from dkist_processing_common.models.graphql import InputDatasetPartResponse
|
|
@@ -35,7 +35,7 @@ class MetadataStoreMixin:
|
|
|
35
35
|
@property
|
|
36
36
|
def metadata_store_client(self) -> GraphQLClient:
|
|
37
37
|
"""Get the graphql client."""
|
|
38
|
-
return GraphQLClient(
|
|
38
|
+
return GraphQLClient(common_configurations.metadata_store_api_base)
|
|
39
39
|
|
|
40
40
|
def metadata_store_change_recipe_run_to_inprogress(self):
|
|
41
41
|
"""Set the recipe run status to "INPROGRESS"."""
|
|
@@ -3,7 +3,7 @@ from pathlib import Path
|
|
|
3
3
|
|
|
4
4
|
from object_clerk import ObjectClerk
|
|
5
5
|
|
|
6
|
-
from dkist_processing_common.
|
|
6
|
+
from dkist_processing_common.config import common_configurations
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class ObjectStoreMixin:
|
|
@@ -21,16 +21,16 @@ class ObjectStoreMixin:
|
|
|
21
21
|
|
|
22
22
|
"""
|
|
23
23
|
return ObjectClerk(
|
|
24
|
-
host=
|
|
25
|
-
port=
|
|
26
|
-
access_key=
|
|
27
|
-
secret_key=
|
|
28
|
-
retry_delay=
|
|
29
|
-
retry_backoff=
|
|
30
|
-
retry_jitter=
|
|
31
|
-
retry_max_delay=
|
|
32
|
-
retry_tries=
|
|
33
|
-
use_ssl=
|
|
24
|
+
host=common_configurations.object_store_api_mesh_service.host,
|
|
25
|
+
port=common_configurations.object_store_api_mesh_service.port,
|
|
26
|
+
access_key=common_configurations.object_store_access_key,
|
|
27
|
+
secret_key=common_configurations.object_store_secret_key,
|
|
28
|
+
retry_delay=common_configurations.retry_config.retry_delay,
|
|
29
|
+
retry_backoff=common_configurations.retry_config.retry_backoff,
|
|
30
|
+
retry_jitter=common_configurations.retry_config.retry_jitter,
|
|
31
|
+
retry_max_delay=common_configurations.retry_config.retry_max_delay,
|
|
32
|
+
retry_tries=common_configurations.retry_config.retry_tries,
|
|
33
|
+
use_ssl=common_configurations.object_store_use_ssl,
|
|
34
34
|
)
|
|
35
35
|
|
|
36
36
|
def object_store_upload_movie(
|
|
@@ -40,7 +40,7 @@ class _SimpleQualityMixin:
|
|
|
40
40
|
metric = ReportMetric(
|
|
41
41
|
name=name, description=description, statement=statement, warnings=warnings
|
|
42
42
|
)
|
|
43
|
-
return metric.
|
|
43
|
+
return metric.model_dump()
|
|
44
44
|
|
|
45
45
|
def quality_store_ao_status(self, values: list[bool]):
|
|
46
46
|
"""
|
|
@@ -97,7 +97,7 @@ class _SimpleQualityMixin:
|
|
|
97
97
|
"fall within a valid data range. If no parameters are listed here, all "
|
|
98
98
|
"pipeline parameters were measured to be in range",
|
|
99
99
|
warnings=self._format_warnings(warnings),
|
|
100
|
-
).
|
|
100
|
+
).model_dump()
|
|
101
101
|
|
|
102
102
|
|
|
103
103
|
class _SimplePlotQualityMixin:
|
|
@@ -134,7 +134,7 @@ class _SimplePlotQualityMixin:
|
|
|
134
134
|
plot_data=plot_data,
|
|
135
135
|
warnings=warnings,
|
|
136
136
|
)
|
|
137
|
-
return metric.
|
|
137
|
+
return metric.model_dump()
|
|
138
138
|
|
|
139
139
|
def _record_2d_plot_values(
|
|
140
140
|
self,
|
|
@@ -419,7 +419,7 @@ class _TableQualityMixin:
|
|
|
419
419
|
table_data=SimpleTable(rows=rows),
|
|
420
420
|
warnings=warnings,
|
|
421
421
|
)
|
|
422
|
-
return metric.
|
|
422
|
+
return metric.model_dump()
|
|
423
423
|
|
|
424
424
|
def quality_store_health_status(self, values: list[str]):
|
|
425
425
|
"""
|
|
@@ -722,7 +722,7 @@ class _PolcalQualityMixin:
|
|
|
722
722
|
"three mirror groups; M12, M34, and M56.",
|
|
723
723
|
table_data=SimpleTable(rows=table_data),
|
|
724
724
|
)
|
|
725
|
-
return metric.
|
|
725
|
+
return metric.model_dump()
|
|
726
726
|
|
|
727
727
|
def _store_polcal_global_parameter_values(
|
|
728
728
|
self,
|
|
@@ -859,7 +859,7 @@ class _PolcalQualityMixin:
|
|
|
859
859
|
table_data=SimpleTable(rows=table_data),
|
|
860
860
|
warnings=self._format_warnings(data["warnings"]),
|
|
861
861
|
)
|
|
862
|
-
return metric.
|
|
862
|
+
return metric.model_dump()
|
|
863
863
|
|
|
864
864
|
def _store_polcal_local_parameter_values(
|
|
865
865
|
self,
|
|
@@ -981,7 +981,7 @@ class _PolcalQualityMixin:
|
|
|
981
981
|
modmat_data=modmat_hist,
|
|
982
982
|
histogram_data=param_histograms,
|
|
983
983
|
)
|
|
984
|
-
return metric.
|
|
984
|
+
return metric.model_dump()
|
|
985
985
|
|
|
986
986
|
def _store_polcal_fit_resdiuals(
|
|
987
987
|
self,
|
|
@@ -1091,7 +1091,7 @@ class _PolcalQualityMixin:
|
|
|
1091
1091
|
histogram_data=chisq_hist,
|
|
1092
1092
|
raincloud_data=residual_series,
|
|
1093
1093
|
)
|
|
1094
|
-
return metric.
|
|
1094
|
+
return metric.model_dump()
|
|
1095
1095
|
|
|
1096
1096
|
def _store_polcal_modulation_efficiency(
|
|
1097
1097
|
self,
|
|
@@ -1153,4 +1153,4 @@ class _PolcalQualityMixin:
|
|
|
1153
1153
|
efficiency_data=EfficiencyHistograms(efficiency_list=data["efficiency_list"]),
|
|
1154
1154
|
warnings=self._format_warnings(data["warnings"]),
|
|
1155
1155
|
)
|
|
1156
|
-
return metric.
|
|
1156
|
+
return metric.model_dump()
|
|
@@ -35,9 +35,9 @@ def test_frame_messages(publish_catalog_and_quality_messages_task):
|
|
|
35
35
|
filepaths = [Path(f"a/b/c/{filename}") for filename in filenames]
|
|
36
36
|
frame_messages = task.frame_messages(paths=filepaths)
|
|
37
37
|
for message in frame_messages:
|
|
38
|
-
assert message.bucket == "data"
|
|
39
|
-
assert proposal_id in message.objectName
|
|
40
|
-
assert message.conversationId == str(task.recipe_run_id)
|
|
38
|
+
assert message.body.bucket == "data"
|
|
39
|
+
assert proposal_id in message.body.objectName
|
|
40
|
+
assert message.body.conversationId == str(task.recipe_run_id)
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
def test_object_messages(publish_catalog_and_quality_messages_task):
|
|
@@ -53,11 +53,11 @@ def test_object_messages(publish_catalog_and_quality_messages_task):
|
|
|
53
53
|
filepaths = [Path(f"a/b/c/{filename}") for filename in filenames]
|
|
54
54
|
object_messages = task.object_messages(paths=filepaths, object_type=object_type)
|
|
55
55
|
for message in object_messages:
|
|
56
|
-
assert message.bucket == "data"
|
|
57
|
-
assert proposal_id in message.objectName
|
|
58
|
-
assert message.conversationId == str(task.recipe_run_id)
|
|
59
|
-
assert message.objectType == object_type
|
|
60
|
-
assert message.groupId == task.constants.dataset_id
|
|
56
|
+
assert message.body.bucket == "data"
|
|
57
|
+
assert proposal_id in message.body.objectName
|
|
58
|
+
assert message.body.conversationId == str(task.recipe_run_id)
|
|
59
|
+
assert message.body.objectType == object_type
|
|
60
|
+
assert message.body.groupId == task.constants.dataset_id
|
|
61
61
|
|
|
62
62
|
|
|
63
63
|
def test_quality_report_message(publish_catalog_and_quality_messages_task):
|
|
@@ -72,10 +72,10 @@ def test_quality_report_message(publish_catalog_and_quality_messages_task):
|
|
|
72
72
|
message = task.quality_report_message
|
|
73
73
|
# Then
|
|
74
74
|
assert isinstance(message, CreateQualityReportMessage)
|
|
75
|
-
assert message.bucket == task.destination_bucket
|
|
75
|
+
assert message.body.bucket == task.destination_bucket
|
|
76
76
|
# objectName exists and can be evaluated as a valid path
|
|
77
|
-
assert message.objectName
|
|
78
|
-
_ = Path(message.objectName)
|
|
79
|
-
assert message.datasetId == task.constants.dataset_id
|
|
80
|
-
assert message.conversationId == str(task.recipe_run_id)
|
|
81
|
-
assert message.incrementDatasetCatalogReceiptCount is True
|
|
77
|
+
assert message.body.objectName
|
|
78
|
+
_ = Path(message.body.objectName)
|
|
79
|
+
assert message.body.datasetId == task.constants.dataset_id
|
|
80
|
+
assert message.body.conversationId == str(task.recipe_run_id)
|
|
81
|
+
assert message.body.incrementDatasetCatalogReceiptCount is True
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dkist-processing-common
|
|
3
|
-
Version:
|
|
3
|
+
Version: 7.0.0rc2
|
|
4
4
|
Summary: Common task classes used by the DKIST Science Data Processing pipelines to process DKIST data.
|
|
5
5
|
Home-page: https://bitbucket.org/dkistdc/dkist-processing-common/src/main/
|
|
6
6
|
Author: NSO / AURA
|