Skip to content

Commit

Permalink
Merge pull request #19 from openclimatefix/issue/adjuster
Browse files Browse the repository at this point in the history
use adjuster by default
  • Loading branch information
dfulu authored Jun 5, 2023
2 parents 5dae211 + b5fc7fb commit b8fe741
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pvnet/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def convert_df_to_forecasts(
return forecasts


def app(t0=None, apply_adjuster=False, gsp_ids=gsp_ids):
def app(t0=None, apply_adjuster=True, gsp_ids=gsp_ids):
"""Inference function for production
This app expects these evironmental variables to be available:
Expand Down
8 changes: 8 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
Location,
LocationSQL,
)
from nowcasting_datamodel.fake import make_fake_me_latest

xr.set_options(keep_attrs=True)

Expand Down Expand Up @@ -269,3 +270,10 @@ def multimodal_model_kwargs(model_minutes_kwargs):
)
kwargs.update(model_minutes_kwargs)
return kwargs


@pytest.fixture()
def me_latest(db_session):
metric_values = make_fake_me_latest(session=db_session, model_name="pvnet_v2")
db_session.add_all(metric_values)
db_session.commit()
2 changes: 1 addition & 1 deletion tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
)


def test_app(db_session, nwp_data, sat_data, gsp_yields_and_systems):
def test_app(db_session, nwp_data, sat_data, gsp_yields_and_systems, me_latest):
# Environment variable DB_URL is set in engine_url, which is called by db_session
# set NWP_ZARR_PATH
# save nwp_data to temporary file, and set NWP_ZARR_PATH
Expand Down

0 comments on commit b8fe741

Please sign in to comment.