Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
openmole
openmole
Commits
262e4870
Commit
262e4870
authored
Jul 07, 2021
by
Juste Raimbault
Browse files
[Plugin] JuliaTask: fix
parent
0cc11899
Changes
1
Hide whitespace changes
Inline
Side-by-side
openmole/plugins/org.openmole.plugin.task.julia/src/main/scala/org/openmole/plugin/task/julia/JuliaTask.scala
View file @
262e4870
...
...
@@ -27,13 +27,13 @@ import org.openmole.plugin.task.container
*/
object
JuliaTask
{
implicit
def
isTask
:
InputOutputBuilder
[
Python
Task
]
=
InputOutputBuilder
(
Python
Task
.
config
)
implicit
def
isExternal
:
ExternalBuilder
[
Python
Task
]
=
ExternalBuilder
(
Python
Task
.
external
)
implicit
def
isTask
:
InputOutputBuilder
[
Julia
Task
]
=
InputOutputBuilder
(
Julia
Task
.
config
)
implicit
def
isExternal
:
ExternalBuilder
[
Julia
Task
]
=
ExternalBuilder
(
Julia
Task
.
external
)
implicit
def
isInfo
=
InfoBuilder
(
info
)
implicit
def
isMapped
=
MappedInputOutputBuilder
(
Python
Task
.
mapped
)
implicit
def
isMapped
=
MappedInputOutputBuilder
(
Julia
Task
.
mapped
)
def
installCommands
(
install
:
Seq
[
String
],
libraries
:
Seq
[
String
])
:
Vector
[
String
]
=
{
(
install
++
"julia -e 'using Pkg; Pkg.add.([ "
+
libraries
.
dropRight
(
1
).
map
{
l
⇒
"\""
+
l
+
"\"
,
"
}.
reduce
(+)+
"\""
+
libraries
.
last
+
"\""
+
"])'"
).
toVector
(
install
++
Seq
(
"julia -e 'using Pkg; Pkg.add.([ "
+
libraries
.
map
{
l
⇒
"\""
+
l
+
"\""
}.
mkString
(
","
)
+
"])'"
)
).
toVector
}
def
apply
(
...
...
@@ -54,7 +54,7 @@ object JuliaTask {
new
JuliaTask
(
script
=
script
,
arguments
=
arguments
.
option
,
image
=
ContainerTask
.
prepare
(
installContainerSystem
,
DockerImage
(
"julia"
),
installCommands
(
install
,
libraries
)),
image
=
ContainerTask
.
prepare
(
installContainerSystem
,
DockerImage
(
"julia"
),
installCommands
(
install
,
Seq
(
"JSON"
)++
libraries
)),
errorOnReturnValue
=
errorOnReturnValue
,
returnValue
=
returnValue
,
stdOut
=
stdOut
,
...
...
@@ -65,8 +65,7 @@ object JuliaTask {
config
=
InputOutputConfig
(),
external
=
External
(),
info
=
InfoConfig
(),
mapped
=
MappedInputOutputConfig
(),
major
=
major
mapped
=
MappedInputOutputConfig
()
)
set
(
outputs
+=
(
Seq
(
returnValue
.
option
,
stdOut
.
option
,
stdErr
.
option
).
flatten
:
_
*
))
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment