Skip to content

Look for timeseries key in the dict_asset if the file is not present#881

Merged
Bachibouzouk merged 4 commits intodevfrom
fix/timeseries-import
May 27, 2021
Merged

Look for timeseries key in the dict_asset if the file is not present#881
Bachibouzouk merged 4 commits intodevfrom
fix/timeseries-import

Conversation

@Bachibouzouk
Copy link
Copy Markdown
Collaborator

@Bachibouzouk Bachibouzouk commented May 7, 2021

Fix #354

Changes proposed in this pull request:

  • If the TIMESERIES key is in the dict_values and the file under FILENAME cannot be found, the timeseries is loaded from TIMESERIES instead of throwing an error

Do the same for C0.treat_multiple_flows --> issue #882

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)

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

@Bachibouzouk Bachibouzouk force-pushed the fix/timeseries-import branch 4 times, most recently from 3831cbd to e4a0a8e Compare May 7, 2021 15:06
@Bachibouzouk Bachibouzouk requested a review from smartie2076 May 7, 2021 15:09
@smartie2076
Copy link
Copy Markdown
Collaborator

Does this adress known bug #354? Is this just about the timeseries of eg. specific generation or demand being red from the json file instead of the file, or does this also work for efficiencies?

I will have to do the review later, as the deliverable has higher prio right now.

@Bachibouzouk
Copy link
Copy Markdown
Collaborator Author

Does this adress known bug #354? Is this just about the timeseries of eg. specific generation or demand being red from the json file instead of the file, or does this also work for efficiencies?

Thanks, I could not find the issue anymore last Friday and I was pretty sure there was one!

It only works with csv files being loaded, this could apply for efficiencies if they are loaded from the filename provided under the FILE_NAME in the input json (I only wanted to get rid of the FileNotFoundError when data was already available under the TIMESERIES key in the input json

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.

It would be great if you wrote a hint at this functionality in the functions docstrings and a little pytest for this, at least for the functionality you introduced...

@Bachibouzouk Bachibouzouk force-pushed the fix/timeseries-import branch from 89f53ef to b961d66 Compare May 27, 2021 10:04
@Bachibouzouk Bachibouzouk requested a review from smartie2076 May 27, 2021 10:15
@Bachibouzouk Bachibouzouk force-pushed the fix/timeseries-import branch 3 times, most recently from 2bc94c4 to d718bc3 Compare May 27, 2021 12:48
@Bachibouzouk Bachibouzouk force-pushed the fix/timeseries-import branch from d718bc3 to 9fec3ba Compare May 27, 2021 16:23
@Bachibouzouk Bachibouzouk merged commit 1fc6847 into dev May 27, 2021
@Bachibouzouk Bachibouzouk deleted the fix/timeseries-import branch May 27, 2021 19:29
@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.

Re running the simulation with processed json file do not load timeseries correctly

2 participants