Skip to content

Add check for correct installedcap processing to AB_grid_pv benchmark…#831

Merged
SabineHaas merged 10 commits intodevfrom
feature/check_installedcap_processing
Mar 22, 2021
Merged

Add check for correct installedcap processing to AB_grid_pv benchmark…#831
SabineHaas merged 10 commits intodevfrom
feature/check_installedcap_processing

Conversation

@SabineHaas
Copy link
Copy Markdown
Contributor

@SabineHaas SabineHaas commented Mar 17, 2021

Address #825

Changes proposed in this pull request:

  • Add check for correct installedCap processing to AB_grid_pv benchmark test

@smartie2076 I realized too late that this check should actually be done in another benchmark test, as in AB_grid_pv the capacity is not optimized.

I quickly checked, that the test passes as well for an optimized capacity (optimizedCap=True and very low feed-in tariff to get simulation to run). So the question is answered but we might want to add the test in another benchmark test.

We can decide whether we still would like to merge this PR as it is an additional check.

The following steps were realized, as well (if applies):

  • Use in-line comments to explain your code
  • ❌ Write docstrings to your code (example docstring)
  • ❌ For new functionalities: Explain in readthedocs
  • ❌ Write test(s) for your new patch of code (pytests, assertion debug messages)
  • Update the CHANGELOG.md
  • Apply black (black . --exclude docs/)
  • Check if benchmark tests pass locally (EXECUTE_TESTS_ON=master pytest)
====================================================================================================================== short test summary info =======================================================================================================================
FAILED tests/test_input_folder_parameters.py::test_input_folder_csv_files_have_required_parameters[/home/sabine/virtualenvs/multi_vector_simulator/multi-vector-simulator/build/lib/multi_vector_simulator/package_data/input_template] - AssertionError: 
FAILED tests/test_input_folder_parameters.py::test_input_folder_csv_files_have_required_parameters[/home/sabine/virtualenvs/multi_vector_simulator/multi-vector-simulator/src/multi_vector_simulator/package_data/input_template] - AssertionError: 
FAILED tests/test_input_folder_parameters.py::test_input_folder_json_file_have_required_parameters[/home/sabine/virtualenvs/multi_vector_simulator/multi-vector-simulator/build/lib/multi_vector_simulator/package_data/inputs] - AssertionError: In path /home/sab...
FAILED tests/test_input_folder_parameters.py::test_input_folder_json_file_have_required_parameters[/home/sabine/virtualenvs/multi_vector_simulator/multi-vector-simulator/src/multi_vector_simulator/package_data/inputs] - AssertionError: In path /home/sabine/vi...
================================================================================================= 4 failed, 386 passed, 2 skipped, 77 warnings in 100.42s (0:01:40) ==================================================================================================

Ready for review @smartie2076

Please mark above checkboxes as following:

  • Open
  • Done

❌ Check not applicable to this PR

For more information on how to contribute check the CONTRIBUTING.md.

@SabineHaas SabineHaas self-assigned this Mar 17, 2021
Copy link
Copy Markdown
Collaborator

@smartie2076 smartie2076 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this is actually the correct point to add the benchmark test. I would merge it either way.

# adapt index
result_time_series_pv.index = input_time_series_pv_shortened.index

assert_series_equal(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assert_series_equal seems very handy :)

Maybe import is as pd.assert_series_equal so that it is clear that it comes from pd?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's from pandas.util.testing so it would be a bit long pd.util.testing.assert_series_equal..

@SabineHaas
Copy link
Copy Markdown
Contributor Author

===================================================================================================================== short test summary info =====================================================================================================================
FAILED tests/test_input_folder_parameters.py::test_input_folder_csv_files_have_required_parameters[/home/sabine/virtualenvs/multi_vector_simulator/multi-vector-simulator/build/lib/multi_vector_simulator/package_data/input_template] - AssertionError: 
FAILED tests/test_input_folder_parameters.py::test_input_folder_csv_files_have_required_parameters[/home/sabine/virtualenvs/multi_vector_simulator/multi-vector-simulator/src/multi_vector_simulator/package_data/input_template] - AssertionError: 
FAILED tests/test_input_folder_parameters.py::test_input_folder_json_file_have_required_parameters[/home/sabine/virtualenvs/multi_vector_simulator/multi-vector-simulator/build/lib/multi_vector_simulator/package_data/inputs] - AssertionError: In path /home/...
FAILED tests/test_input_folder_parameters.py::test_input_folder_json_file_have_required_parameters[/home/sabine/virtualenvs/multi_vector_simulator/multi-vector-simulator/src/multi_vector_simulator/package_data/inputs] - AssertionError: In path /home/sabine...
================================================================================================ 4 failed, 386 passed, 2 skipped, 77 warnings in 98.70s (0:01:38) =================================================================================================

@SabineHaas SabineHaas merged commit ee50887 into dev Mar 22, 2021
@SabineHaas SabineHaas deleted the feature/check_installedcap_processing branch March 22, 2021 08:49
@smartie2076
Copy link
Copy Markdown
Collaborator

===================================================================================================================== short test summary info =====================================================================================================================
FAILED tests/test_input_folder_parameters.py::test_input_folder_csv_files_have_required_parameters[/home/sabine/virtualenvs/multi_vector_simulator/multi-vector-simulator/build/lib/multi_vector_simulator/package_data/input_template] - AssertionError: 
FAILED tests/test_input_folder_parameters.py::test_input_folder_csv_files_have_required_parameters[/home/sabine/virtualenvs/multi_vector_simulator/multi-vector-simulator/src/multi_vector_simulator/package_data/input_template] - AssertionError: 
FAILED tests/test_input_folder_parameters.py::test_input_folder_json_file_have_required_parameters[/home/sabine/virtualenvs/multi_vector_simulator/multi-vector-simulator/build/lib/multi_vector_simulator/package_data/inputs] - AssertionError: In path /home/...
FAILED tests/test_input_folder_parameters.py::test_input_folder_json_file_have_required_parameters[/home/sabine/virtualenvs/multi_vector_simulator/multi-vector-simulator/src/multi_vector_simulator/package_data/inputs] - AssertionError: In path /home/sabine...
================================================================================================ 4 failed, 386 passed, 2 skipped, 77 warnings in 98.70s (0:01:38) =================================================================================================

Can you explain to me what those error messages are and whether they should worry me?

@SabineHaas
Copy link
Copy Markdown
Contributor Author

===================================================================================================================== short test summary info =====================================================================================================================
FAILED tests/test_input_folder_parameters.py::test_input_folder_csv_files_have_required_parameters[/home/sabine/virtualenvs/multi_vector_simulator/multi-vector-simulator/build/lib/multi_vector_simulator/package_data/input_template] - AssertionError: 
FAILED tests/test_input_folder_parameters.py::test_input_folder_csv_files_have_required_parameters[/home/sabine/virtualenvs/multi_vector_simulator/multi-vector-simulator/src/multi_vector_simulator/package_data/input_template] - AssertionError: 
FAILED tests/test_input_folder_parameters.py::test_input_folder_json_file_have_required_parameters[/home/sabine/virtualenvs/multi_vector_simulator/multi-vector-simulator/build/lib/multi_vector_simulator/package_data/inputs] - AssertionError: In path /home/...
FAILED tests/test_input_folder_parameters.py::test_input_folder_json_file_have_required_parameters[/home/sabine/virtualenvs/multi_vector_simulator/multi-vector-simulator/src/multi_vector_simulator/package_data/inputs] - AssertionError: In path /home/sabine...
================================================================================================ 4 failed, 386 passed, 2 skipped, 77 warnings in 98.70s (0:01:38) =================================================================================================

Can you explain to me what those error messages are and whether they should worry me?

It's been like that for a long time - I had mentioned that in another PR. Seems like in package_data there are wrong parameters.. maybe this is because I did not newly install MVS in this project (build directory)? On the other hand, also in src/.../package_data this happens. @Bachibouzouk do you know whether this is due to not updating MVS installation?

@smartie2076 nothing to worry for PR merging to my mind

@Bachibouzouk
Copy link
Copy Markdown
Collaborator

@Bachibouzouk do you know whether this is due to not updating MVS installation?

Yes it is likely due to not updating MVS locally :)

@SabineHaas
Copy link
Copy Markdown
Contributor Author

@Bachibouzouk do you know whether this is due to not updating MVS installation?

Yes it is likely due to not updating MVS locally :)

thanks @Bachibouzouk - will do that before next PR

@smartie2076 smartie2076 mentioned this pull request May 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants