-
Notifications
You must be signed in to change notification settings - Fork 9
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
Define runtime parameters in Python #253
Conversation
src/specfem2d.cpp
Outdated
@@ -95,7 +95,13 @@ void execute(const std::string ¶meter_file, const std::string &default_file, | |||
// Read parameter file | |||
// -------------------------------------------------------------- | |||
auto start_time = std::chrono::system_clock::now(); | |||
specfem::runtime_configuration::setup setup(parameter_file, default_file); | |||
specfem::runtime_configuration::setup setup(parameter_file, default_file, | |||
#ifdef SPECFEMPP_BINDING_PYTHON |
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.
This becomes tough to read IMO. We need to come up with a better way
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.
This should be changed after we template YAML::Node
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.
Check comments on setup.hpp
include/parameter_parser/setup.hpp
Outdated
*/ | ||
setup(const std::string ¶meter_file, const std::string &default_file); | ||
setup(const std::string ¶meter_file, const std::string &default_file, |
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.
If we provide 2 constructors.
setup(const std::string ¶meter_file, const std::string &default_file)
This gets called by specfem2d.cpp driver codetemplate<typename Dictionary> setup(const Dictionary &Dictionary)
this gets called by 1 (function listed above) and by python as setup(pybind::dict)
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.
See comments
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.
LGTM
Description
Implements runtime configuration and add pip dependencies.
Issue Number
#231
Checklist
Please make sure to check developer documentation on specfem docs.
[] I ran the code through pre-commit to check style
[] My code passes all the integration tests
[] I have added sufficient unittests to test my changes
[] I have added/updated documentation for the changes I am proposing
[] I have updated CMakeLists to ensure my code builds
[] My code builds across all platforms