-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #290 from MineralsCloud:ConvergenceTestWorkflow
Rewrite `ConvergenceTestWorkflow`
- Loading branch information
Showing
5 changed files
with
129 additions
and
108 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using Thinkers: Thunk | ||
using EasyConfig: Config as Conf | ||
|
||
using .Config: StaticConfig, expand | ||
|
||
import ExpressBase: think | ||
|
||
think(action::CreateInput, conf::Conf) = | ||
collect(Thunk(action(conf.template)) for _ in Base.OneTo(length(conf.at))) | ||
think(action::WriteInput, conf::Conf) = | ||
collect(Thunk(action(file)) for file in first.(conf.io)) | ||
think(action::ExtractData, conf::Conf) = | ||
collect(Thunk(action, file) for file in last.(conf.io)) | ||
think(action::SaveData, conf::Conf) = Thunk(action(conf.data.raw)) | ||
function think(action::Action{T}, config::StaticConfig) where {T} | ||
config = expand(config, T()) | ||
return think(action, config::Conf) | ||
end |