-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path__init__.py
More file actions
130 lines (126 loc) · 4.49 KB
/
__init__.py
File metadata and controls
130 lines (126 loc) · 4.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
import warnings
from dagster import Definitions, EnvVar
from .assets.base import (
bss_corrections,
bss_metadata,
completed_bss_metadata,
corrected_files,
original_files,
)
from .assets.baseline import baseline_instances
from .assets.fixtures import (
consolidated_fixtures,
consolidated_instances,
imported_baselines,
uploaded_baselines,
validated_instances,
)
from .assets.livelihood_activity import (
all_livelihood_activity_labels_dataframe,
livelihood_activity_dataframe,
livelihood_activity_instances,
livelihood_activity_label_dataframe,
summary_livelihood_activity_labels_dataframe,
)
from .assets.other_cash_income import (
all_other_cash_income_labels_dataframe,
other_cash_income_dataframe,
other_cash_income_instances,
other_cash_income_label_dataframe,
summary_other_cash_income_labels_dataframe,
)
from .assets.seasonal_production_performance import (
all_hazard_labels_dataframe,
all_seasonal_production_performance_labels_dataframe,
hazard_instances,
hazard_labels_dataframe,
hazards_dataframe,
seasonal_production_performance_dataframe,
seasonal_production_performance_instances,
seasonal_production_performance_label_dataframe,
summary_hazard_labels_dataframe,
summary_seasonal_production_performance_labels_dataframe,
)
from .assets.wealth_characteristic import (
all_wealth_characteristic_labels_dataframe,
summary_wealth_characteristic_labels_dataframe,
wealth_characteristic_dataframe,
wealth_characteristic_instances,
wealth_characteristic_label_dataframe,
)
from .assets.wild_foods import (
all_wild_foods_labels_dataframe,
summary_wild_foods_labels_dataframe,
wild_foods_dataframe,
wild_foods_instances,
wild_foods_label_dataframe,
)
from .jobs.fixtures import (
extract_dataframes,
import_baseline_from_fixture,
update_external_assets,
upload_baselines,
)
from .jobs.metadata import update_metadata
from .resources import (
DataFrameCSVIOManager,
DataFrameExcelIOManager,
JSONIOManager,
PickleIOManager,
)
from .sensors import bss_instance_sensor
# Ignore ExperimentalWarning: Function `DagsterInstance.report_runless_asset_event`
warnings.filterwarnings("ignore", r"Function `DagsterInstance.report_runless_asset_event` is experimental")
defs = Definitions(
assets=[
bss_metadata,
completed_bss_metadata,
bss_corrections,
original_files,
corrected_files,
baseline_instances,
livelihood_activity_dataframe,
livelihood_activity_label_dataframe,
all_livelihood_activity_labels_dataframe,
summary_livelihood_activity_labels_dataframe,
livelihood_activity_instances,
other_cash_income_dataframe,
other_cash_income_label_dataframe,
all_other_cash_income_labels_dataframe,
summary_other_cash_income_labels_dataframe,
other_cash_income_instances,
wild_foods_dataframe,
wild_foods_label_dataframe,
all_wild_foods_labels_dataframe,
summary_wild_foods_labels_dataframe,
wild_foods_instances,
wealth_characteristic_dataframe,
wealth_characteristic_label_dataframe,
all_wealth_characteristic_labels_dataframe,
wealth_characteristic_instances,
summary_wealth_characteristic_labels_dataframe,
consolidated_instances,
validated_instances,
consolidated_fixtures,
uploaded_baselines,
imported_baselines,
seasonal_production_performance_dataframe,
hazards_dataframe,
seasonal_production_performance_label_dataframe,
all_seasonal_production_performance_labels_dataframe,
summary_seasonal_production_performance_labels_dataframe,
hazard_labels_dataframe,
all_hazard_labels_dataframe,
summary_hazard_labels_dataframe,
seasonal_production_performance_instances,
hazard_instances,
],
jobs=[update_metadata, update_external_assets, upload_baselines, extract_dataframes, import_baseline_from_fixture],
resources={
"io_manager": PickleIOManager(base_path=EnvVar("DAGSTER_ASSET_BASE_PATH")), # Used by default
"json_io_manager": JSONIOManager(base_path=EnvVar("DAGSTER_ASSET_BASE_PATH")),
"dataframe_csv_io_manager": DataFrameCSVIOManager(base_path=EnvVar("DAGSTER_ASSET_BASE_PATH")),
"dataframe_excel_io_manager": DataFrameExcelIOManager(base_path=EnvVar("DAGSTER_ASSET_BASE_PATH")),
},
sensors=[bss_instance_sensor],
)