Changeset View
Changeset View
Standalone View
Standalone View
python_modules/dagster-graphql/dagster_graphql_tests/graphql/setup.py
Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | from dagster import ( | ||||
pipeline, | pipeline, | ||||
repository, | repository, | ||||
resource, | resource, | ||||
solid, | solid, | ||||
usable_as_dagster_type, | usable_as_dagster_type, | ||||
weekly_schedule, | weekly_schedule, | ||||
) | ) | ||||
from dagster.cli.workspace.load import location_handle_from_python_file | from dagster.cli.workspace.load import location_handle_from_python_file | ||||
from dagster.core.definitions.decorators import executable | from dagster.core.definitions.decorators import job | ||||
from dagster.core.definitions.partition import last_empty_partition | from dagster.core.definitions.partition import last_empty_partition | ||||
from dagster.core.definitions.reconstructable import ReconstructableRepository | from dagster.core.definitions.reconstructable import ReconstructableRepository | ||||
from dagster.core.host_representation import RepositoryLocation | from dagster.core.host_representation import RepositoryLocation | ||||
from dagster.core.host_representation.handle import python_user_process_api_from_instance | from dagster.core.host_representation.handle import python_user_process_api_from_instance | ||||
from dagster.core.log_manager import coerce_valid_log_level | from dagster.core.log_manager import coerce_valid_log_level | ||||
from dagster.core.storage.tags import RESUME_RETRY_TAG | from dagster.core.storage.tags import RESUME_RETRY_TAG | ||||
from dagster.core.test_utils import today_at_midnight | from dagster.core.test_utils import today_at_midnight | ||||
from dagster.utils import file_relative_path, segfault | from dagster.utils import file_relative_path, segfault | ||||
▲ Show 20 Lines • Show All 937 Lines • ▼ Show 20 Lines | chained_partition_set = PartitionSetDefinition( | ||||
mode="default", | mode="default", | ||||
partition_fn=lambda: [Partition(i) for i in range(10)], | partition_fn=lambda: [Partition(i) for i in range(10)], | ||||
run_config_fn_for_partition=lambda _: {"storage": {"filesystem": {}}}, | run_config_fn_for_partition=lambda _: {"storage": {"filesystem": {}}}, | ||||
) | ) | ||||
return [integer_set, enum_set, chained_partition_set] | return [integer_set, enum_set, chained_partition_set] | ||||
def define_executables(): | def define_jobs(): | ||||
@executable(pipeline_name="no_config_pipeline") | @job(pipeline_name="no_config_pipeline") | ||||
def executable_no_config(_): | def job_no_config(_): | ||||
return {"storage": {"filesystem": {}}} | return {"storage": {"filesystem": {}}} | ||||
return [executable_no_config] | return [job_no_config] | ||||
@pipeline | @pipeline | ||||
def chained_failure_pipeline(): | def chained_failure_pipeline(): | ||||
@lambda_solid | @lambda_solid | ||||
def always_succeed(): | def always_succeed(): | ||||
return "hello" | return "hello" | ||||
▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | return ( | ||||
scalar_output_pipeline, | scalar_output_pipeline, | ||||
single_asset_pipeline, | single_asset_pipeline, | ||||
spew_pipeline, | spew_pipeline, | ||||
tagged_pipeline, | tagged_pipeline, | ||||
chained_failure_pipeline, | chained_failure_pipeline, | ||||
] | ] | ||||
+ define_schedules() | + define_schedules() | ||||
+ define_partitions() | + define_partitions() | ||||
+ define_executables() | + define_jobs() | ||||
) | ) |