-
Notifications
You must be signed in to change notification settings - Fork 63
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
Add support for a user-specified root output directory #531
Conversation
9a0b5f5
to
671e7f5
Compare
Okay, one thing off the bat... This probably needs to move up one level, outside of
|
if (output_root != boost::none && *output_root != "") { | ||
// Check if the path ends with a trailing slash, | ||
// otherwise add it. | ||
return output_root->back() == '/' |
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.
👏
Huh... interestingly, if Technically, this is probably consistent with current behavior if the current working directory does not exist, which I'm pretty sure can happen... so this doesn't need to be fixed... but I think I will open an issue/TODO to at least warn the user if the output location does not exist, since this is far more likely when it is specified in the config file. |
This PR resolves #374. After discussion with @mattw-nws, this PR instead only adds support for a user-specified root directory. Within this directory, catchments and nexi will continue to be outputted as
{id}.csv
and{id}_output.csv
, respectively. Any example of the new syntax is as follows:Based on my comment on #374, I implemented the alternative syntax because I didn't see any benefit to the initial syntax. This is fairly easy to modify though, so if the initial syntax fits better, we can pivot to that.Additions
realization::Formulation_Manager
:get_output_root
Changes
src/NGen.cpp
to usemanager->get_output_root
when writing nexus outputs.src/core/HY_Features{_MPI}.cpp
to useformulations->get_output_root
when setting the output stream.Formulation_Manager_Test:basic_reading_1
.Testing
Todos
doc/REALIZATION_CONFIGURATION.md
)Checklist
Target Environment support