Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit a79f06f

Browse files
committed
fix bug for on_premises yaml
1 parent ea900ea commit a79f06f

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

nowcasting_dataset/config/model.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,14 @@ class Satellite(DataSourceMixin, TimeResolutionMixin):
266266
description="The number of meters per pixel for non-HRV satellite channels.",
267267
)
268268

269+
keep_dawn_dusk_hours: int = Field(
270+
0,
271+
description="The number hours around dawn and dusk that should be keep. "
272+
"I.e 'keep_dawn_dusk_hours'=2,"
273+
" then if dawn if 07.00, "
274+
" then data is keep from 06.00",
275+
)
276+
269277

270278
class HRVSatellite(DataSourceMixin, TimeResolutionMixin):
271279
"""Satellite configuration model for HRV data"""

tests/config/test_config.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,18 @@ def test_yaml_load():
3535
assert "gs://" in str(config.output_data.filepath)
3636

3737

38+
def test_yaml_load_on_premises():
39+
"""Test that yaml loading works for 'on_premises.yaml'"""
40+
41+
filename = os.path.join(
42+
os.path.dirname(nowcasting_dataset.__file__), "config", "on_premises.yaml"
43+
)
44+
45+
config = load_yaml_configuration(filename)
46+
47+
assert isinstance(config, Configuration)
48+
49+
3850
def test_yaml_save():
3951
"""
4052
Check a configuration can be saved to a yaml file

0 commit comments

Comments
 (0)