-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement the
get_options
method for JobCalculation
What is currently defined as the `options` for a `JobCalculation`, are specific attributes that were also stored as node attributes through `set_` methods. These were called setters and are all defined explicitly, along with the corresponding getters. With the introduction of the `Process` paradigm, these could no longer be called manually by the user on the calculation node, and so the `options` dictionary was invented, to allow the user to specify these attributes. However, after a calculation was completed, there was no easy way to retrieve this dictionary with the collection of these attributes. Here we implement this method the `get_options` method which by default will only return those attributes that were explicitly set, but which can be overridden to provide the default values for those that were not explicitly set. The set of available options, along with their valid types, whether they are required docstring and more, are now defined as a dictionary member of the `AbstractJobCalculation` class. The `JobProcess` now uses this to dynamically build up the `options` port namespace in its inputs specification, just like the rest of the input ports are build dynamically based on the use methods.
- Loading branch information
Showing
17 changed files
with
388 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.