Skip to content

Commit

Permalink
pipeline: flatten check enum in PipelineStep
Browse files Browse the repository at this point in the history
  • Loading branch information
intarga committed Oct 9, 2024
1 parent 3af2378 commit ca0831e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
14 changes: 7 additions & 7 deletions sample_pipelines/fresh/TA_PT1H.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,38 @@
# sensor: 0 # do we run the QC non default sensors? Maybe not at first?
[[step]]
name = "special_value_check"
[step.check.special_value_check]
[step.special_value_check]
special_values = [-999999, -6999, -99.9, -99.8, 999, 6999, 9999]

[[step]]
name = "range_check"
[step.check.range_check]
[step.range_check]
min = -55
max = 50

[[step]]
name = "climate_range_check"
[step.check.range_check_dynamic]
[step.range_check_dynamic]
source = "netcdf" # TODO: define a neat spec for this?

[[step]]
name = "step_check"
[step.check.step_check]
[step.step_check]
max = 18.6

[[step]]
name = "flatline_check"
[step.check.flatline_check]
[step.flatline_check]
max = 10

[[step]]
name = "spike_check"
[step.check.spike_check]
[step.spike_check]
max = 18.6

[[step]]
name = "model_consistency_check"
[step.check.model_consistency_check]
[step.model_consistency_check]
model_source = "lustre"
model_args = "arome/air_temperature" # TODO: verify if we need more args than this for the model
threshold = 3.0 # FIXME: made up value by Ingrid
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,17 +218,17 @@ pub mod dev_utils {
r#"
[[step]]
name = "step_check"
[step.check.step_check]
[step.step_check]
max = 3.0
[[step]]
name = "spike_check"
[step.check.spike_check]
[step.spike_check]
max = 3.0
[[step]]
name = "buddy_check"
[step.check.buddy_check]
[step.buddy_check]
max = 3
radii = [5000.0]
nums_min = [2]
Expand All @@ -240,7 +240,7 @@ pub mod dev_utils {
[[step]]
name = "sct"
[step.check.sct]
[step.sct]
num_min = 5
num_max = 100
inner_radius = 50000.0
Expand Down
1 change: 1 addition & 0 deletions src/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ pub struct Pipeline {
#[derive(Debug, Deserialize, PartialEq, Clone)]
pub struct PipelineStep {
pub name: String,
#[serde(flatten)]
pub check: CheckConf,
}

Expand Down

0 comments on commit ca0831e

Please sign in to comment.