dagstermill 0.23.9__py3-none-any.whl → 0.23.10__py3-none-any.whl

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.

Potentially problematic release.


This version of dagstermill might be problematic. Click here for more details.

@@ -21,6 +21,7 @@ from dagster._config.pythonic_config.type_check_utils import safe_is_subclass
21
21
  from dagster._core.definitions.events import CoercibleToAssetKey, CoercibleToAssetKeyPrefix
22
22
  from dagster._core.definitions.utils import normalize_tags
23
23
  from dagster._core.execution.context.compute import OpExecutionContext
24
+ from dagster._core.storage.tags import COMPUTE_KIND_TAG
24
25
 
25
26
  from dagstermill.factory import _clean_path_for_windows, execute_notebook
26
27
 
@@ -85,6 +86,7 @@ def define_dagstermill_asset(
85
86
  retry_policy: Optional[RetryPolicy] = None,
86
87
  save_notebook_on_failure: bool = False,
87
88
  non_argument_deps: Optional[Union[Set[AssetKey], Set[str]]] = None,
89
+ asset_tags: Optional[Mapping[str, Any]] = None,
88
90
  ) -> AssetsDefinition:
89
91
  """Creates a Dagster asset for a Jupyter notebook.
90
92
 
@@ -123,6 +125,7 @@ def define_dagstermill_asset(
123
125
  save_notebook_on_failure (bool): If True and the notebook fails during execution, the failed notebook will be
124
126
  written to the Dagster storage directory. The location of the file will be printed in the Dagster logs.
125
127
  Defaults to False.
128
+ asset_tags (Optional[Dict[str, Any]]): A dictionary of tags to apply to the asset.
126
129
  non_argument_deps (Optional[Union[Set[AssetKey], Set[str]]]): Deprecated, use deps instead. Set of asset keys that are
127
130
  upstream dependencies, but do not pass an input to the asset.
128
131
 
@@ -180,12 +183,15 @@ def define_dagstermill_asset(
180
183
  " is reserved for use by Dagster",
181
184
  )
182
185
  check.invariant(
183
- "kind" not in op_tags,
184
- "user-defined op tags contains the `kind` key, but the `kind` key is reserved for"
186
+ COMPUTE_KIND_TAG not in op_tags,
187
+ f"user-defined op tags contains the `{COMPUTE_KIND_TAG}` key, but the `{COMPUTE_KIND_TAG}` key is reserved for"
185
188
  " use by Dagster",
186
189
  )
187
190
 
188
- default_tags = {"notebook_path": _clean_path_for_windows(notebook_path), "kind": "ipynb"}
191
+ default_tags = {
192
+ "notebook_path": _clean_path_for_windows(notebook_path),
193
+ COMPUTE_KIND_TAG: "ipynb",
194
+ }
189
195
 
190
196
  if safe_is_subclass(config_schema, Config):
191
197
  config_schema = infer_schema_from_config_class(cast(Type[Config], config_schema))
@@ -207,6 +213,7 @@ def define_dagstermill_asset(
207
213
  io_manager_key=io_mgr_key,
208
214
  retry_policy=retry_policy,
209
215
  non_argument_deps=non_argument_deps,
216
+ tags=asset_tags,
210
217
  )(
211
218
  _make_dagstermill_asset_compute_fn(
212
219
  name=name,
@@ -570,6 +570,7 @@ custom_io_mgr_key_asset = dagstermill.define_dagstermill_asset(
570
570
  name="custom_io_mgr_key",
571
571
  notebook_path=nb_test_path("hello_world"),
572
572
  io_manager_key="my_custom_io_manager",
573
+ asset_tags={"foo": "bar"},
573
574
  )
574
575
 
575
576
  yield_event_asset = dagstermill.define_dagstermill_asset(
dagstermill/factory.py CHANGED
@@ -26,6 +26,7 @@ from dagster._core.execution.context.compute import OpExecutionContext
26
26
  from dagster._core.execution.context.input import build_input_context
27
27
  from dagster._core.execution.context.system import StepExecutionContext
28
28
  from dagster._core.execution.plan.outputs import StepOutputHandle
29
+ from dagster._core.storage.tags import COMPUTE_KIND_TAG
29
30
  from dagster._serdes import pack_value
30
31
  from dagster._seven import get_system_temp_directory
31
32
  from dagster._utils import mkdir_p, safe_tempfile_path
@@ -420,11 +421,14 @@ def define_dagstermill_op(
420
421
  " is reserved for use by Dagster",
421
422
  )
422
423
  check.invariant(
423
- "kind" not in tags,
424
+ COMPUTE_KIND_TAG not in tags,
424
425
  "user-defined op tags contains the `kind` key, but the `kind` key is reserved for"
425
426
  " use by Dagster",
426
427
  )
427
- default_tags = {"notebook_path": _clean_path_for_windows(notebook_path), "kind": "ipynb"}
428
+ default_tags = {
429
+ "notebook_path": _clean_path_for_windows(notebook_path),
430
+ COMPUTE_KIND_TAG: "ipynb",
431
+ }
428
432
 
429
433
  if safe_is_subclass(config_schema, Config):
430
434
  config_schema = infer_schema_from_config_class(cast(Type[Config], config_schema))
dagstermill/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.23.9"
1
+ __version__ = "0.23.10"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dagstermill
3
- Version: 0.23.9
3
+ Version: 0.23.10
4
4
  Summary: run notebooks using the Dagster tools
5
5
  Author: Dagster Labs
6
6
  Author-email: hello@dagsterlabs.com
@@ -13,7 +13,7 @@ Classifier: License :: OSI Approved :: Apache Software License
13
13
  Classifier: Operating System :: OS Independent
14
14
  Requires-Python: >=3.8,<3.13
15
15
  License-File: LICENSE
16
- Requires-Dist: dagster ==1.7.9
16
+ Requires-Dist: dagster ==1.7.10
17
17
  Requires-Dist: ipykernel !=5.4.0,!=5.4.1,>=4.9.0
18
18
  Requires-Dist: ipython-genutils >=0.2.0
19
19
  Requires-Dist: packaging >=20.9
@@ -1,22 +1,22 @@
1
1
  dagstermill/__init__.py,sha256=WZRYSjL1yAM1w5cqmC1t2T7hvuW-RGGY5tV9vZGHZwU,1133
2
2
  dagstermill/__main__.py,sha256=bYt9eEaoRQWdejEHFD8REx9jxVEdZptECFsV7F49Ink,30
3
- dagstermill/asset_factory.py,sha256=3moIwVr3dzFuDRVAdRZlQlO00nfGFAiA8cvmOgJi1zw,9463
3
+ dagstermill/asset_factory.py,sha256=_or3ENKhrxV2EDQjpbKbv6Sf28aehbthUKEu9VxO53U,9759
4
4
  dagstermill/cli.py,sha256=lffeaQgenSR7s8MhNUBNA_BeVehlMUrdg7gnQl1WTdY,4494
5
5
  dagstermill/compat.py,sha256=GCfUaGC3eIEhlZP_VFtua8hFKNtwXocOAfYxuKZ5X3I,526
6
6
  dagstermill/context.py,sha256=3_SkRBM9wDB6T64Lc4yJZGp8mpA_PMXkHlF8U1I19A4,6104
7
7
  dagstermill/engine.py,sha256=4CZW-eni4TnG8C8VhPkZZgj6djItdOUKhHPzvaVhaYo,5843
8
8
  dagstermill/errors.py,sha256=WOmpAGp-J1XhyGK_LT3ZZKsBwF5dvrWbqSaSldtoh6Y,141
9
- dagstermill/factory.py,sha256=R9IiuAFi35nHneuWsegcXEH1iTp4qUuO0zmtizmBZb0,18638
9
+ dagstermill/factory.py,sha256=mfyw85jFGHj60_tx08jRsiauJnVifqgexk1n-Op6760,18737
10
10
  dagstermill/io_managers.py,sha256=D9UA4KufzrOeCan3TJyPogD0uIJBjK80ExikdMHqweI,4403
11
11
  dagstermill/manager.py,sha256=HPk1PtVOc7MDFb3F3t-XECvhPYRPRAXNBSapXYAIUBA,15788
12
12
  dagstermill/serialize.py,sha256=eXW3c26CiILT_uebyFcAKBnsiNxnjyGT_ch3PfGyjek,188
13
13
  dagstermill/translator.py,sha256=h1VPAOWtdjLKzFjRmyN9hO_R6qJuAETNkJydfdgwWGM,2170
14
- dagstermill/version.py,sha256=ooBNYu742lMnRkf6FXz0qW9XX29Ku8ZtCGCEiI8IjMI,23
14
+ dagstermill/version.py,sha256=MubiA1vMagp3LPGUXEemPTyr2p4sR0ljgXGsAb2yT-Q,24
15
15
  dagstermill/examples/__init__.py,sha256=kzan-9zFjxaJ8o9bqUso44gcGiOmJrlq4JYO-yIBQao,55
16
- dagstermill/examples/repository.py,sha256=hKQ1_GzHFiSf4oZmr1HYQmyRSMG0HDq25m0Y0oz0eXQ,15827
17
- dagstermill-0.23.9.dist-info/LICENSE,sha256=TMatHW4_G9ldRdodEAp-l2Xa2WvsdeOh60E3v1R2jis,11349
18
- dagstermill-0.23.9.dist-info/METADATA,sha256=Q0RsNrFGsD0oHodzPcE5d4UH58x7JXaqpfU3F4UP1wo,985
19
- dagstermill-0.23.9.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
20
- dagstermill-0.23.9.dist-info/entry_points.txt,sha256=885a7vvhABYWEj7W28elkzSmIcKO3REkdd5h4Z4DEJs,53
21
- dagstermill-0.23.9.dist-info/top_level.txt,sha256=YDelJKdA5YIIrjsObdd8U4E9YhuXJLRe9NKfUzud9Uc,12
22
- dagstermill-0.23.9.dist-info/RECORD,,
16
+ dagstermill/examples/repository.py,sha256=AlBcvZHCqZ4wAGp8YjO67A1STx0FPhBG97vGEjZv3Bw,15858
17
+ dagstermill-0.23.10.dist-info/LICENSE,sha256=TMatHW4_G9ldRdodEAp-l2Xa2WvsdeOh60E3v1R2jis,11349
18
+ dagstermill-0.23.10.dist-info/METADATA,sha256=9QhGK5g0PUeto9rGFPDDb0VZB-zQ5lLV2-po3-6nCX0,987
19
+ dagstermill-0.23.10.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
20
+ dagstermill-0.23.10.dist-info/entry_points.txt,sha256=885a7vvhABYWEj7W28elkzSmIcKO3REkdd5h4Z4DEJs,53
21
+ dagstermill-0.23.10.dist-info/top_level.txt,sha256=YDelJKdA5YIIrjsObdd8U4E9YhuXJLRe9NKfUzud9Uc,12
22
+ dagstermill-0.23.10.dist-info/RECORD,,