-
Notifications
You must be signed in to change notification settings - Fork 73
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
Store configuration parameters #891
Conversation
This PR needs some others merged first. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Long-awaited enhancement finally coming to place! Nice and simple changes. Just a few comments/curiosities
.to_frame() | ||
.reset_index() | ||
.rename(columns={"index": "variable", 0: "value"})) | ||
df_writer(file, df, "config", city_name, f"configuration for {city_name}", str_col_length=300) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just out of curiosity, why the 300 and why hardcoded?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is just long enough for our use case. There is no better reason than that, and there is no "right" value that can guarantee all potential values will fit. It's also the same value used in nexus to store the configuration, so it seemed appropriate.
9ef1740
to
4891a25
Compare
I've added a test that ensures that the configuration is propagated for two consecutive cities. Doing it in general is a bit
I've added a warning and the corresponding test |
4891a25
to
f5a401e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to repeat myself, long-awaited enhancement finally coming to place! All the suggestions were taken care of and the code is neat and clear. Great job!
f5a401e
to
db33bc0
Compare
This PR stores the city configuration in the output file for bookkeeping purposes. It also propagates the configuration from previous cities further down the chain.
Closes #837