flows module¶
Collection of functions that provide pre-defined Prefect Flow contexts for use in the cloud
-
flows.
debug_model
(fcstconf, fcstjobfile, sshuser) → prefect.core.flow.Flow¶
-
flows.
diff_plot_flow
(postconf, postjobfile, sshuser=None) → prefect.core.flow.Flow¶ Provides a Prefect Flow for a plotting workflow that plots the difference between the experimental or quasi-operational forecast and the official operational forecast. Also creates mpegs of sequential plots. Plots and mpegs are uploaded to the cloud.
- Parameters
postconf (str) – The JSON configuration file for the Cluster to create
postjobfile (str) – The JSON configuration file for the plotting Job
sshuser (str) – The optional user and host to use for retrieving data from a remote server.
- Returns
diff_plotflow
- Return type
prefect.Flow
-
flows.
fcst_flow
(fcstconf, fcstjobfile, sshuser) → prefect.core.flow.Flow¶ Provides a Prefect Flow for a forecast workflow.
- Parameters
fcstconf (str) – The JSON configuration file for the Cluster to create
fcstjobfile (str) – The JSON configuration file for the forecast Job
sshuser (str) – The user and host to use for retrieving data from a remote server.
- Returns
fcstflow
- Return type
prefect.Flow
-
flows.
handler
(signal_received, frame)¶
-
flows.
inject_notebook
()¶ Convert the current notebook to python, test it, and upload it for the next forecast cycle.
-
flows.
notebook_flow
(postconf, jobfile) → prefect.core.flow.Flow¶ Provides a Prefect Flow for a running a python script in a Flow context. Originally designed for exported Jupyter Notebook .py scripts.
Not fully tested. Designed for post jobs that require an on-demand compute node.
- Parameters
postconf (str) – The JSON configuration file for the Cluster to create
jobfile (str) – The JSON configuration file for the post Job
- Returns
nb_flow
- Return type
prefect.Flow
-
flows.
notebook_test
(pyfile) → prefect.core.flow.Flow¶ Provides a Prefect Flow for a running a python script in a Flow context. Originally designed for exported Jupyter Notebook .py scripts. Used to test user developed scripts before injection in quasi-operational workflows.
- Parameters
pyfile (str) – The python script to run.
- Returns
nbtest_flow
- Return type
prefect.Flow
-
flows.
plot_flow
(postconf, postjobfile) → prefect.core.flow.Flow¶ Provides a Prefect Flow for a plotting workflow. Also creates mpegs of sequential plots. Plots and mpegs are uploaded to the cloud.
- Parameters
postconf (str) – The JSON configuration file for the Cluster to create
postjobfile (str) – The JSON configuration file for the plotting Job
- Returns
plotflow
- Return type
prefect.Flow
-
flows.
test_flow
(fcstconf, fcstjobfile) → prefect.core.flow.Flow¶ Provides a Prefect Flow for testing purposes.
- Parameters
fcstconf (str) – The JSON configuration file for the Cluster to create
fcstjobfile (str) – The JSON configuration file for the Job
- Returns
testflow
- Return type
prefect.Flow
-
flows.
test_nbflow
(pyfile: str)¶