-
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.
The `CalcJob` subclass of `Process` adds inputs that are specific to its implementation, namely `code`, `metadata.computer` and `metadata.options`. Nevertheless, these were being handled in the `Process` class making assumptions about the exact type of the `code` input. The code is refactored to move the `CalcJob` specific logic to its implementation. The signature of `_setup_metadata` had to be changed to pass in a copy of the metadata inputs as the subclass needs to pop its custom keys such that `Process` won't raise on keys it doesn't recognize. The `_setup_inputs` implementation on `CalcJob` is simplified as it now just needs to set the `Computer` of the `Code` if one hasn't already been set in the `_setup_metadata` which is called before it.
- Loading branch information
Showing
3 changed files
with
31 additions
and
15 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