-
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.
CalcJob
: Fully abstract interaction with AbstractCode
in presubmit (
#5666) The `CalcJob.presubmit` has been refactored recently after the renaming and refactoring of the `Code` class into the `AbstractCode` abstract base class, and the concrete implementations `InstalledCode` and `PortableCode`. The goal was to have `CalcJob.presubmit` only interact with the official interface of `AbstractCode`. This would allow other implementations to be made that continue to work. There was one place remaining in `CalcJob.presubmit` that still had code specific to the type of `AbstractCode` being used in the calculation. For the `PortableCode` it was verifying that the files created by the `CalcJob` plugin didn't create a file in the sandbox folder that over- lapped with the relative filepath of the executable. This check is now moved to the `validate_working_directory` method on the `AbstractCode` class, which is called by `CalcJob.presubmit` making it fully independent of the code subclass being used. Co-authored-by: Sebastiaan Huber <mail@sphuber.net>
- Loading branch information
Showing
3 changed files
with
34 additions
and
4 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