Repository: openclimatefix/nowcasting_forecast (language: python)

Issue:
Check PV dat is normalized correctly
For live data we need to make sure we normalize the PV data the same as the values we use in training



Discussion / hints:
THe PV data is normalized by just the data loaded in that batch. Need to normalize by the system id. 

1. add installed capacity to datamodel
2.get installed capacity from backtest data, and add to database

Fix patch:
diff --git a/requirements.txt b/requirements.txt
index 88ea471e..52728305 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -3,9 +3,9 @@ sqlalchemy
 psycopg2-binary
 numpy
 click
-nowcasting_dataset==3.3.19
+nowcasting_dataset==3.3.20
 nowcasting_dataloader==1.8.38
-nowcasting_datamodel==0.0.53
+nowcasting_datamodel==1.0.2
 fsspec
 s3fs
 torch


Test patch:
diff --git a/tests/conftest.py b/tests/conftest.py
index d4ca4dea..24bfeb08 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -168,9 +168,15 @@ def pv_yields_and_systems(db_session):
         status_interval_minutes=5,
         longitude=-1.293,
         latitude=51.76,
+        installed_capacity_kw=123,
     ).to_orm()
     pv_system_sql_2: PVSystemSQL = PVSystem(
-        pv_system_id=2, provider="pvoutput.org", status_interval_minutes=5, longitude=0, latitude=56
+        pv_system_id=2,
+        provider="pvoutput.org",
+        status_interval_minutes=5,
+        longitude=0,
+        latitude=56,
+        installed_capacity_kw=124,
     ).to_orm()
 
     t0_datetime_utc = floor_minutes_dt(datetime.utcnow()) - timedelta(hours=2)
diff --git a/tests/test_batch.py b/tests/test_batch.py
index 2bb7a813..117ecae6 100644
--- a/tests/test_batch.py
+++ b/tests/test_batch.py
@@ -79,7 +79,6 @@ def test_make_batches_mvp_v2(nwp_data, pv_yields_and_systems, sat_data, hrv_sat_
             sat_data.to_zarr(store, compute=True)
         os.environ["SAT_PATH"] = sat_path
 
-
         make_batches(
             config_filename="nowcasting_forecast/config/mvp_v2.yaml", temporary_dir=temp_dir
         )