Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue500 update data manager #645

Merged
merged 5 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion data/data_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,8 @@ def load_data_and_jsons(self):

# Get zone and boundary data keys allowed
zon_keys, bou_keys = self._get_zone_and_boundary_keys()

weather_keys = list(self.categories['weather'].keys())

# Initialize test case data frame
self.case.data = \
pd.DataFrame(index=index).rename_axis('time')
Expand All @@ -436,6 +437,13 @@ def load_data_and_jsons(self):
for f in files:
df = pd.read_csv(z_fmu.open(f))
cols = df.keys()

# Check if all weather variables are included in weather.csv
if 'weather' in f:
if not set(cols) <= set(weather_keys):
warnings.warn('The file weather.csv is missing '\
'the following variables '+str(set(weather_keys).difference(set(cols)))+'.', Warning)

if 'time' in cols:
for col in cols.drop('time'):
# Check that column has any of the allowed data keys
Expand Down
2 changes: 1 addition & 1 deletion releasenotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Released on xx/xx/xxxx.

- Update pyfmi version from 2.11 to 2.12 and miniconda version from py310_23.1.0-1-Linux-x86_64 to py310_24.3.0-0-Linux-x86_64. This is for [#643](https://github.com/ibpsa/project1-boptest/issues/643).
- Remove support and unit testing of example python controllers using Python 2. This is for [#634](https://github.com/ibpsa/project1-boptest/issues/634).

- Add a warning message in ``data/data_manager.py`` that is displayed if any of the weather variables in ``data/categories.json`` is not in ``wrapped.fmu/resources/weather.csv``. This is for [#500](https://github.com/ibpsa/project1-boptest/issues/500).
dhblum marked this conversation as resolved.
Show resolved Hide resolved

## BOPTEST v0.6.0

Expand Down