Skip to content

Commit

Permalink
Require bemserver-core 0.17
Browse files Browse the repository at this point in the history
  • Loading branch information
lafrech committed Feb 12, 2024
1 parent f840397 commit a77693d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 16 deletions.
18 changes: 8 additions & 10 deletions requirements/install.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ apispec[marshmallow]==6.3.0
# via
# bemserver-api (setup.py)
# flask-smorest
argon2-cffi==21.3.0
argon2-cffi==23.1.0
# via bemserver-core
argon2-cffi-bindings==21.2.0
# via argon2-cffi
async-timeout==4.0.2
# via redis
bemserver-core==0.16.2
bemserver-core==0.17.0
# via bemserver-api (setup.py)
billiard==4.1.0
billiard==4.2.0
# via celery
blinker==1.6.2
# via flask
celery==5.3.0
celery==5.3.4
# via bemserver-core
certifi==2023.7.22
# via requests
Expand Down Expand Up @@ -65,7 +65,7 @@ itsdangerous==2.1.2
# via flask
jinja2==3.1.3
# via flask
kombu==5.3.0
kombu==5.3.5
# via celery
mako==1.2.4
# via alembic
Expand All @@ -85,23 +85,21 @@ marshmallow-sqlalchemy==0.29.0
# via bemserver-api (setup.py)
numpy==1.24.3
# via pandas
oso==0.27.0
oso==0.27.3
# via bemserver-core
packaging==23.1
# via
# apispec
# marshmallow
# marshmallow-sqlalchemy
# webargs
pandas==2.0.2
# via bemserver-core
passlib==1.7.4
pandas==2.2.0
# via bemserver-core
pint==0.22
# via bemserver-core
prompt-toolkit==3.0.38
# via click-repl
psycopg==3.1.9
psycopg==3.1.18
# via bemserver-core
pycparser==2.21
# via cffi
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"flask_smorest>=0.43.0,<0.44",
"apispec>=6.1.0,<7.0",
"flask-httpauth>=4.7.0,<5.0",
"bemserver-core>=0.16.2,<0.17",
"bemserver-core>=0.17.0,<0.18",
],
packages=find_packages(exclude=["tests*"]),
include_package_data=True,
Expand Down
2 changes: 1 addition & 1 deletion tests/resources/analysis/test_energy_consumption.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def _create_data(self, campaign_id, campaign_scope_id):
start_dt = dt.datetime(2020, 1, 1, 0, 0, tzinfo=dt.timezone.utc)
end_dt = dt.datetime(2020, 1, 1, 2, 0, tzinfo=dt.timezone.utc)

timestamps = pd.date_range(start_dt, end_dt, inclusive="left", freq="H")
timestamps = pd.date_range(start_dt, end_dt, inclusive="left", freq="h")

# Create timeseries and timeseries data
ds_clean = TimeseriesDataState.get(name="Clean").first()
Expand Down
8 changes: 4 additions & 4 deletions tests/resources/test_sites.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ def test_sites_get_degree_days(
ds_clean = TimeseriesDataState.get(name="Clean").first()

index = pd.date_range(
start_d, end_d, freq="H", tz="UTC", inclusive="left", name="timestamp"
start_d, end_d, freq="h", tz="UTC", inclusive="left", name="timestamp"
)
weather_df = pd.DataFrame(index=index)
weather_df[air_temp_ts_id] = index.month
Expand All @@ -564,7 +564,7 @@ def test_sites_get_degree_days(

# Introduce a bias to check that computation method uses min/max
weather_df[air_temp_ts_id] += 5
weather_df[air_temp_ts_id][index.hour == 1] -= 10
weather_df.loc[index.hour == 1, air_temp_ts_id] -= 10

tsdio.set_timeseries_data(weather_df, data_state=ds_clean)
db.session.commit()
Expand Down Expand Up @@ -660,7 +660,7 @@ def test_sites_get_degree_days(
assert ret.status_code == 200
ret_data = ret.json

expected_y = expected_d.resample("AS").sum()
expected_y = expected_d.resample("YS").sum()
loaded_dd = pd.Series(ret_data["degree_days"])
loaded_dd.index = pd.DatetimeIndex(loaded_dd.index)
assert_series_equal(
Expand Down Expand Up @@ -790,7 +790,7 @@ def test_sites_get_degree_days_as_user(self, app, users, sites, timeseries):
ds_clean = TimeseriesDataState.get(name="Clean").first()

index = pd.date_range(
start_d, end_d, freq="H", tz="UTC", inclusive="left", name="timestamp"
start_d, end_d, freq="h", tz="UTC", inclusive="left", name="timestamp"
)
weather_df = pd.DataFrame(index=index)
weather_df[air_temp_ts_id] = index.month
Expand Down

0 comments on commit a77693d

Please sign in to comment.