Skip to content

Conversation

@dwhswenson
Copy link
Member

Previously, the get function for OPSStorageLoadSingle (objects that try to guess which thing was desired if no CLI value is provided) had a high degree of complexity.

But basically, what was happening internally was that, for each specific parameter, the code tries a prioritized sequence of strategies -- places to look for an object. If that doesn't work, then it goes to the next strategy.

This has more directly implemented that idea. For each parameter, there is a set of strategies to use if the command line receives a value, and another to use if there is no command line value. The resulting code is a little longer, but easier to interpret and much more flexible/resusable. And looking at the parameter definitions, it is much easier to understand what will happen for each parameter.

@dwhswenson dwhswenson added the refactor Restructuring code; little functionality change label Mar 3, 2020
@dwhswenson dwhswenson merged commit 7471eda into openpathsampling:master Mar 3, 2020
@dwhswenson dwhswenson deleted the refactor_params branch March 3, 2020 14:38
This was referenced Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Restructuring code; little functionality change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant