Skip to content

Commit

Permalink
Merge branch 'main' into feature-KPT-update-systems-query
Browse files Browse the repository at this point in the history
Signed-off-by: Martijn Cazemier <[email protected]>
  • Loading branch information
MartijnCa authored Nov 21, 2023
2 parents 2cdb68a + f36c20d commit 18dd873
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 5 deletions.
3 changes: 3 additions & 0 deletions openstef_dbc/services/write.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,9 @@ def write_weather_data(
"clearSky_ulf": np.float64,
"clearSky_dlf": np.float64,
"radiation": np.float64,
"radiation_direct": np.float64,
"radiation_diffuse": np.float64,
"radiation_normal": np.float64,
"windspeed_100m_ensemble": np.float64,
"windspeed_ensemble": np.float64,
"winddeg_ensemble": np.float64,
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
ciso8601~=2.3.0 # To speed up influxDB queries
geopy~=2.3.0
openstef~=3.3.1
pydantic-settings~=2.1.0
influxdb-client~=1.36.1
mysql-connector-python~=8.0.31
PyMySQL~=1.0.2
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def read_long_description_from_readme():

setup(
name="openstef_dbc",
version="3.6.16",
version="3.6.17",
packages=find_packages(include=["openstef_dbc", "openstef_dbc.*"]),
description="Database Connection for OpenSTEF",
long_description=read_long_description_from_readme(),
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/mock_influx_db_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import requests

from pydantic.v1 import BaseSettings
from pydantic_settings import BaseSettings

BUCKETS = ["realised/autogen", "forecast_latest/autogen"]

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# SPDX-License-Identifier: MPL-2.0

from typing import Union
from pydantic.v1 import BaseSettings
from pydantic_settings import BaseSettings


class Settings(BaseSettings):
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/services/test_database_prediction_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from unittest.mock import patch
import pandas as pd
from openstef.data_classes.prediction_job import PredictionJobDataClass
from pydantic.v1.error_wrappers import ValidationError
from openstef_dbc.services.prediction_job import PredictionJobRetriever


Expand Down Expand Up @@ -82,7 +83,7 @@ def test_create_prediction_job_object(self):
def test_create_prediction_job_object_missing_attribute(self):
pj_dict = self.prediction_job.copy()
pj_dict.pop("forecast_type")
with self.assertRaises(AttributeError):
with self.assertRaises(ValidationError):
self.service._create_prediction_job_object(pj_dict)

def test_create_prediction_job_object_without_train_components(self):
Expand Down
4 changes: 3 additions & 1 deletion tests/unit/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
# SPDX-License-Identifier: MPL-2.0

from typing import Union
from pydantic.v1 import BaseSettings

from pydantic_settings import BaseSettings



class Settings(BaseSettings):
Expand Down

0 comments on commit 18dd873

Please sign in to comment.