dkist-processing-core 2.1.2__tar.gz → 2.1.3rc1__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-core-2.1.2 → dkist-processing-core-2.1.3rc1}/PKG-INFO +1 -1
- dkist-processing-core-2.1.3rc1/changelog/23.misc.rst +1 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/dkist_processing_core/_node.py +11 -1
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/dkist_processing_core/tests/conftest.py +12 -1
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/dkist_processing_core/tests/test_node.py +4 -2
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/dkist_processing_core/workflow.py +2 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/dkist_processing_core.egg-info/PKG-INFO +1 -1
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/dkist_processing_core.egg-info/SOURCES.txt +1 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/.gitignore +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/.pre-commit-config.yaml +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/.readthedocs.yml +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/CHANGELOG.rst +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/README.rst +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/bitbucket-pipelines.yml +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/changelog/.gitempty +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/check_changelog_updated.sh +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/dkist_processing_core/__init__.py +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/dkist_processing_core/_failure_callback.py +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/dkist_processing_core/build_utils.py +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/dkist_processing_core/resource_queue.py +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/dkist_processing_core/task.py +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/dkist_processing_core/tests/__init__.py +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/dkist_processing_core/tests/invalid_workflow_package/__init__.py +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/dkist_processing_core/tests/invalid_workflow_package/workflow.py +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/dkist_processing_core/tests/task_example.py +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/dkist_processing_core/tests/test_build_utils.py +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/dkist_processing_core/tests/test_export.py +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/dkist_processing_core/tests/test_failure_callback.py +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/dkist_processing_core/tests/test_task.py +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/dkist_processing_core/tests/test_workflow.py +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/dkist_processing_core/tests/valid_workflow_package/__init__.py +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/dkist_processing_core/tests/valid_workflow_package/workflow.py +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/dkist_processing_core/tests/zero_node_workflow_package/__init__.py +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/dkist_processing_core/tests/zero_node_workflow_package/workflow.py +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/dkist_processing_core.egg-info/dependency_links.txt +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/dkist_processing_core.egg-info/requires.txt +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/dkist_processing_core.egg-info/top_level.txt +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/docs/Makefile +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/docs/auto-proc-concept-model.png +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/docs/auto_proc_brick.png +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/docs/automated-processing-deployed.png +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/docs/changelog.rst +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/docs/conf.py +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/docs/index.rst +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/docs/make.bat +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/docs/requirements.txt +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/licenses/LICENSE.rst +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/pyproject.toml +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/setup.cfg +0 -0
- {dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dkist-processing-core
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.3rc1
|
|
4
4
|
Summary: Abstraction layer that is used by the DKIST Science Data Processing pipelines to process DKIST data using Apache Airflow.
|
|
5
5
|
Home-page: https://bitbucket.org/dkistdc/dkist-processing-core/src/main/
|
|
6
6
|
Author: NSO / AURA
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Support specifying pip extras for individual nodes in a workflow.
|
{dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/dkist_processing_core/_node.py
RENAMED
|
@@ -23,6 +23,7 @@ class Node:
|
|
|
23
23
|
task: task_type_hint,
|
|
24
24
|
resource_queue: ResourceQueue,
|
|
25
25
|
upstreams: upstreams_type_hint = None,
|
|
26
|
+
pip_extras: list[str] | None = None,
|
|
26
27
|
):
|
|
27
28
|
"""Node setup."""
|
|
28
29
|
# Task type checking
|
|
@@ -43,6 +44,7 @@ class Node:
|
|
|
43
44
|
self.workflow_package = workflow_package
|
|
44
45
|
self.upstreams = upstreams
|
|
45
46
|
self.resource_queue = resource_queue
|
|
47
|
+
self.pip_extras = pip_extras
|
|
46
48
|
|
|
47
49
|
@property
|
|
48
50
|
def operator(self) -> BashOperator:
|
|
@@ -117,12 +119,20 @@ rm -rf .task_venv
|
|
|
117
119
|
echo Exit with code from main command: $exit_code
|
|
118
120
|
exit $exit_code"""
|
|
119
121
|
|
|
122
|
+
@property
|
|
123
|
+
def _formatted_pip_extras(self) -> str:
|
|
124
|
+
if self.pip_extras:
|
|
125
|
+
extra_requirements = ",".join(self.pip_extras)
|
|
126
|
+
return f"'[{extra_requirements}]'"
|
|
127
|
+
return ""
|
|
128
|
+
|
|
120
129
|
@property
|
|
121
130
|
def _install_command(self) -> str:
|
|
122
131
|
repo_name = self.workflow_package.split(".")[0].replace("_", "-")
|
|
123
132
|
version = self.workflow_version
|
|
133
|
+
extras = self._formatted_pip_extras
|
|
124
134
|
return f"""python -m pip install --upgrade pip
|
|
125
|
-
python -m pip install {repo_name}=={version}"""
|
|
135
|
+
python -m pip install {repo_name}{extras}=={version}"""
|
|
126
136
|
|
|
127
137
|
@property
|
|
128
138
|
def _run_command(self) -> str:
|
|
@@ -113,8 +113,18 @@ def queue_name(request):
|
|
|
113
113
|
return ResourceQueue.HIGH_MEMORY
|
|
114
114
|
|
|
115
115
|
|
|
116
|
+
@pytest.fixture(params=["default", "non_default"])
|
|
117
|
+
def pip_extras(request):
|
|
118
|
+
"""Extra pip requirements for Node initialization"""
|
|
119
|
+
if request.param == "default":
|
|
120
|
+
return None
|
|
121
|
+
return ["asdf"]
|
|
122
|
+
|
|
123
|
+
|
|
116
124
|
@pytest.fixture(params=["0_upstream", "1_upstream", "2_upstream"])
|
|
117
|
-
def node(
|
|
125
|
+
def node(
|
|
126
|
+
workflow_tasks, request, queue_name, pip_extras
|
|
127
|
+
) -> tuple[Node, task_type_hint, Any, str, str]:
|
|
118
128
|
"""Node instance and its component parts."""
|
|
119
129
|
version = "V6-123"
|
|
120
130
|
name = f"{request.param}_{version}"
|
|
@@ -134,6 +144,7 @@ def node(workflow_tasks, request, queue_name) -> tuple[Node, task_type_hint, Any
|
|
|
134
144
|
task=TaskA,
|
|
135
145
|
upstreams=upstream[0],
|
|
136
146
|
resource_queue=queue_name,
|
|
147
|
+
pip_extras=pip_extras,
|
|
137
148
|
),
|
|
138
149
|
TaskA,
|
|
139
150
|
upstream[1],
|
|
@@ -13,7 +13,7 @@ from dkist_processing_core.tests.task_example import Task
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
@pytest.fixture()
|
|
16
|
-
def single_node() -> Node:
|
|
16
|
+
def single_node(pip_extras) -> Node:
|
|
17
17
|
"""A single Node instance."""
|
|
18
18
|
return Node(
|
|
19
19
|
workflow_name="test_node",
|
|
@@ -21,10 +21,11 @@ def single_node() -> Node:
|
|
|
21
21
|
workflow_package=__package__,
|
|
22
22
|
task=Task,
|
|
23
23
|
resource_queue=ResourceQueue.DEFAULT,
|
|
24
|
+
pip_extras=pip_extras,
|
|
24
25
|
)
|
|
25
26
|
|
|
26
27
|
|
|
27
|
-
def test_nodes(node, fake_producer_factory, queue_name):
|
|
28
|
+
def test_nodes(node, fake_producer_factory, queue_name, pip_extras):
|
|
28
29
|
"""
|
|
29
30
|
Given: Workflow tasks to initialize a Node.
|
|
30
31
|
When: Initializing the Node with valid task and upstreams.
|
|
@@ -44,6 +45,7 @@ def test_nodes(node, fake_producer_factory, queue_name):
|
|
|
44
45
|
assert node.task == task
|
|
45
46
|
assert node.workflow_version == version
|
|
46
47
|
assert node.resource_queue == queue_name
|
|
48
|
+
assert node.pip_extras == pip_extras
|
|
47
49
|
|
|
48
50
|
|
|
49
51
|
def test_node_bash_template_return_0(node):
|
{dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/dkist_processing_core/workflow.py
RENAMED
|
@@ -164,6 +164,7 @@ class Workflow:
|
|
|
164
164
|
task: task_type_hint,
|
|
165
165
|
upstreams: upstreams_type_hint = None,
|
|
166
166
|
resource_queue: ResourceQueue | None = None,
|
|
167
|
+
pip_extras: list[str] | None = None,
|
|
167
168
|
) -> None:
|
|
168
169
|
"""Add a node and edges from that node to the workflow."""
|
|
169
170
|
if resource_queue is None:
|
|
@@ -176,6 +177,7 @@ class Workflow:
|
|
|
176
177
|
task=task,
|
|
177
178
|
resource_queue=resource_queue,
|
|
178
179
|
upstreams=upstreams,
|
|
180
|
+
pip_extras=pip_extras,
|
|
179
181
|
)
|
|
180
182
|
self.nodes.append(node)
|
|
181
183
|
# confirm that the node can be properly added to a dag
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dkist-processing-core
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.3rc1
|
|
4
4
|
Summary: Abstraction layer that is used by the DKIST Science Data Processing pipelines to process DKIST data using Apache Airflow.
|
|
5
5
|
Home-page: https://bitbucket.org/dkistdc/dkist-processing-core/src/main/
|
|
6
6
|
Author: NSO / AURA
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/dkist_processing_core/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/dkist_processing_core/build_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
{dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/dkist_processing_core/task.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dkist-processing-core-2.1.2 → dkist-processing-core-2.1.3rc1}/docs/auto-proc-concept-model.png
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|