dagstermill 0.25.8__py3-none-any.whl → 0.25.9__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.

@@ -1,6 +1,7 @@
1
1
  import pickle
2
2
  import tempfile
3
- from typing import Any, Callable, Iterable, Mapping, Optional, Set, Type, Union, cast
3
+ from collections.abc import Iterable, Mapping
4
+ from typing import Any, Callable, Optional, Union, cast
4
5
 
5
6
  import dagster._check as check
6
7
  from dagster import (
@@ -76,7 +77,7 @@ def define_dagstermill_asset(
76
77
  deps: Optional[Iterable[Union[CoercibleToAssetKey, AssetsDefinition, SourceAsset]]] = None,
77
78
  metadata: Optional[Mapping[str, Any]] = None,
78
79
  config_schema: Optional[Union[Any, Mapping[str, Any]]] = None,
79
- required_resource_keys: Optional[Set[str]] = None,
80
+ required_resource_keys: Optional[set[str]] = None,
80
81
  resource_defs: Optional[Mapping[str, ResourceDefinition]] = None,
81
82
  description: Optional[str] = None,
82
83
  partitions_def: Optional[PartitionsDefinition] = None,
@@ -85,7 +86,7 @@ def define_dagstermill_asset(
85
86
  io_manager_key: Optional[str] = None,
86
87
  retry_policy: Optional[RetryPolicy] = None,
87
88
  save_notebook_on_failure: bool = False,
88
- non_argument_deps: Optional[Union[Set[AssetKey], Set[str]]] = None,
89
+ non_argument_deps: Optional[Union[set[AssetKey], set[str]]] = None,
89
90
  asset_tags: Optional[Mapping[str, Any]] = None,
90
91
  ) -> AssetsDefinition:
91
92
  """Creates a Dagster asset for a Jupyter notebook.
@@ -194,7 +195,7 @@ def define_dagstermill_asset(
194
195
  }
195
196
 
196
197
  if safe_is_subclass(config_schema, Config):
197
- config_schema = infer_schema_from_config_class(cast(Type[Config], config_schema))
198
+ config_schema = infer_schema_from_config_class(cast(type[Config], config_schema))
198
199
 
199
200
  return asset(
200
201
  name=name,
dagstermill/cli.py CHANGED
@@ -1,7 +1,8 @@
1
1
  import copy
2
2
  import os
3
3
  import subprocess
4
- from typing import Mapping, Optional
4
+ from collections.abc import Mapping
5
+ from typing import Optional
5
6
 
6
7
  import click
7
8
  import dagster._check as check
dagstermill/context.py CHANGED
@@ -1,4 +1,5 @@
1
- from typing import AbstractSet, Any, Mapping, Optional, cast
1
+ from collections.abc import Mapping
2
+ from typing import AbstractSet, Any, Optional, cast # noqa: UP035
2
3
 
3
4
  from dagster import (
4
5
  DagsterRun,
dagstermill/engine.py CHANGED
@@ -86,9 +86,7 @@ else:
86
86
  # the kernel down. Note that atexit doesn't seem to work at all in ipython, and hooking into
87
87
  # the ipython post_execute event doesn't work in papermill.
88
88
  def papermill_process(self, nb_man, resources):
89
- _, resources = super(DagstermillExecutePreprocessor, self).papermill_process(
90
- nb_man, resources
91
- )
89
+ _, resources = super().papermill_process(nb_man, resources)
92
90
 
93
91
  new_cell = nbformat.v4.new_code_cell(
94
92
  source="import dagstermill as __dm_dagstermill\n__dm_dagstermill._teardown()\n"
dagstermill/factory.py CHANGED
@@ -4,7 +4,8 @@ import pickle
4
4
  import sys
5
5
  import tempfile
6
6
  import uuid
7
- from typing import Any, Callable, Iterable, Mapping, Optional, Sequence, Set, Type, Union, cast
7
+ from collections.abc import Iterable, Mapping, Sequence
8
+ from typing import Any, Callable, Optional, Union, cast
8
9
 
9
10
  import nbformat
10
11
  import papermill
@@ -347,7 +348,7 @@ def define_dagstermill_op(
347
348
  ins: Optional[Mapping[str, In]] = None,
348
349
  outs: Optional[Mapping[str, Out]] = None,
349
350
  config_schema: Optional[Union[Any, Mapping[str, Any]]] = None,
350
- required_resource_keys: Optional[Set[str]] = None,
351
+ required_resource_keys: Optional[set[str]] = None,
351
352
  output_notebook_name: Optional[str] = None,
352
353
  asset_key_prefix: Optional[Union[Sequence[str], str]] = None,
353
354
  description: Optional[str] = None,
@@ -431,7 +432,7 @@ def define_dagstermill_op(
431
432
  }
432
433
 
433
434
  if safe_is_subclass(config_schema, Config):
434
- config_schema = infer_schema_from_config_class(cast(Type[Config], config_schema))
435
+ config_schema = infer_schema_from_config_class(cast(type[Config], config_schema))
435
436
 
436
437
  return OpDefinition(
437
438
  name=name,
@@ -1,6 +1,7 @@
1
1
  import os
2
+ from collections.abc import Sequence
2
3
  from pathlib import Path
3
- from typing import Any, List, Optional, Sequence
4
+ from typing import Any, Optional
4
5
 
5
6
  import dagster._check as check
6
7
  from dagster import (
@@ -33,7 +34,7 @@ class OutputNotebookIOManager(IOManager):
33
34
 
34
35
  class LocalOutputNotebookIOManager(OutputNotebookIOManager):
35
36
  def __init__(self, base_dir: str, asset_key_prefix: Optional[Sequence[str]] = None):
36
- super(LocalOutputNotebookIOManager, self).__init__(asset_key_prefix=asset_key_prefix)
37
+ super().__init__(asset_key_prefix=asset_key_prefix)
37
38
  self.base_dir = base_dir
38
39
  self.write_mode = "wb"
39
40
  self.read_mode = "rb"
@@ -92,7 +93,7 @@ class ConfigurableLocalOutputNotebookIOManager(ConfigurableIOManagerFactory):
92
93
  " directory if not provided."
93
94
  ),
94
95
  )
95
- asset_key_prefix: List[str] = Field(
96
+ asset_key_prefix: list[str] = Field(
96
97
  default=[],
97
98
  description=(
98
99
  "Asset key prefix to apply to assets materialized for output notebooks. Defaults to no"
dagstermill/manager.py CHANGED
@@ -1,7 +1,8 @@
1
1
  import os
2
2
  import pickle
3
3
  import uuid
4
- from typing import TYPE_CHECKING, AbstractSet, Any, Mapping, Optional, cast
4
+ from collections.abc import Mapping
5
+ from typing import TYPE_CHECKING, AbstractSet, Any, Optional, cast # noqa: UP035
5
6
 
6
7
  from dagster import (
7
8
  AssetMaterialization,
@@ -60,12 +61,7 @@ class DagstermillResourceEventGenerationManager(EventGenerationManager):
60
61
  return iter(())
61
62
 
62
63
  def teardown(self):
63
- return [
64
- teardown_event
65
- for teardown_event in super(
66
- DagstermillResourceEventGenerationManager, self
67
- ).generate_teardown_events()
68
- ]
64
+ return [teardown_event for teardown_event in super().generate_teardown_events()]
69
65
 
70
66
 
71
67
  class Manager:
dagstermill/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.25.8"
1
+ __version__ = "0.25.9"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dagstermill
3
- Version: 0.25.8
3
+ Version: 0.25.9
4
4
  Summary: run notebooks using the Dagster tools
5
5
  Author: Dagster Labs
6
6
  Author-email: hello@dagsterlabs.com
@@ -12,7 +12,7 @@ Classifier: License :: OSI Approved :: Apache Software License
12
12
  Classifier: Operating System :: OS Independent
13
13
  Requires-Python: >=3.9,<3.13
14
14
  License-File: LICENSE
15
- Requires-Dist: dagster ==1.9.8
15
+ Requires-Dist: dagster ==1.9.9
16
16
  Requires-Dist: ipykernel !=5.4.0,!=5.4.1,>=4.9.0
17
17
  Requires-Dist: ipython-genutils >=0.2.0
18
18
  Requires-Dist: packaging >=20.9
@@ -0,0 +1,22 @@
1
+ dagstermill/__init__.py,sha256=3YqU9M3bCTeiof-BEHLmZ-A06HEYxdALfSu1pB9QAeg,1262
2
+ dagstermill/__main__.py,sha256=GqkyStw1mh9zw2gMbQBQpIqW0hpr3I8unVWrw_VqdW8,41
3
+ dagstermill/asset_factory.py,sha256=v-vi5hx4J9u75ihI9HtIAD4D3t08BljuCeqL2LdfSJs,9758
4
+ dagstermill/cli.py,sha256=J8u70wrJ_WvELbEo6Dchiwso6Y3E7r5FuHCcjQb4E4I,4521
5
+ dagstermill/compat.py,sha256=GCfUaGC3eIEhlZP_VFtua8hFKNtwXocOAfYxuKZ5X3I,526
6
+ dagstermill/context.py,sha256=FAR2EjRZaatATl25RIQM7ERHz0SVqQenFTjVa2xsNSk,6159
7
+ dagstermill/engine.py,sha256=exxp3VUOKcTWjEOlc0NQZkxeRPmR3JYTFp7BBH5xM7I,5788
8
+ dagstermill/errors.py,sha256=WOmpAGp-J1XhyGK_LT3ZZKsBwF5dvrWbqSaSldtoh6Y,141
9
+ dagstermill/factory.py,sha256=adgggEb3oAMaEF3DkDQDQ-t460axZVKdQD3MlZPSvxQ,18780
10
+ dagstermill/io_managers.py,sha256=GqDT-T0VJMB301ExYiNT_Dxs3kyMZA8u-oj7YRAlFtg,4390
11
+ dagstermill/manager.py,sha256=pVZl0vLx2-ZHKUlAJkHyveIoVxqSyMWFBqYdfQ3t3oY,16061
12
+ dagstermill/serialize.py,sha256=eXW3c26CiILT_uebyFcAKBnsiNxnjyGT_ch3PfGyjek,188
13
+ dagstermill/translator.py,sha256=h1VPAOWtdjLKzFjRmyN9hO_R6qJuAETNkJydfdgwWGM,2170
14
+ dagstermill/version.py,sha256=NsKiCCQq5j7wW1paL-Bw27h63w_P0r0bIHvsX9TsjGY,23
15
+ dagstermill/examples/__init__.py,sha256=_2u28VKkHmd16vz0Q2N7Fw5QKsJ65HEnIfJL26gNUIw,75
16
+ dagstermill/examples/repository.py,sha256=AlBcvZHCqZ4wAGp8YjO67A1STx0FPhBG97vGEjZv3Bw,15858
17
+ dagstermill-0.25.9.dist-info/LICENSE,sha256=TMatHW4_G9ldRdodEAp-l2Xa2WvsdeOh60E3v1R2jis,11349
18
+ dagstermill-0.25.9.dist-info/METADATA,sha256=2Qr6hKd3LcgW_y580SI3pujLmqwAB1SseNvXCFMPqF8,935
19
+ dagstermill-0.25.9.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
20
+ dagstermill-0.25.9.dist-info/entry_points.txt,sha256=885a7vvhABYWEj7W28elkzSmIcKO3REkdd5h4Z4DEJs,53
21
+ dagstermill-0.25.9.dist-info/top_level.txt,sha256=YDelJKdA5YIIrjsObdd8U4E9YhuXJLRe9NKfUzud9Uc,12
22
+ dagstermill-0.25.9.dist-info/RECORD,,
@@ -1,22 +0,0 @@
1
- dagstermill/__init__.py,sha256=3YqU9M3bCTeiof-BEHLmZ-A06HEYxdALfSu1pB9QAeg,1262
2
- dagstermill/__main__.py,sha256=GqkyStw1mh9zw2gMbQBQpIqW0hpr3I8unVWrw_VqdW8,41
3
- dagstermill/asset_factory.py,sha256=AoUd0lvZT4xAiuC0Sfl7ChtRCYI0yjbipLO-YLA3RDI,9742
4
- dagstermill/cli.py,sha256=lffeaQgenSR7s8MhNUBNA_BeVehlMUrdg7gnQl1WTdY,4494
5
- dagstermill/compat.py,sha256=GCfUaGC3eIEhlZP_VFtua8hFKNtwXocOAfYxuKZ5X3I,526
6
- dagstermill/context.py,sha256=4NwSe11zYhhi35L-uevIZfZlxxoxoVS1Eh4kHS3Yeqs,6117
7
- dagstermill/engine.py,sha256=RI1jAWaPR2Hi-r09qRRPHUHxbnUMMys3K63upI7BS6o,5854
8
- dagstermill/errors.py,sha256=WOmpAGp-J1XhyGK_LT3ZZKsBwF5dvrWbqSaSldtoh6Y,141
9
- dagstermill/factory.py,sha256=gs-Hei2gijrbVc3G2smb_akUVwDTmyItYybZx4Zy8io,18764
10
- dagstermill/io_managers.py,sha256=D9UA4KufzrOeCan3TJyPogD0uIJBjK80ExikdMHqweI,4403
11
- dagstermill/manager.py,sha256=gJhoqonXcXjN7jWB1P0THMdfRuKoKV7uHKD6ITsTr6o,16130
12
- dagstermill/serialize.py,sha256=eXW3c26CiILT_uebyFcAKBnsiNxnjyGT_ch3PfGyjek,188
13
- dagstermill/translator.py,sha256=h1VPAOWtdjLKzFjRmyN9hO_R6qJuAETNkJydfdgwWGM,2170
14
- dagstermill/version.py,sha256=bkf--LdvzFbtaf_d7GSQn5A2t-yDZ-SX33wKaaeqHsY,23
15
- dagstermill/examples/__init__.py,sha256=_2u28VKkHmd16vz0Q2N7Fw5QKsJ65HEnIfJL26gNUIw,75
16
- dagstermill/examples/repository.py,sha256=AlBcvZHCqZ4wAGp8YjO67A1STx0FPhBG97vGEjZv3Bw,15858
17
- dagstermill-0.25.8.dist-info/LICENSE,sha256=TMatHW4_G9ldRdodEAp-l2Xa2WvsdeOh60E3v1R2jis,11349
18
- dagstermill-0.25.8.dist-info/METADATA,sha256=54sUgcV2Fy4LKzusr_bAhUeb26-y7rroh9j4WfUdEWU,935
19
- dagstermill-0.25.8.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
20
- dagstermill-0.25.8.dist-info/entry_points.txt,sha256=885a7vvhABYWEj7W28elkzSmIcKO3REkdd5h4Z4DEJs,53
21
- dagstermill-0.25.8.dist-info/top_level.txt,sha256=YDelJKdA5YIIrjsObdd8U4E9YhuXJLRe9NKfUzud9Uc,12
22
- dagstermill-0.25.8.dist-info/RECORD,,