id
int64
0
328k
repository_name
stringlengths
7
58
file_path
stringlengths
9
302
class_name
stringlengths
5
256
human_written_code
stringlengths
16
2.16M
class_skeleton
stringlengths
18
1.49M
⌀
total_program_units
int64
1
1.76k
total_doc_str
int64
0
771
AvgCountLine
float64
0
7.89k
AvgCountLineBlank
float64
0
297
AvgCountLineCode
float64
0
7.89k
AvgCountLineComment
float64
0
7.89k
AvgCyclomatic
float64
0
130
CommentToCodeRatio
float64
0
168
CountClassBase
float64
0
40
CountClassCoupled
float64
0
583
CountClassCoupledModified
float64
0
575
CountClassDerived
float64
0
5.35k
CountDeclInstanceMethod
float64
0
529
CountDeclInstanceVariable
float64
0
296
CountDeclMethod
float64
0
599
CountDeclMethodAll
float64
0
1.12k
CountLine
float64
1
40.4k
CountLineBlank
float64
0
8.16k
CountLineCode
float64
1
25.7k
CountLineCodeDecl
float64
1
8.15k
CountLineCodeExe
float64
0
24.2k
CountLineComment
float64
0
16.5k
CountStmt
float64
1
9.71k
CountStmtDecl
float64
1
8.15k
CountStmtExe
float64
0
9.69k
MaxCyclomatic
float64
0
759
MaxInheritanceTree
float64
0
16
MaxNesting
float64
0
34
SumCyclomatic
float64
0
2.9k
23,100
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-sigma/dagster_sigma/translator.py
dagster_sigma.translator.SigmaDatasetTranslatorData
from dagster._record import record from typing import AbstractSet, Any, Optional, Union @record class SigmaDatasetTranslatorData: """A record representing a Sigma dataset and the Sigma organization data.""" dataset: 'SigmaDataset' organization_data: 'SigmaOrganizationData' @property def properties...
@record class SigmaDatasetTranslatorData: '''A record representing a Sigma dataset and the Sigma organization data.''' @property def properties(self) -> dict[str, Any]: pass @property def columns(self) -> AbstractSet[str]: pass @property def inputs(self) -> AbstractSet[str]: ...
8
1
2
0
2
0
1
0.08
0
3
0
0
3
0
3
3
17
4
12
7
5
1
9
4
5
1
0
0
3
23,101
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-sigma/dagster_sigma/translator.py
dagster_sigma.translator.SigmaOrganizationData
from dagster._utils.cached_method import cached_method from dagster_shared.serdes import whitelist_for_serdes from dagster._record import record @whitelist_for_serdes @record class SigmaOrganizationData: workbooks: list[SigmaWorkbook] datasets: list[SigmaDataset] tables: list[SigmaTable] @cached_metho...
@whitelist_for_serdes @record class SigmaOrganizationData: @cached_method def get_datasets_by_inode(self) -> dict[str, SigmaDataset]: pass @cached_method def get_tables_by_inode(self) -> dict[str, SigmaTable]: pass
7
0
2
0
2
0
1
0
0
4
2
0
2
0
2
2
12
2
10
5
5
0
8
3
5
1
0
0
2
23,102
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-sigma/dagster_sigma/translator.py
dagster_sigma.translator.SigmaTable
from dagster._record import record from dagster_shared.serdes import whitelist_for_serdes from typing import AbstractSet, Any, Optional, Union @whitelist_for_serdes @record class SigmaTable: """Represents a table loaded into Sigma.""" properties: dict[str, Any] def get_table_path(self) -> list[str]: ...
@whitelist_for_serdes @record class SigmaTable: '''Represents a table loaded into Sigma.''' def get_table_path(self) -> list[str]: '''Extracts the qualified table path from the name and path properties, e.g. ["MY_DB", "MY_SCHEMA", "MY_TABLE"]. ''' pass
4
2
5
0
2
3
1
1
0
2
0
0
1
0
1
1
10
2
4
2
2
4
4
2
2
1
0
0
1
23,103
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-sigma/dagster_sigma/translator.py
dagster_sigma.translator.SigmaWorkbook
from dagster._record import record from dagster_shared.serdes import whitelist_for_serdes from typing import AbstractSet, Any, Optional, Union @whitelist_for_serdes @record class SigmaWorkbook: """Represents a Sigma workbook, a collection of visualizations and queries for data exploration and analysis. ht...
@whitelist_for_serdes @record class SigmaWorkbook: '''Represents a Sigma workbook, a collection of visualizations and queries for data exploration and analysis. https://help.sigmacomputing.com/docs/workbooks ''' pass
3
1
0
0
0
0
0
0.57
0
0
0
0
0
0
0
0
13
2
7
1
6
4
7
1
6
0
0
0
0
23,104
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-sigma/dagster_sigma/translator.py
dagster_sigma.translator.SigmaWorkbookMetadataSet
from typing import AbstractSet, Any, Optional, Union from dagster._core.definitions.metadata.metadata_value import JsonMetadataValue, TimestampMetadataValue, UrlMetadataValue from dagster._core.definitions.metadata.metadata_set import NamespacedMetadataSet, TableMetadataSet class SigmaWorkbookMetadataSet(NamespacedMet...
class SigmaWorkbookMetadataSet(NamespacedMetadataSet): @classmethod def namespace(cls) -> str: pass
3
0
2
0
2
0
1
0
1
1
0
0
0
0
1
98
12
1
11
4
8
0
10
3
8
1
8
0
1
23,105
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-sigma/dagster_sigma/translator.py
dagster_sigma.translator.SigmaWorkbookTranslatorData
from typing import AbstractSet, Any, Optional, Union from dagster._record import record @record class SigmaWorkbookTranslatorData: """A record representing a Sigma workbook and the Sigma organization data.""" workbook: 'SigmaWorkbook' organization_data: 'SigmaOrganizationData' @property def proper...
@record class SigmaWorkbookTranslatorData: '''A record representing a Sigma workbook and the Sigma organization data.''' @property def properties(self) -> dict[str, Any]: pass @property def lineage(self) -> list[dict[str, Any]]: pass @property def datasets(self) -> AbstractSe...
14
1
2
0
2
0
1
0.05
0
4
0
0
6
0
6
6
29
7
21
13
8
1
15
7
8
1
0
0
6
23,106
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-sigma/dagster_sigma_tests/utils.py
dagster_sigma_tests.utils.RequestToMock
from typing import Any class RequestToMock: def __init__(self, value: dict[str, Any]) -> None: self.value = value @property def headers(self) -> dict[str, Any]: return self.value['headers'] @property def body(self) -> str: return self.value['data'] def urlencoded_for...
class RequestToMock: def __init__(self, value: dict[str, Any]) -> None: pass @property def headers(self) -> dict[str, Any]: pass @property def body(self) -> str: pass def urlencoded_form_data(self) -> str: pass
7
0
2
0
2
0
1
0
0
3
0
0
4
1
4
4
14
3
11
8
4
0
9
6
4
1
0
0
4
23,107
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-slack/dagster_slack/resources.py
dagster_slack.resources.SlackResource
from dagster import ConfigurableResource, resource from pydantic import Field from slack_sdk.web.client import WebClient class SlackResource(ConfigurableResource): """This resource is for connecting to Slack. By configuring this Slack resource, you can post messages to Slack from any Dagster op, asset, schedu...
class SlackResource(ConfigurableResource): '''This resource is for connecting to Slack. By configuring this Slack resource, you can post messages to Slack from any Dagster op, asset, schedule or sensor. Examples: .. code-block:: python import os from dagster import EnvVar, j...
4
2
3
0
2
1
1
1.4
1
1
0
0
1
0
2
2
47
11
15
5
11
21
6
4
3
1
1
0
2
23,108
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-sling/dagster_sling/dagster_sling_translator.py
dagster_sling.dagster_sling_translator.DagsterSlingTranslator
from dagster._utils.warnings import supersession_warning from typing import Any, Callable, Optional from dagster import AssetKey, AssetSpec, AutoMaterializePolicy, LegacyFreshnessPolicy, MetadataValue from collections.abc import Iterable, Mapping from dataclasses import dataclass from dagster._utils.names import clean_...
@dataclass class DagsterSlingTranslator: @public def get_asset_spec(self, stream_definition: Mapping[str, Any]) -> AssetSpec: '''A function that takes a stream definition from a Sling replication config and returns a Dagster AssetSpec. The stream definition is a dictionary key/value pai...
43
20
23
4
7
12
1
1.34
0
9
0
2
21
0
21
21
553
111
189
93
114
254
89
49
67
5
0
3
31
23,109
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-sling/dagster_sling/resources.py
dagster_sling.resources.SlingConnectionResource
from pydantic import Field from typing import IO, Any, AnyStr, Optional, Union from dagster._annotations import public from dagster import AssetExecutionContext, AssetMaterialization, ConfigurableResource, EnvVar, MaterializeResult, OpExecutionContext, PermissiveConfig, get_dagster_logger @public class SlingConnection...
@public class SlingConnectionResource(PermissiveConfig): '''A representation of a connection to a database or file to be used by Sling. This resource can be used as a source or a target for a Sling syncs. Reference the Sling docs for more information on possible connection types and parameters: https://docs.sli...
2
1
0
0
0
0
0
2.82
1
0
0
0
0
0
0
0
55
13
11
4
10
31
4
4
3
0
1
0
0
23,110
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-sling/dagster_sling/resources.py
dagster_sling.resources.SlingMode
from dagster._annotations import public from enum import Enum @public class SlingMode(str, Enum): """The mode to use when syncing. See the Sling docs for more information: https://docs.slingdata.io/sling-cli/run/configuration#modes """ INCREMENTAL = 'incremental' TRUNCATE = 'truncate' FULL_REF...
@public class SlingMode(str, Enum): '''The mode to use when syncing. See the Sling docs for more information: https://docs.slingdata.io/sling-cli/run/configuration#modes ''' pass
2
1
0
0
0
0
0
0.5
2
0
0
0
0
0
0
115
11
2
6
6
5
3
6
6
5
0
4
0
0
23,111
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-sling/dagster_sling/resources.py
dagster_sling.resources.SlingResource
from subprocess import PIPE, STDOUT, Popen import uuid from collections.abc import Generator, Iterator, Sequence import time from dagster import AssetExecutionContext, AssetMaterialization, ConfigurableResource, EnvVar, MaterializeResult, OpExecutionContext, PermissiveConfig, get_dagster_logger from typing import IO, A...
class SlingResource(ConfigurableResource): '''Resource for interacting with the Sling package. This resource can be used to run Sling replications. Args: connections (List[SlingConnectionResource]): A list of connections to use for the replication. Examples: .. code-block:: python ...
23
14
17
2
12
3
2
0.36
1
17
2
0
13
0
15
15
310
50
192
91
155
70
125
68
109
7
1
3
35
23,112
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-sling/dagster_sling/sling_event_iterator.py
dagster_sling.sling_event_iterator.SlingEventIterator
from dagster._core.execution.context.op_execution_context import OpExecutionContext from typing import TYPE_CHECKING, Any, Optional, Union, cast from dagster._core.execution.context.asset_execution_context import AssetExecutionContext from dagster._annotations import public from collections.abc import Iterator, Sequenc...
class SlingEventIterator(Iterator[T]): '''A wrapper around an iterator of Sling events which contains additional methods for post-processing the events, such as fetching column metadata. ''' def __init__(self, events: Iterator[T], sling_cli: 'SlingResource', replication_config: dict[str, Any], context...
10
3
10
1
7
1
2
0.33
1
5
2
0
5
4
5
30
66
13
40
24
24
13
24
16
16
3
5
2
11
23,113
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-snowflake/dagster_snowflake/resources.py
dagster_snowflake.resources.SnowflakeConnection
from typing import Any, Optional, Union from dagster._core.storage.event_log.sql_event_log import SqlDbConnection import dagster._check as check from contextlib import closing, contextmanager from collections.abc import Iterator, Mapping, Sequence import sys from dagster._annotations import public class SnowflakeConne...
class SnowflakeConnection: '''A connection to Snowflake that can execute queries. In general this class should not be directly instantiated, but rather used as a resource in an op or asset via the :py:func:`snowflake_resource`. Note that the SnowflakeConnection is only used by the snowflake_resource. T...
11
5
34
5
13
16
3
1.22
0
10
1
0
5
2
5
5
190
31
72
37
45
88
45
12
39
8
0
4
16
23,114
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-snowflake/dagster_snowflake/resources.py
dagster_snowflake.resources.SnowflakeResource
from typing import Any, Optional, Union from dagster import ConfigurableResource, IAttachDifferentObjectToOpContext, get_dagster_logger, resource from dagster._utils.cached_method import cached_method import dagster._check as check from dagster.components.lib.sql_component.sql_client import SQLClient from dagster._core...
class SnowflakeResource(ConfigurableResource, IAttachDifferentObjectToOpContext, SQLClient): '''A resource for connecting to the Snowflake data warehouse. If connector configuration is not set, SnowflakeResource.get_connection() will return a `snowflake.connector.Connection <https://docs.snowflake.com/en/d...
27
2
20
2
15
3
3
0.19
2
9
1
0
9
1
10
10
452
62
330
61
303
62
99
49
86
5
1
2
26
23,115
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-snowflake/dagster_snowflake/snowflake_io_manager.py
dagster_snowflake.snowflake_io_manager.SnowflakeDbClient
from dagster._core.storage.db_io_manager import DbClient, DbIOManager, DbTypeHandler, TablePartitionDimension, TableSlice from contextlib import contextmanager from dagster import IOManagerDefinition, OutputContext, io_manager from dagster_snowflake.resources import SnowflakeResource class SnowflakeDbClient(DbClient):...
class SnowflakeDbClient(DbClient): @staticmethod @contextmanager def connect(context, table_slice): pass @staticmethod def ensure_schema_exists(context: OutputContext, table_slice: TableSlice, connection) -> None: pass @staticmethod def delete_table_slice(context: OutputCon...
10
0
9
0
9
1
3
0.07
1
3
2
0
0
0
4
11
46
3
42
15
32
3
22
9
17
3
2
2
10
23,116
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-snowflake/dagster_snowflake/snowflake_io_manager.py
dagster_snowflake.snowflake_io_manager.SnowflakeIOManager
from typing import Any, Optional, cast from collections.abc import Sequence from dagster._config.pythonic_config import ConfigurableIOManagerFactory from abc import abstractmethod from pydantic import Field from dagster._core.storage.db_io_manager import DbClient, DbIOManager, DbTypeHandler, TablePartitionDimension, Ta...
class SnowflakeIOManager(ConfigurableIOManagerFactory): '''Base class for an IO manager definition that reads inputs from and writes outputs to Snowflake. Examples: .. code-block:: python from dagster_snowflake import SnowflakeIOManager from dagster_snowflake_pandas import Snowf...
7
3
17
3
4
10
1
1.21
1
4
3
4
1
0
3
135
204
33
78
19
71
94
20
17
16
1
9
0
3
23,117
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-snowflake-pandas/dagster_snowflake_pandas/snowflake_pandas_type_handler.py
dagster_snowflake_pandas.snowflake_pandas_type_handler.SnowflakePandasIOManager
from dagster._core.storage.db_io_manager import DbTypeHandler, TableSlice from collections.abc import Mapping, Sequence import pandas as pd from dagster_snowflake.snowflake_io_manager import SnowflakeDbClient, SnowflakeIOManager from typing import Optional class SnowflakePandasIOManager(SnowflakeIOManager): """An ...
class SnowflakePandasIOManager(SnowflakeIOManager): '''An I/O manager definition that reads inputs from and writes Pandas DataFrames to Snowflake. When using the SnowflakePandasIOManager, any inputs and outputs without type annotations will be loaded as Pandas DataFrames. Returns: IOManagerDef...
7
1
2
0
2
0
1
6.1
1
4
2
0
0
0
3
138
96
25
10
7
3
61
7
4
3
1
10
0
3
23,118
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-snowflake-pandas/dagster_snowflake_pandas/snowflake_pandas_type_handler.py
dagster_snowflake_pandas.snowflake_pandas_type_handler.SnowflakePandasTypeHandler
from collections.abc import Mapping, Sequence from dagster import InputContext, MetadataValue, OutputContext, TableColumn, TableSchema from dagster._core.storage.db_io_manager import DbTypeHandler, TableSlice from snowflake.connector.pandas_tools import write_pandas from dagster_snowflake.snowflake_io_manager import Sn...
class SnowflakePandasTypeHandler(DbTypeHandler[pd.DataFrame]): '''Plugin for the Snowflake I/O Manager that can store and load Pandas DataFrames as Snowflake tables. Examples: .. code-block:: python from dagster_snowflake import SnowflakeIOManager from dagster_snowflake_pandas i...
5
1
21
1
18
2
3
0.51
1
5
2
0
3
0
3
28
96
11
57
13
47
29
20
8
15
4
5
1
8
23,119
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-snowflake-pyspark/dagster_snowflake_pyspark/snowflake_pyspark_type_handler.py
dagster_snowflake_pyspark.snowflake_pyspark_type_handler.SnowflakePySparkIOManager
from collections.abc import Mapping, Sequence from dagster._core.storage.db_io_manager import DbTypeHandler, TableSlice from dagster_snowflake import SnowflakeIOManager, build_snowflake_io_manager from typing import Optional from pyspark.sql import DataFrame, SparkSession class SnowflakePySparkIOManager(SnowflakeIOMan...
class SnowflakePySparkIOManager(SnowflakeIOManager): '''An I/O manager definition that reads inputs from and writes PySpark DataFrames to Snowflake. When using the SnowflakePySparkIOManager, any inputs and outputs without type annotations will be loaded as PySpark DataFrames. Returns: IOManager...
7
1
2
0
2
0
1
6.9
1
4
2
0
0
0
3
138
103
24
10
7
3
69
7
4
3
1
10
0
3
23,120
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-snowflake-pyspark/dagster_snowflake_pyspark/snowflake_pyspark_type_handler.py
dagster_snowflake_pyspark.snowflake_pyspark_type_handler.SnowflakePySparkTypeHandler
from pyspark.sql.types import StructType from dagster._core.storage.db_io_manager import DbTypeHandler, TableSlice from dagster._core.definitions.metadata import RawMetadataValue from pyspark.sql import DataFrame, SparkSession from dagster_snowflake.snowflake_io_manager import SnowflakeDbClient from dagster import Inpu...
class SnowflakePySparkTypeHandler(DbTypeHandler[DataFrame]): '''Plugin for the Snowflake I/O Manager that can store and load PySpark DataFrames as Snowflake tables. Examples: .. code-block:: python from dagster_snowflake import SnowflakeIOManager from dagster_snowflake_pandas im...
5
1
12
2
11
0
1
0.71
1
4
2
0
3
0
3
28
71
14
34
12
27
24
15
9
11
2
5
1
4
23,121
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-spark/dagster_spark/resources.py
dagster_spark.resources.SparkResource
import subprocess import os from dagster._core.log_manager import DagsterLogManager from dagster_spark.types import SparkOpError import dagster._check as check from dagster_spark.utils import construct_spark_shell_command class SparkResource: def __init__(self, logger): self.logger = check.inst_param(logg...
class SparkResource: def __init__(self, logger): pass def run_spark_job(self, config, main_class): pass
3
0
24
3
21
1
2
0.02
0
2
2
0
2
1
2
2
49
6
42
12
39
1
14
7
11
3
0
1
4
23,122
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-spark/dagster_spark/types.py
dagster_spark.types.SparkOpError
class SparkOpError(Exception): pass
class SparkOpError(Exception): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
10
2
0
2
1
1
0
2
1
1
0
3
0
0
23,123
dagster-io/dagster
dagster-io_dagster/docs/sphinx/_ext/dagster-sphinx/dagster_sphinx/__init__.py
dagster_sphinx.DagsterClassDocumenter
from dagster._record import get_original_class, is_record from sphinx.ext.autodoc import ClassDocumenter, ObjectMember, Options as AutodocOptions from dagster._annotations import get_beta_info, get_beta_params, get_deprecated_info, get_deprecated_params, get_preview_info, get_superseded_info, has_beta_params, has_depre...
class DagsterClassDocumenter(ClassDocumenter): '''Overrides the default autodoc ClassDocumenter to adds some extra options.''' def get_object_members(self, want_all: bool) -> tuple[bool, list[ObjectMember]]: pass def _is_member_public(self, member: object) -> bool: pass
3
1
11
1
8
3
2
0.35
1
5
0
0
2
1
2
2
27
4
17
8
14
6
12
8
9
3
1
1
4
23,124
dagster-io/dagster
dagster-io_dagster/docs/sphinx/_ext/dagster-sphinx/dagster_sphinx/configurable.py
dagster_sphinx.configurable.ConfigurableDocumenter
from sphinx.ext.autodoc import DataDocumenter from dagster._serdes import ConfigurableClass import dagster._check as check from typing import Any, Union, cast from dagster._config.pythonic_config import ConfigurableResource, ConfigurableResourceFactory, infer_schema_from_config_class import inspect from dagster import ...
class ConfigurableDocumenter(DataDocumenter): @classmethod def can_document_member(cls, member: Any, _membername: str, _isattr: bool, _parent: Any) -> bool: pass def add_content(self, more_content) -> None: pass
4
0
20
3
16
2
4
0.09
1
6
1
0
1
0
2
2
45
7
35
12
29
3
23
9
20
6
1
1
7
23,125
dagster-io/dagster
dagster-io_dagster/docs/sphinx/_ext/dagster-sphinx/dagster_sphinx/docstring_flags.py
dagster_sphinx.docstring_flags.FlagDirective
from sphinx.util.docutils import SphinxDirective class FlagDirective(SphinxDirective): required_arguments = 1 final_argument_whitespace = True has_content = True def run(self): flag_node = flag() flag_node['flag_type'] = self.arguments[0] flag_node['message'] = ' '.join(self.co...
class FlagDirective(SphinxDirective): def run(self): pass
2
0
5
0
5
0
1
0.11
1
1
1
0
1
0
1
1
11
1
9
6
7
1
9
6
7
1
1
0
1
23,126
dagster-io/dagster
dagster-io_dagster/docs/sphinx/_ext/dagster-sphinx/dagster_sphinx/docstring_flags.py
dagster_sphinx.docstring_flags.flag
import docutils.nodes as nodes class flag(nodes.Element): local_attributes = [*nodes.Element.local_attributes, *FLAG_ATTRS]
class flag(nodes.Element): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
2
0
2
2
1
0
2
2
1
0
1
0
0
23,127
dagster-io/dagster
dagster-io_dagster/docs/sphinx/_ext/dagster-sphinx/dagster_sphinx/docstring_flags.py
dagster_sphinx.docstring_flags.inline_flag
import docutils.nodes as nodes class inline_flag(nodes.Inline, nodes.TextElement): local_attributes = FLAG_ATTRS
class inline_flag(nodes.Inline, nodes.TextElement): pass
1
0
0
0
0
0
0
0
2
0
0
0
0
0
0
0
2
0
2
2
1
0
2
2
1
0
1
0
0
23,128
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-ssh/dagster_ssh/resources.py
dagster_ssh.resources.SSHResource
from dagster._core.execution.context.init import InitResourceContext import os from typing import Optional from dagster._utils import mkdir_p from dagster._annotations import beta from paramiko.client import SSHClient from dagster._config.pythonic_config import ConfigurableResource import logging from dagster import Bo...
@beta class SSHResource(ConfigurableResource): '''A Dagster resource for establishing SSH connections and performing remote file operations. This resource leverages the Paramiko library to provide robust SSH connectivity, including support for key-based and password authentication, tunneling, and SFTP trans...
10
2
22
3
18
2
3
0.09
1
2
1
0
7
0
7
133
204
30
163
39
152
14
88
34
80
8
9
3
22
23,129
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-tableau/dagster_tableau/asset_utils.py
dagster_tableau.asset_utils.ParsedTableauAssetSpecs
from dagster import AssetKey, AssetObservation, AssetSpec, Output, _check as check from collections import namedtuple class ParsedTableauAssetSpecs(namedtuple('_ParsedTableauAssetSpecs', ['external_asset_specs', 'materializable_asset_specs'])): """Used to represent the parsed Tableau asset specs as returned by...
class ParsedTableauAssetSpecs(namedtuple('_ParsedTableauAssetSpecs', ['external_asset_specs', 'materializable_asset_specs'])): '''Used to represent the parsed Tableau asset specs as returned by the `parse_tableau_external_and_materializable_asset_specs` function below. ''' def __new__(cls, external_as...
2
1
10
0
10
0
1
0.23
1
1
0
0
1
0
1
6
17
1
13
4
9
3
3
2
1
1
1
0
1
23,130
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-tableau/dagster_tableau/resources.py
dagster_tableau.resources.BaseTableauClient
import uuid from dagster import AssetExecutionContext, AssetObservation, AssetSpec, ConfigurableResource, Definitions, Failure, ObserveResult, Output, _check as check, get_dagster_logger from dagster_tableau.asset_utils import create_data_source_asset_event, create_view_asset_event, create_view_asset_observation from c...
@beta class BaseTableauClient: def __init__(self, connected_app_client_id: str, connected_app_secret_id: str, connected_app_secret_value: str, username: str, site_name: str): pass @property @abstractmethod def base_url(self) -> str: pass @property @cached_method def _log(sel...
32
12
19
1
16
2
2
0.1
0
14
1
2
14
6
14
14
283
21
239
71
186
23
71
35
56
10
0
3
30
23,131
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-tableau/dagster_tableau/resources.py
dagster_tableau.resources.BaseTableauWorkspace
from contextlib import contextmanager from collections import defaultdict from dagster._annotations import beta, beta_param, superseded from pydantic import Field, PrivateAttr from dagster import AssetExecutionContext, AssetObservation, AssetSpec, ConfigurableResource, Definitions, Failure, ObserveResult, Output, _chec...
@beta class BaseTableauWorkspace(ConfigurableResource): '''Base class to represent a workspace in Tableau and provides utilities to interact with Tableau APIs. ''' @abstractmethod def build_client(self) -> None: pass @contextmanager def get_client(self) -> Iterator[Union[TableauCloud...
12
5
40
4
29
7
4
0.23
1
15
7
2
4
0
4
4
189
21
137
49
119
32
61
36
55
12
1
6
16
23,132
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-tableau/dagster_tableau/resources.py
dagster_tableau.resources.TableauCloudClient
from dagster._annotations import beta, beta_param, superseded @beta class TableauCloudClient(BaseTableauClient): """Represents a client for Tableau Cloud and provides utilities to interact with the Tableau API. """ def __init__(self, connected_app_client_id: str, connected_app_secret_id: str, connecte...
@beta class TableauCloudClient(BaseTableauClient): '''Represents a client for Tableau Cloud and provides utilities to interact with the Tableau API. ''' def __init__(self, connected_app_client_id: str, connected_app_secret_id: str, connected_app_secret_value: str, username: str, site_name: str, pod_nam...
5
2
10
0
10
1
1
0.19
1
2
0
0
2
1
2
16
27
2
21
13
9
4
6
4
3
1
1
0
2
23,133
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-tableau/dagster_tableau/resources.py
dagster_tableau.resources.TableauCloudWorkspace
from dagster._annotations import beta, beta_param, superseded from pydantic import Field, PrivateAttr @beta class TableauCloudWorkspace(BaseTableauWorkspace): """Represents a workspace in Tableau Cloud and provides utilities to interact with Tableau APIs. """ pod_name: str = Field(..., description='The...
@beta class TableauCloudWorkspace(BaseTableauWorkspace): '''Represents a workspace in Tableau Cloud and provides utilities to interact with Tableau APIs. ''' def build_client(self) -> None: pass
3
1
9
0
9
0
1
0.27
1
1
1
0
1
6
1
5
16
2
11
9
9
3
4
4
2
1
2
0
1
23,134
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-tableau/dagster_tableau/resources.py
dagster_tableau.resources.TableauServerClient
from dagster._annotations import beta, beta_param, superseded @beta class TableauServerClient(BaseTableauClient): """Represents a client for Tableau Server and provides utilities to interact with Tableau APIs. """ def __init__(self, connected_app_client_id: str, connected_app_secret_id: str, connected...
@beta class TableauServerClient(BaseTableauClient): '''Represents a client for Tableau Server and provides utilities to interact with Tableau APIs. ''' def __init__(self, connected_app_client_id: str, connected_app_secret_id: str, connected_app_secret_value: str, username: str, site_name: str, server_n...
5
2
10
0
10
1
1
0.19
1
2
0
0
2
1
2
16
27
2
21
13
9
4
6
4
3
1
1
0
2
23,135
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-tableau/dagster_tableau/resources.py
dagster_tableau.resources.TableauServerWorkspace
from pydantic import Field, PrivateAttr from dagster._annotations import beta, beta_param, superseded @beta class TableauServerWorkspace(BaseTableauWorkspace): """Represents a workspace in Tableau Server and provides utilities to interact with Tableau APIs. """ server_name: str = Field(..., description...
@beta class TableauServerWorkspace(BaseTableauWorkspace): '''Represents a workspace in Tableau Server and provides utilities to interact with Tableau APIs. ''' def build_client(self) -> None: pass
3
1
9
0
9
0
1
0.27
1
1
1
0
1
6
1
5
16
2
11
9
9
3
4
4
2
1
2
0
1
23,136
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-tableau/dagster_tableau/resources.py
dagster_tableau.resources.TableauWorkspaceDefsLoader
from typing import Optional, Union from dagster._core.definitions.definitions_load_context import StateBackedDefinitionsLoader from dagster_tableau.translator import DagsterTableauTranslator, TableauContentData, TableauContentType, TableauDataSourceMetadataSet, TableauMetadataSet, TableauTagSet, TableauTranslatorData, ...
@record class TableauWorkspaceDefsLoader(StateBackedDefinitionsLoader[TableauWorkspaceData]): @property def defs_key(self) -> str: pass def fetch_state(self) -> TableauWorkspaceData: pass def defs_from_state(self, state: TableauWorkspaceData) -> Definitions: pass
6
0
6
1
6
0
1
0
1
3
2
0
3
0
3
30
26
5
21
7
16
0
11
6
7
1
5
0
3
23,137
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-tableau/dagster_tableau/translator.py
dagster_tableau.translator.DagsterTableauTranslator
from dagster import _check as check from dagster._core.definitions.assets.definition.asset_spec import AssetSpec from dagster._core.definitions.asset_key import AssetKey class DagsterTableauTranslator: """Translator class which converts raw response data from the Tableau API into AssetSpecs. Subclass this clas...
class DagsterTableauTranslator: '''Translator class which converts raw response data from the Tableau API into AssetSpecs. Subclass this class to implement custom logic for each type of Tableau content. ''' def get_asset_spec(self, data: TableauTranslatorData) -> AssetSpec: pass def g...
5
1
12
1
11
0
2
0.06
0
7
6
5
8
0
8
8
130
16
108
40
83
6
39
24
30
5
0
2
16
23,138
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-tableau/dagster_tableau/translator.py
dagster_tableau.translator.TableauContentData
from dagster._record import record from collections.abc import Mapping, Sequence from dagster._serdes import whitelist_for_serdes from typing import Any, Callable, Literal, Optional @whitelist_for_serdes @record class TableauContentData: """A record representing a piece of content in Tableau. Includes the cont...
@whitelist_for_serdes @record class TableauContentData: '''A record representing a piece of content in Tableau. Includes the content's type and data as returned from the API. ''' pass
3
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
7
1
3
1
2
3
3
1
2
0
0
0
0
23,139
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-tableau/dagster_tableau/translator.py
dagster_tableau.translator.TableauContentType
from enum import Enum from dagster._serdes import whitelist_for_serdes @whitelist_for_serdes class TableauContentType(Enum): """Enum representing each object in Tableau's ontology.""" WORKBOOK = 'workbook' SHEET = 'sheet' DASHBOARD = 'dashboard' DATA_SOURCE = 'data_source'
@whitelist_for_serdes class TableauContentType(Enum): '''Enum representing each object in Tableau's ontology.''' pass
2
1
0
0
0
0
0
0.2
1
0
0
0
0
0
0
49
7
1
5
5
4
1
5
5
4
0
4
0
0
23,140
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-tableau/dagster_tableau/translator.py
dagster_tableau.translator.TableauMetadataSet
from dagster._core.definitions.metadata.metadata_set import NamespacedMetadataSet from typing import Any, Callable, Literal, Optional class TableauMetadataSet(NamespacedMetadataSet): id: Optional[str] = None @classmethod def namespace(cls) -> str: return 'dagster-tableau'
class TableauMetadataSet(NamespacedMetadataSet): @classmethod def namespace(cls) -> str: pass
3
0
2
0
2
0
1
0
1
1
0
0
0
0
1
98
7
1
6
4
3
0
5
3
3
1
8
0
1
23,141
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-tableau/dagster_tableau/translator.py
dagster_tableau.translator.TableauTagSet
from dagster._core.definitions.tags.tag_set import NamespacedTagSet from typing import Any, Callable, Literal, Optional class TableauTagSet(NamespacedTagSet): asset_type: Optional[Literal['dashboard', 'data_source', 'sheet']] = None @classmethod def namespace(cls) -> str: return 'dagster-tableau'
class TableauTagSet(NamespacedTagSet): @classmethod def namespace(cls) -> str: pass
3
0
2
0
2
0
1
0
1
1
0
0
0
0
1
97
6
1
5
4
2
0
4
3
2
1
8
0
1
23,142
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-tableau/dagster_tableau/translator.py
dagster_tableau.translator.TableauTranslatorData
from dagster._record import record from typing import Any, Callable, Literal, Optional from collections.abc import Mapping, Sequence @record class TableauTranslatorData: """A record representing a piece of content in Tableau and the Tableau workspace data. Includes the content's type and data as returned from ...
@record class TableauTranslatorData: '''A record representing a piece of content in Tableau and the Tableau workspace data. Includes the content's type and data as returned from the API. ''' @property def content_type(self) -> TableauContentType: pass @property def properties(self) -...
6
1
2
0
2
0
1
0.33
0
4
1
0
2
0
2
2
15
3
9
5
4
3
7
3
4
1
0
0
2
23,143
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-tableau/dagster_tableau/translator.py
dagster_tableau.translator.TableauWorkspaceData
from collections.abc import Mapping, Sequence from dagster._record import record from dagster._serdes import whitelist_for_serdes from typing import Any, Callable, Literal, Optional from dagster._utils.cached_method import cached_method @whitelist_for_serdes @record class TableauWorkspaceData: """A record represen...
@whitelist_for_serdes @record class TableauWorkspaceData: '''A record representing all content in a Tableau workspace. Provided as context for the translator so that it can resolve dependencies between content. ''' @classmethod def from_content_data(cls, site_name: str, content_data: Sequence[Tablea...
7
1
26
0
26
0
1
0.09
0
4
2
0
0
0
1
1
38
2
33
5
28
3
8
2
6
1
0
0
1
23,144
dagster-io/dagster
dagster-io_dagster/python_modules/dagster-test/dagster_test/dagster_airflow/custom_operator.py
dagster_test.dagster_airflow.custom_operator.CustomOperator
from dagster_airflow.operators.util import invoke_steps_within_python_operator import logging from dagster_airflow.vendor.python_operator import PythonOperator class CustomOperator(PythonOperator): def __init__(self, dagster_operator_parameters, *args, **kwargs): def python_callable(ts, dag_run, **kwargs...
class CustomOperator(PythonOperator): def __init__(self, dagster_operator_parameters, *args, **kwargs): pass def python_callable(ts, dag_run, **kwargs): pass
3
0
14
2
12
1
1
0.06
1
1
0
0
1
0
1
1
20
2
17
4
14
1
8
4
5
1
1
0
2
23,145
dagster-io/dagster
dagster-io_dagster/python_modules/dagster-test/dagster_test/toys/auto_materializing/large_graph.py
dagster_test.toys.auto_materializing.large_graph.AssetLayerConfig
from typing import NamedTuple, Optional from dagster import AssetCheckResult, AssetCheckSpec, AssetKey, AssetsDefinition, AutoMaterializePolicy, AutomationCondition, MaterializeResult, PartitionsDefinition, asset, repository class AssetLayerConfig(NamedTuple): n_assets: int n_upstreams_per_asset: int = 0 p...
class AssetLayerConfig(NamedTuple): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
5
0
5
4
4
0
5
4
4
0
1
0
0
23,146
dagster-io/dagster
dagster-io_dagster/python_modules/dagster-test/dagster_test/toys/error_monster.py
dagster_test.toys.error_monster.ErrorableIOManager
from dagster import Failure, Field, In, Int, IOManager, Out, ResourceDefinition, RetryRequested, String, graph, io_manager, op class ErrorableIOManager(IOManager): def __init__(self, throw_input, throw_output): self._values = {} self._throw_input = throw_input self._throw_output = throw_ou...
class ErrorableIOManager(IOManager): def __init__(self, throw_input, throw_output): pass def handle_output(self, context, obj): pass def load_input(self, context): pass
4
0
5
1
5
0
2
0.07
1
2
1
0
3
3
3
3
19
4
15
9
11
1
15
9
11
2
1
1
5
23,147
dagster-io/dagster
dagster-io_dagster/python_modules/dagster-test/dagster_test/toys/error_monster.py
dagster_test.toys.error_monster.ErrorableResource
class ErrorableResource: pass
class ErrorableResource: pass
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
2
0
2
1
1
0
2
1
1
0
0
0
0
23,148
dagster-io/dagster
dagster-io_dagster/python_modules/dagster-test/dagster_test/toys/error_monster.py
dagster_test.toys.error_monster.ExampleException
class ExampleException(Exception): pass
class ExampleException(Exception): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
10
2
0
2
1
1
0
2
1
1
0
3
0
0
23,149
dagster-io/dagster
dagster-io_dagster/python_modules/dagster-test/dagster_test/toys/external_execution/__init__.py
dagster_test.toys.external_execution.NumberConfig
from dagster import AssetExecutionContext, Config, Definitions, asset from pydantic import Field class NumberConfig(Config): multiplier: int = Field(default=1)
class NumberConfig(Config): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
2
0
2
2
1
0
2
2
1
0
1
0
0
23,150
dagster-io/dagster
dagster-io_dagster/python_modules/dagster-test/dagster_test/toys/input_managers.py
dagster_test.toys.input_managers.NumpyCsvIOManager
import numpy as np import pandas as pd class NumpyCsvIOManager(PandasCsvIOManager): def load_input(self, context) -> np.ndarray: if context.upstream_output: file_path = self._get_path(context.upstream_output) df = np.genfromtxt(file_path, delimiter=',', dtype=None) retu...
class NumpyCsvIOManager(PandasCsvIOManager): def load_input(self, context) -> np.ndarray: pass
2
0
20
0
20
0
2
0
1
0
0
0
1
0
1
5
21
0
21
5
19
0
9
5
7
2
2
1
2
23,151
dagster-io/dagster
dagster-io_dagster/python_modules/dagster-test/dagster_test/toys/input_managers.py
dagster_test.toys.input_managers.PandasCsvIOManager
import pandas as pd import os from dagster import Field, In, IOManager, Noneable, graph, io_manager, op class PandasCsvIOManager(IOManager): def __init__(self, base_dir=None): self.base_dir = os.getenv('DAGSTER_HOME') if base_dir is None else base_dir def _get_path(self, output_context): retu...
class PandasCsvIOManager(IOManager): def __init__(self, base_dir=None): pass def _get_path(self, output_context): pass def handle_output(self, context, obj: pd.DataFrame): pass def load_input(self, context) -> pd.DataFrame: pass
5
0
4
0
4
1
2
0.13
1
0
0
1
4
1
4
4
19
3
16
7
11
2
12
7
7
2
1
1
6
23,152
dagster-io/dagster
dagster-io_dagster/python_modules/dagster-test/dagster_test/toys/longitudinal.py
dagster_test.toys.longitudinal.IntentionalRandomFailure
class IntentionalRandomFailure(Exception): """To distinguish from other errors."""
class IntentionalRandomFailure(Exception): '''To distinguish from other errors.''' pass
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
10
2
0
1
1
0
1
1
1
0
0
3
0
0
23,153
dagster-io/dagster
dagster-io_dagster/python_modules/dagster-test/dagster_test/toys/many_partitions_ranged_backfill.py
dagster_test.toys.many_partitions_ranged_backfill.DummyIOManager
from dagster import AssetExecutionContext, BackfillPolicy, Definitions, IOManager, asset class DummyIOManager(IOManager): def load_input(self, context, obj): return 1 def handle_output(self, context, obj): pass
class DummyIOManager(IOManager): def load_input(self, context, obj): pass def handle_output(self, context, obj): pass
3
0
2
0
2
0
1
0
1
0
0
0
2
0
2
2
6
1
5
3
2
0
5
3
2
1
1
0
2
23,154
dagster-io/dagster
dagster-io_dagster/python_modules/dagster-test/dagster_test/toys/software_defined_assets.py
dagster_test.toys.software_defined_assets.DataFrame
class DataFrame: pass
class DataFrame: pass
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
2
0
2
1
1
0
2
1
1
0
0
0
0
23,155
dagster-io/dagster
dagster-io_dagster/python_modules/dagster-test/dagster_test/toys/software_defined_assets.py
dagster_test.toys.software_defined_assets.DummyIOManager
from dagster import AssetKey, IOManager, IOManagerDefinition, SourceAsset, asset, with_resources class DummyIOManager(IOManager): def handle_output(self, context, obj: DataFrame): assert context assert obj def load_input(self, context): assert context return DataFrame()
class DummyIOManager(IOManager): def handle_output(self, context, obj: DataFrame): pass def load_input(self, context): pass
3
0
3
0
3
0
1
0
1
1
1
0
2
0
2
2
8
1
7
3
4
0
7
3
4
1
1
0
2
23,156
dagster-io/dagster
dagster-io_dagster/python_modules/dagster-test/dagster_test/toys/user_computed_data_versions/__init__.py
dagster_test.toys.user_computed_data_versions.Schema
from typing_extensions import TypedDict from dagster_test.toys.user_computed_data_versions.external_system import AssetInfo, ExternalSystem, ProvenanceSpec, SourceAssetInfo from collections.abc import Sequence class Schema(TypedDict): assets: Sequence[AssetInfo] source_assets: Sequence[SourceAssetInfo]
class Schema(TypedDict): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
3
0
3
1
2
0
3
1
2
0
1
0
0
23,157
dagster-io/dagster
dagster-io_dagster/python_modules/dagster-test/dagster_test/toys/user_computed_data_versions/external_system.py
dagster_test.toys.user_computed_data_versions.external_system.AssetInfo
from typing import AbstractSet, Any, Optional, Union from typing_extensions import TypedDict class AssetInfo(TypedDict): key: str code_version: str dependencies: AbstractSet[str]
class AssetInfo(TypedDict): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
4
0
4
1
3
0
4
1
3
0
1
0
0
23,158
dagster-io/dagster
dagster-io_dagster/python_modules/dagster-test/dagster_test/toys/user_computed_data_versions/external_system.py
dagster_test.toys.user_computed_data_versions.external_system.ExternalSystem
from typing import AbstractSet, Any, Optional, Union class ExternalSystem: def __init__(self, storage_path: str): self._db = _Database(storage_path) def materialize(self, asset_spec: AssetInfo, provenance_spec: Optional[ProvenanceSpec]) -> MaterializeResult: """Recompute an asset if its prove...
class ExternalSystem: def __init__(self, storage_path: str): pass def materialize(self, asset_spec: AssetInfo, provenance_spec: Optional[ProvenanceSpec]) -> MaterializeResult: '''Recompute an asset if its provenance is missing or stale. Receives asset provenance info from Dagster repr...
5
2
16
1
8
6
2
0.76
0
10
7
0
4
1
4
4
66
8
33
15
26
25
26
13
21
5
0
2
9
23,159
dagster-io/dagster
dagster-io_dagster/python_modules/dagster-test/dagster_test/toys/user_computed_data_versions/external_system.py
dagster_test.toys.user_computed_data_versions.external_system.MaterializeResult
from typing_extensions import TypedDict class MaterializeResult(TypedDict): data_version: str is_memoized: bool
class MaterializeResult(TypedDict): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
3
0
3
1
2
0
3
1
2
0
1
0
0
23,160
dagster-io/dagster
dagster-io_dagster/python_modules/dagster-test/dagster_test/toys/user_computed_data_versions/external_system.py
dagster_test.toys.user_computed_data_versions.external_system.ObserveResult
from typing_extensions import TypedDict class ObserveResult(TypedDict): data_version: str
class ObserveResult(TypedDict): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
2
0
2
1
1
0
2
1
1
0
1
0
0
23,161
dagster-io/dagster
dagster-io_dagster/python_modules/dagster-test/dagster_test/toys/user_computed_data_versions/external_system.py
dagster_test.toys.user_computed_data_versions.external_system.ProvenanceSpec
from typing_extensions import TypedDict from collections.abc import Mapping class ProvenanceSpec(TypedDict): code_version: str input_data_versions: Mapping[str, str]
class ProvenanceSpec(TypedDict): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
3
0
3
1
2
0
3
1
2
0
1
0
0
23,162
dagster-io/dagster
dagster-io_dagster/python_modules/dagster-test/dagster_test/toys/user_computed_data_versions/external_system.py
dagster_test.toys.user_computed_data_versions.external_system.SourceAssetInfo
from typing_extensions import TypedDict class SourceAssetInfo(TypedDict): key: str
class SourceAssetInfo(TypedDict): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
2
0
2
1
1
0
2
1
1
0
1
0
0
23,163
dagster-io/dagster
dagster-io_dagster/python_modules/dagster-test/dagster_test/toys/user_computed_data_versions/external_system.py
dagster_test.toys.user_computed_data_versions.external_system._Database
import os from dataclasses import asdict, dataclass import json class _Database: def __init__(self, storage_path: str): self.storage_path = storage_path if not os.path.exists(self.storage_path): os.mkdir(self.storage_path) for k, v in _SOURCE_ASSETS.items(): path = ...
class _Database: def __init__(self, storage_path: str): pass def asset_path(self, key: str) -> str: pass def get(self, key: str) -> _DatabaseRecord: pass def has(self, key: str) -> bool: pass def set(self, key: str, record: _DatabaseRecord) -> None: pass
6
0
4
0
4
0
2
0.05
0
3
1
0
5
1
5
5
25
4
21
13
15
1
21
10
15
4
0
3
8
23,164
dagster-io/dagster
dagster-io_dagster/python_modules/dagster-test/dagster_test/toys/user_computed_data_versions/external_system.py
dagster_test.toys.user_computed_data_versions.external_system._DatabaseRecord
from dataclasses import asdict, dataclass from typing import AbstractSet, Any, Optional, Union @dataclass class _DatabaseRecord: value: Any data_version: str
@dataclass class _DatabaseRecord: pass
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
3
0
3
1
2
0
3
1
2
0
0
0
0
23,165
dagster-io/dagster
dagster-io_dagster/python_modules/dagster-test/dagster_test/utils/benchmark.py
dagster_test.utils.benchmark.ProfilingEntry
from dataclasses import dataclass import time @dataclass class ProfilingEntry: name: str time: float
@dataclass class ProfilingEntry: pass
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
3
0
3
1
2
0
3
1
2
0
0
0
0
23,166
dagster-io/dagster
dagster-io_dagster/python_modules/dagster-test/dagster_test/utils/benchmark.py
dagster_test.utils.benchmark.ProfilingSession
from typing import Any, Optional, TextIO from typing_extensions import Self from rich.console import Console from rich.table import Table from collections.abc import Iterator, Mapping import time import sys from contextlib import contextmanager class ProfilingSession: def __init__(self, *, output: TextIO=sys.stdo...
class ProfilingSession: def __init__(self, *, output: TextIO=sys.stdout, name: Optional[str]=None, experiment_settings: Optional[Mapping[str, Any]]=None): pass def start(self) -> Self: pass def log_start_message(self) -> None: pass @contextmanager def logged_execution_tim...
15
0
5
0
5
0
1
0.04
0
9
1
0
13
4
13
13
84
13
68
35
47
3
61
28
47
2
0
1
18
23,167
dagster-io/dagster
dagster-io_dagster/python_modules/dagster/dagster_tests/cli_tests/command_tests/assets.py
dagster_tests.cli_tests.command_tests.assets.MyConfig
import dagster as dg class MyConfig(dg.Config): some_prop: str
class MyConfig(dg.Config): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
2
0
2
1
1
0
2
1
1
0
1
0
0
23,168
dagster-io/dagster
dagster-io_dagster/python_modules/dagster/dagster_tests/cli_tests/fake_python_logger_module/__init__.py
dagster_tests.cli_tests.fake_python_logger_module.FakeHandler
import logging class FakeHandler(logging.StreamHandler): pass
class FakeHandler(logging.StreamHandler): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
25
2
0
2
1
1
0
2
1
1
0
4
0
0
23,169
dagster-io/dagster
dagster-io_dagster/python_modules/dagster/dagster_tests/cli_tests/workspace_tests/pending_repo/pending_repo.py
dagster_tests.cli_tests.workspace_tests.pending_repo.pending_repo.MyCacheableAssetsDefinition
from dagster._core.definitions.assets.definition.cacheable_assets_definition import AssetsDefinitionCacheableData, CacheableAssetsDefinition import dagster as dg from dagster import AssetsDefinition class MyCacheableAssetsDefinition(CacheableAssetsDefinition): def compute_cacheable_data(self): return [Ass...
class MyCacheableAssetsDefinition(CacheableAssetsDefinition): def compute_cacheable_data(self): pass def build_definitions(self, data): pass @dg.op def my_op(): pass
5
0
7
0
7
0
1
0
1
1
1
0
2
0
2
30
21
2
19
5
14
0
7
4
3
1
5
0
3
23,170
dagster-io/dagster
dagster-io_dagster/python_modules/dagster/dagster_tests/declarative_automation_tests/daemon_tests/definitions/custom_condition.py
dagster_tests.declarative_automation_tests.daemon_tests.definitions.custom_condition.MyCondition
import dagster as dg class MyCondition(dg.AutomationCondition): def evaluate(self, context: dg.AutomationContext) -> dg.AutomationResult: if len(context.cursor or '') == 4: true_subset = context.candidate_subset else: true_subset = context.get_empty_subset() return ...
class MyCondition(dg.AutomationCondition): def evaluate(self, context: dg.AutomationContext) -> dg.AutomationResult: pass
2
0
10
1
8
1
2
0.11
1
0
0
0
1
0
1
1
11
1
9
3
7
1
6
3
4
2
1
1
2
23,171
dagster-io/dagster
dagster-io_dagster/python_modules/dagster/dagster_tests/declarative_automation_tests/scenario_utils/asset_daemon_scenario.py
dagster_tests.declarative_automation_tests.scenario_utils.asset_daemon_scenario.AssetDaemonScenario
from dagster_tests.declarative_automation_tests.scenario_utils.scenario_state import ScenarioSpec, ScenarioState, get_code_location_origin from typing import Any, Callable, NamedTuple, Optional, cast from dagster import AssetKey, DagsterInstance, RunRequest class AssetDaemonScenario(NamedTuple): """Describes a sce...
class AssetDaemonScenario(NamedTuple): '''Describes a scenario that the AssetDaemon should be tested against. Consists of an id describing what is to be tested, an initial state, and a scenario function which will modify that state and make assertions about it along the way. ''' def evaluate_fast(...
3
1
7
0
7
0
1
0.22
1
2
1
0
2
0
2
2
25
3
18
5
13
4
8
3
5
1
1
0
2
23,172
dagster-io/dagster
dagster-io_dagster/python_modules/dagster/dagster_tests/declarative_automation_tests/scenario_utils/asset_daemon_scenario.py
dagster_tests.declarative_automation_tests.scenario_utils.asset_daemon_scenario.AssetDaemonScenarioState
from dataclasses import dataclass, field from dagster._core.definitions.declarative_automation.serialized_objects import AssetSubsetWithMetadata, AutomationConditionEvaluation from dagster_tests.declarative_automation_tests.scenario_utils.scenario_state import ScenarioSpec, ScenarioState, get_code_location_origin from ...
@dataclass(frozen=True) class AssetDaemonScenarioState(ScenarioState): '''Specifies the state of a given AssetDaemonScenario. This state can be modified by changing the set of asset definitions it contains, executing runs, updating the time, evaluating ticks, etc. At any point in time, assertions can be mad...
19
6
27
2
23
2
3
0.09
1
24
13
0
14
3
14
33
466
52
379
105
334
36
173
71
155
9
1
3
46
23,173
dagster-io/dagster
dagster-io_dagster/python_modules/dagster/dagster_tests/declarative_automation_tests/scenario_utils/asset_daemon_scenario.py
dagster_tests.declarative_automation_tests.scenario_utils.asset_daemon_scenario.AssetRuleEvaluationSpec
from dagster import AssetKey, DagsterInstance, RunRequest from dagster._core.definitions.assets.graph.base_asset_graph import BaseAssetGraph from typing import Any, Callable, NamedTuple, Optional, cast from collections.abc import Sequence import dagster as dg from dagster._core.definitions.auto_materialize_rule_evaluat...
class AssetRuleEvaluationSpec(NamedTuple): '''Provides a convenient way to specify information about an AutoMaterializeRuleEvaluation that is expected to exist within the context of a test. Args: rule (AutoMaterializeRule): The rule that will exist on the evaluation. partitions (Optional[Se...
3
3
15
0
12
3
2
0.56
1
8
5
0
2
0
2
2
47
5
27
10
22
15
11
8
8
2
1
0
4
23,174
dagster-io/dagster
dagster-io_dagster/python_modules/dagster/dagster_tests/declarative_automation_tests/scenario_utils/automation_condition_scenario.py
dagster_tests.declarative_automation_tests.scenario_utils.automation_condition_scenario.AutomationConditionScenarioState
from dagster._core.definitions.asset_daemon_cursor import AssetDaemonCursor from typing import Optional import dagster as dg from dagster._core.asset_graph_view.entity_subset import EntitySubset from dagster._core.definitions.declarative_automation.operators.boolean_operators import AndAutomationCondition from dagster....
@dataclass(frozen=True) class AutomationConditionScenarioState(ScenarioState): def _get_request_subsets_by_key(self, asset_graph_view: AssetGraphView) -> Mapping[dg.AssetKey, EntitySubset]: pass async def evaluate(self, asset: CoercibleToAssetKey) -> tuple['AutomationConditionScenarioState', dg.Automa...
6
1
16
1
14
2
2
0.12
1
13
9
0
4
2
4
23
72
7
60
28
49
7
29
20
24
4
1
1
9
23,175
dagster-io/dagster
dagster-io_dagster/python_modules/dagster/dagster_tests/declarative_automation_tests/scenario_utils/automation_condition_scenario.py
dagster_tests.declarative_automation_tests.scenario_utils.automation_condition_scenario.FalseAutomationCondition
from typing import Optional import dagster as dg from dagster import AssetKey, AutomationContext class FalseAutomationCondition(dg.AutomationCondition): """Always returns the empty subset.""" label: Optional[str] = None @property def description(self) -> str: return '' def evaluate(self, ...
class FalseAutomationCondition(dg.AutomationCondition): '''Always returns the empty subset.''' @property def description(self) -> str: pass def evaluate(self, context: AutomationContext) -> dg.AutomationResult: pass
4
1
2
0
2
0
1
0.14
1
2
1
0
2
0
2
76
11
3
7
5
3
1
6
4
3
1
5
0
2
23,176
dagster-io/dagster
dagster-io_dagster/python_modules/dagster/dagster_tests/declarative_automation_tests/scenario_utils/base_scenario.py
dagster_tests.declarative_automation_tests.scenario_utils.base_scenario.AssetEvaluationSpec
from dagster._core.definitions.auto_materialize_rule_evaluation import AutoMaterializeDecisionType, AutoMaterializeRuleEvaluation, AutoMaterializeRuleEvaluationData from dagster._core.definitions.auto_materialize_rule import AutoMaterializeRule from collections.abc import Iterable, Mapping, Sequence from typing import ...
class AssetEvaluationSpec(NamedTuple): @staticmethod def empty(asset_key: str) -> 'AssetEvaluationSpec': pass @staticmethod def from_single_rule(asset_key: str, rule: AutoMaterializeRule, evaluation_data: Optional[AutoMaterializeRuleEvaluationData]=None) -> 'AssetEvaluationSpec': pass
5
0
14
0
14
0
3
0
1
5
4
0
0
0
2
2
37
2
35
12
26
0
10
6
7
4
1
0
5
23,177
dagster-io/dagster
dagster-io_dagster/python_modules/dagster/dagster_tests/declarative_automation_tests/scenario_utils/base_scenario.py
dagster_tests.declarative_automation_tests.scenario_utils.base_scenario.AssetReconciliationScenario
import contextlib from dagster._core.definitions.assets.graph.asset_graph import AssetGraph from dagster._core.definitions.asset_daemon_cursor import AssetDaemonCursor import sys from dagster._core.definitions.observe import observe from dagster._daemon.asset_daemon import AssetDaemon import pytest from dagster._core.d...
class AssetReconciliationScenario(NamedTuple('_AssetReconciliationScenario', [('unevaluated_runs', Sequence[RunSpec]), ('assets', Optional[Sequence[Union[dg.SourceAsset, dg.AssetsDefinition]]]), ('asset_checks', Optional[Sequence[dg.AssetChecksDefinition]]), ('between_runs_delta', Optional[datetime.timedelta]), ('eval...
11
1
47
4
42
3
4
0.05
1
32
20
0
4
2
4
4
398
36
354
109
278
19
103
35
94
15
1
4
35
23,178
dagster-io/dagster
dagster-io_dagster/python_modules/dagster/dagster_tests/declarative_automation_tests/scenario_utils/base_scenario.py
dagster_tests.declarative_automation_tests.scenario_utils.base_scenario.RunSpec
import dagster as dg from typing import AbstractSet, NamedTuple, Optional, Union from collections.abc import Iterable, Mapping, Sequence class RunSpec(NamedTuple): asset_keys: Sequence[dg.AssetKey] partition_key: Optional[str] = None failed_asset_keys: Optional[Sequence[dg.AssetKey]] = None is_observat...
class RunSpec(NamedTuple): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
5
0
5
4
4
0
5
4
4
0
1
0
0
23,179
dagster-io/dagster
dagster-io_dagster/python_modules/dagster/dagster_tests/declarative_automation_tests/scenario_utils/scenario_state.py
dagster_tests.declarative_automation_tests.scenario_utils.scenario_state.MultiAssetSpec
from typing import AbstractSet, NamedTuple, Optional, Union, cast import dagster as dg from collections.abc import Iterable, Sequence class MultiAssetSpec(NamedTuple): specs: Sequence[dg.AssetSpec] partitions_def: Optional[dg.PartitionsDefinition] = None can_subset: bool = False
class MultiAssetSpec(NamedTuple): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
4
0
4
3
3
0
4
3
3
0
1
0
0
23,180
dagster-io/dagster
dagster-io_dagster/python_modules/dagster/dagster_tests/declarative_automation_tests/scenario_utils/scenario_state.py
dagster_tests.declarative_automation_tests.scenario_utils.scenario_state.ScenarioSpec
from dagster._time import datetime_from_timestamp, get_current_datetime, parse_time_string from dagster import AssetExecutionContext, AssetKey, AutoMaterializePolicy, DagsterRunStatus, RunRequest from dagster._core.definitions.assets.graph.asset_graph import AssetGraph from collections.abc import Iterable, Sequence fro...
@dataclass(frozen=True) class ScenarioSpec: '''A construct for declaring and modifying a desired Definitions object.''' def with_sensors(self, sensors: Sequence[dg.SensorDefinition]) -> 'ScenarioSpec': pass @property def assets(self) -> Sequence[dg.AssetsDefinition]: pass def c...
21
2
11
1
9
0
2
0.05
0
10
3
0
9
0
9
9
145
20
120
47
93
6
64
32
50
7
0
3
28
23,181
dagster-io/dagster
dagster-io_dagster/python_modules/dagster/dagster_tests/declarative_automation_tests/scenario_utils/scenario_state.py
dagster_tests.declarative_automation_tests.scenario_utils.scenario_state.ScenarioState
from dagster._core.instance import DagsterInstance from dagster._time import datetime_from_timestamp, get_current_datetime, parse_time_string from dagster import AssetExecutionContext, AssetKey, AutoMaterializePolicy, DagsterRunStatus, RunRequest from typing_extensions import Self import logging from dataclasses import...
@dataclass(frozen=True) class ScenarioState: '''A reference to the state of a specific scenario alongside an instance.''' @property def current_time(self) -> datetime.datetime: pass @property def asset_graph(self) -> AssetGraph: pass def with_current_time(self, time: Union[str, ...
26
2
8
0
7
1
1
0.06
0
13
4
2
19
0
19
19
187
23
155
64
110
9
76
36
55
2
0
2
24
23,182
dagster-io/dagster
dagster-io_dagster/python_modules/dagster/dagster_tests/definitions_tests/module_loader_tests/asset_package_with_cacheable/__init__.py
dagster_tests.definitions_tests.module_loader_tests.asset_package_with_cacheable.MyCacheableAssetsDefinition
from dagster._core.definitions.assets.definition.cacheable_assets_definition import AssetsDefinitionCacheableData, CacheableAssetsDefinition from dagster._core.definitions.assets.definition.assets_definition import AssetsDefinition import dagster as dg class MyCacheableAssetsDefinition(CacheableAssetsDefinition): ...
class MyCacheableAssetsDefinition(CacheableAssetsDefinition): def compute_cacheable_data(self): pass def build_definitions(self, data): pass @dg.op def my_op(): pass
5
0
7
0
7
0
1
0
1
2
2
0
2
0
2
30
21
2
19
5
14
0
7
4
3
1
5
0
3
23,183
dagster-io/dagster
dagster-io_dagster/python_modules/dagster/dagster_tests/execution_tests/pipes_tests/in_process_client.py
dagster_tests.execution_tests.pipes_tests.in_process_client.InProcessContextInjector
from contextlib import contextmanager from collections.abc import Iterator from dagster_pipes import PipesContext, PipesContextData, PipesContextLoader, PipesExtras, PipesMessage, PipesMessageWriter, PipesMessageWriterChannel, PipesParams, PipesParamsLoader import dagster as dg class InProcessContextInjector(dg.PipesC...
class InProcessContextInjector(dg.PipesContextInjector): @contextmanager def inject_context(self, context_data: 'PipesContextData') -> Iterator[PipesParams]: pass def no_messages_debug_text(self) -> str: pass
4
0
2
0
2
0
1
0
1
2
0
0
2
0
2
24
7
1
6
4
2
0
5
3
2
1
5
0
2
23,184
dagster-io/dagster
dagster-io_dagster/python_modules/dagster/dagster_tests/execution_tests/pipes_tests/in_process_client.py
dagster_tests.execution_tests.pipes_tests.in_process_client.InProcessMessageReader
from contextlib import contextmanager from dagster_pipes import PipesContext, PipesContextData, PipesContextLoader, PipesExtras, PipesMessage, PipesMessageWriter, PipesMessageWriterChannel, PipesParams, PipesParamsLoader from collections.abc import Iterator import dagster as dg from dagster._core.pipes.utils import Pip...
class InProcessMessageReader(dg.PipesMessageReader): def __init__(self, message_writer: InProcessPipesMessageWriter, pipes_context: PipesContext) -> None: pass @contextmanager def read_messages(self, handler: PipesMessageHandler) -> Iterator[PipesParams]: pass def no_messages_debug_te...
5
0
4
0
4
0
1
0
1
4
2
0
3
2
3
27
17
2
15
12
6
0
10
7
6
2
5
1
4
23,185
dagster-io/dagster
dagster-io_dagster/python_modules/dagster/dagster_tests/execution_tests/pipes_tests/in_process_client.py
dagster_tests.execution_tests.pipes_tests.in_process_client.InProcessPipesClient
from dagster._core.definitions.resource_annotation import TreatAsResourceParam from dagster._core.pipes.client import PipesClientCompletedInvocation import dagster as dg from dagster._core.definitions.metadata import RawMetadataMapping from dagster._core.pipes.context import build_external_execution_context_data from d...
class InProcessPipesClient(dg.PipesClient, TreatAsResourceParam): '''An in-process pipes clients unusable in test cases. A function inside the orchestration process actually serves as the "external" execution. This allows us to test the inner machinery of pipes without actually launching subprocesses, whic...
3
1
29
1
28
2
1
0.23
2
9
9
0
1
0
1
22
37
2
30
15
20
7
9
5
7
1
5
2
1
23,186
dagster-io/dagster
dagster-io_dagster/python_modules/dagster/dagster_tests/execution_tests/pipes_tests/in_process_client.py
dagster_tests.execution_tests.pipes_tests.in_process_client.InProcessPipesContextLoader
from dagster_pipes import PipesContext, PipesContextData, PipesContextLoader, PipesExtras, PipesMessage, PipesMessageWriter, PipesMessageWriterChannel, PipesParams, PipesParamsLoader from contextlib import contextmanager from collections.abc import Iterator class InProcessPipesContextLoader(PipesContextLoader): d...
class InProcessPipesContextLoader(PipesContextLoader): def __init__(self, pipes_context_data: PipesContextData): pass @contextmanager def load_context(self, params: PipesParams) -> Iterator[PipesContextData]: pass
4
0
2
0
2
0
1
0
1
2
1
0
2
1
2
23
7
1
6
5
2
0
5
4
2
1
5
0
2
23,187
dagster-io/dagster
dagster-io_dagster/python_modules/dagster/dagster_tests/execution_tests/pipes_tests/in_process_client.py
dagster_tests.execution_tests.pipes_tests.in_process_client.InProcessPipesMessageWriteChannel
from dagster_pipes import PipesContext, PipesContextData, PipesContextLoader, PipesExtras, PipesMessage, PipesMessageWriter, PipesMessageWriterChannel, PipesParams, PipesParamsLoader class InProcessPipesMessageWriteChannel(PipesMessageWriterChannel): def __init__(self) -> None: self.messages: list[PipesMe...
class InProcessPipesMessageWriteChannel(PipesMessageWriterChannel): def __init__(self) -> None: pass def write_message(self, message: PipesMessage) -> None: pass
3
0
2
0
2
0
1
0
1
2
1
0
2
1
2
23
6
1
5
4
2
0
5
4
2
1
5
0
2
23,188
dagster-io/dagster
dagster-io_dagster/python_modules/dagster/dagster_tests/execution_tests/pipes_tests/in_process_client.py
dagster_tests.execution_tests.pipes_tests.in_process_client.InProcessPipesMessageWriter
from contextlib import contextmanager from dagster_pipes import PipesContext, PipesContextData, PipesContextLoader, PipesExtras, PipesMessage, PipesMessageWriter, PipesMessageWriterChannel, PipesParams, PipesParamsLoader from collections.abc import Iterator class InProcessPipesMessageWriter(PipesMessageWriter): d...
class InProcessPipesMessageWriter(PipesMessageWriter): def __init__(self) -> None: pass @contextmanager def open(self, params: PipesParams) -> Iterator[InProcessPipesMessageWriteChannel]: pass
4
0
2
0
2
0
1
0
1
2
1
0
2
1
2
27
7
1
6
5
2
0
5
4
2
1
5
0
2
23,189
dagster-io/dagster
dagster-io_dagster/python_modules/dagster/dagster_tests/execution_tests/pipes_tests/in_process_client.py
dagster_tests.execution_tests.pipes_tests.in_process_client.InProcessPipesParamLoader
from dagster_pipes import PipesContext, PipesContextData, PipesContextLoader, PipesExtras, PipesMessage, PipesMessageWriter, PipesMessageWriterChannel, PipesParams, PipesParamsLoader class InProcessPipesParamLoader(PipesParamsLoader): def load_context_params(self) -> PipesParams: return {} def load_m...
class InProcessPipesParamLoader(PipesParamsLoader): def load_context_params(self) -> PipesParams: pass def load_messages_params(self) -> PipesParams: pass def is_dagster_pipes_process(self) -> bool: pass
4
0
2
0
2
0
1
0
1
1
0
0
3
0
3
26
9
2
7
4
3
0
7
4
3
1
5
0
3
23,190
dagster-io/dagster
dagster-io_dagster/python_modules/dagster/dagster_tests/launcher_tests/pending_repository.py
dagster_tests.launcher_tests.pending_repository.MyAssets
from dagster import AssetsDefinition, DagsterInstance, MetadataValue import dagster as dg from dagster._core.definitions.assets.definition.cacheable_assets_definition import AssetsDefinitionCacheableData, CacheableAssetsDefinition class MyAssets(CacheableAssetsDefinition): def compute_cacheable_data(self): ...
class MyAssets(CacheableAssetsDefinition): def compute_cacheable_data(self): pass def build_definitions(self, data): pass @dg.op(name=f'my_op_{self.unique_id}', ins={'inp': dg.In(dg.Nothing)}) def my_op(): pass
5
0
18
1
16
1
1
0.06
1
3
1
0
2
0
2
30
54
4
48
11
43
3
15
10
11
1
5
0
3
23,191
dagster-io/dagster
dagster-io_dagster/python_modules/dagster/dagster_tests/storage_tests/branching_io_manager_tests/utils.py
dagster_tests.storage_tests.branching_io_manager_tests.utils.AssetBasedInMemoryIOManager
from dagster import AssetKey, DagsterInstance, Definitions, InputContext, OutputContext from typing import Any, Optional, Union import dagster as dg from collections.abc import Sequence from dagster._core.definitions.events import CoercibleToAssetKey class AssetBasedInMemoryIOManager(dg.IOManager): """In memory I/...
class AssetBasedInMemoryIOManager(dg.IOManager): '''In memory I/O manager for testing asset-based jobs and workflows. Can handle both partitioned and unpartitioned assets. ''' def __init__(self): pass def handle_output(self, context: OutputContext, obj: Any): pass def load_in...
8
1
5
0
5
0
2
0.09
1
5
0
0
7
1
7
7
46
8
35
17
23
3
25
13
17
3
1
2
14
23,192
dagster-io/dagster
dagster-io_dagster/python_modules/dagster/dagster_tests/storage_tests/branching_io_manager_tests/utils.py
dagster_tests.storage_tests.branching_io_manager_tests.utils.ConfigurableAssetBasedInMemoryIOManager
from pydantic import PrivateAttr from typing import Any, Optional, Union from collections.abc import Sequence from dagster import AssetKey, DagsterInstance, Definitions, InputContext, OutputContext from dagster._core.execution.context.init import InitResourceContext from dagster._core.definitions.events import Coercibl...
class ConfigurableAssetBasedInMemoryIOManager(dg.ConfigurableIOManager): '''ConfigurableResource version of the above. This is useful for testing that the config system is working correctly & to test the setup/teardown logic. ''' def setup_for_execution(self, context: InitResourceContext) -> None: ...
9
1
5
0
5
0
2
0.07
1
6
1
0
8
0
8
145
53
10
40
18
27
3
30
14
21
3
10
2
15
23,193
dagster-io/dagster
dagster-io_dagster/python_modules/dagster/dagster_tests/storage_tests/branching_io_manager_tests/utils.py
dagster_tests.storage_tests.branching_io_manager_tests.utils.DefinitionsRunner
from dagster._core.definitions.events import CoercibleToAssetKey import dagster as dg from contextlib import contextmanager from typing import Any, Optional, Union from collections.abc import Sequence from dagster import AssetKey, DagsterInstance, Definitions, InputContext, OutputContext class DefinitionsRunner: "...
class DefinitionsRunner: '''Helper class for running asset-oriented tests. Handles threading through the instance for you (this is easy to forget to do). ''' def __init__(self, defs: Definitions, instance: DagsterInstance): pass @staticmethod @contextmanager def ephemeral(defs: Def...
10
1
6
0
6
0
1
0.07
0
5
1
0
6
2
7
7
53
7
43
24
25
3
23
14
15
1
0
1
7
23,194
dagster-io/dagster
dagster-io_dagster/python_modules/dagster/dagster_tests/storage_tests/utils/compute_log_manager.py
dagster_tests.storage_tests.utils.compute_log_manager.TestComputeLogManager
import time from dagster._core.execution.compute_logs import should_disable_io_stream_redirect from dagster._core.test_utils import environ import pytest import string import random from dagster._core.storage.compute_log_manager import ComputeIOType import sys from dagster._time import get_current_datetime class TestC...
class TestComputeLogManager: '''You can extend this class to easily run these set of tests on any compute log manager. When extending, you simply need to override the `compute_log_manager` fixture and return your implementation of `ComputeLogManager`. For example: ``` class TestMyComputeLogMana...
19
1
15
2
13
1
1
0.17
0
3
2
5
10
0
10
10
195
36
143
60
111
24
114
36
101
2
0
1
12
23,195
dagster-io/dagster
dagster-io_dagster/python_modules/dagster/dagster_tests/storage_tests/utils/daemon_cursor_storage.py
dagster_tests.storage_tests.utils.daemon_cursor_storage.TestDaemonCursorStorage
import pytest class TestDaemonCursorStorage: """You can extend this class to easily run these set of tests on any daemon cursor storage. When extending, you simply need to override the `cursor_storage` fixture. """ __test__ = False @pytest.fixture(name='storage', params=[]) def cursor_storage(...
class TestDaemonCursorStorage: '''You can extend this class to easily run these set of tests on any daemon cursor storage. When extending, you simply need to override the `cursor_storage` fixture. ''' @pytest.fixture(name='storage', params=[]) def cursor_storage(self, request): pass de...
4
1
12
2
10
0
1
0.13
0
0
0
3
2
0
2
2
32
6
23
6
19
3
14
4
11
1
0
1
2
23,196
dagster-io/dagster
dagster-io_dagster/python_modules/dagster/dagster_tests/storage_tests/utils/event_log_storage.py
dagster_tests.storage_tests.utils.event_log_storage.TestEventLogStorage
from dagster._core.storage.sqlalchemy_compat import db_select from dagster._core.storage.partition_status_cache import AssetStatusCacheValue from dagster import DagsterInstance, JobDefinition, _check as check, in_process_executor, materialize from dagster._core.storage.event_log.sqlite.sqlite_event_log import SqliteEve...
null
397
2
26
3
22
1
2
0.06
0
53
38
6
128
0
128
128
5,795
850
4,699
950
4,233
259
2,296
725
2,046
9
0
2
386
23,197
dagster-io/dagster
dagster-io_dagster/python_modules/dagster/dagster_tests/storage_tests/utils/partition_status_cache.py
dagster_tests.storage_tests.utils.partition_status_cache.TestPartitionStatusCache
from dagster._core.definitions.assets.graph.asset_graph import AssetGraph import dagster as dg from dagster._core.storage.partition_status_cache import RUN_FETCH_BATCH_SIZE, build_failed_and_in_progress_partition_subset, get_and_update_asset_status_cache_value, get_last_planned_storage_id from dagster._core.storage.tag...
class TestPartitionStatusCache: @pytest.fixture(name='instance', params=[]) def instance(self, request): pass @pytest.fixture def delete_runs_instance(self, instance): pass def test_get_cached_status_unpartitioned(self, instance): pass @dg.asset def asset1(...
52
0
27
4
23
2
1
0.07
0
11
7
1
16
0
16
16
831
125
696
147
648
49
319
131
286
4
0
3
40
23,198
dagster-io/dagster
dagster-io_dagster/python_modules/dagster/dagster_tests/storage_tests/utils/run_storage.py
dagster_tests.storage_tests.utils.run_storage.TestRunStorage
import time from dagster._core.storage.dagster_run import DagsterRunStatus import sys from dagster_test.utils.data_factory import dagster_run as create_dagster_run from dagster._core.remote_origin import ManagedGrpcPythonEnvCodeLocationOrigin, RemoteRepositoryOrigin from dagster._time import create_datetime, datetime_f...
class TestRunStorage: '''You can extend this class to easily run these set of tests on any run storage. When extending, you simply need to override the `run_storage` fixture and return your implementation of `RunStorage`. For example: ``` class TestMyStorageImplementation(TestRunStorage): ...
80
1
26
3
23
1
1
0.04
0
29
21
5
61
0
65
65
1,905
275
1,584
347
1,486
57
868
320
792
5
0
2
95
23,199
dagster-io/dagster
dagster-io_dagster/python_modules/libraries/dagster-twilio/dagster_twilio/resources.py
dagster_twilio.resources.TwilioResource
from pydantic import Field from dagster import ConfigurableResource, resource from twilio.rest import Client class TwilioResource(ConfigurableResource): """This resource is for connecting to Twilio.""" account_sid: str = Field(description='Twilio Account SID, created with yout Twilio account. This can be found...
class TwilioResource(ConfigurableResource): '''This resource is for connecting to Twilio.''' @classmethod def _is_dagster_maintained(cls) -> bool: pass def create_client(self) -> Client: pass
4
1
2
0
2
0
1
0.05
1
1
0
0
1
0
2
2
23
3
19
6
15
1
7
5
4
1
1
0
2