Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BioFlow-Insight
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
shareFAIR
BioFlow-Insight
Commits
7f174dc5
Commit
7f174dc5
authored
1 year ago
by
George Marchment
Browse files
Options
Downloads
Patches
Plain Diff
fix errors
parent
7e6804eb
No related branches found
No related tags found
1 merge request
!7
Return non zero code on failure
Pipeline
#13257
failed with stage
Stage:
in 43 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/nextflow_file.py
+9
-2
9 additions, 2 deletions
src/nextflow_file.py
tests/test_process.py
+14
-13
14 additions, 13 deletions
tests/test_process.py
with
23 additions
and
15 deletions
src/nextflow_file.py
+
9
−
2
View file @
7f174dc5
...
...
@@ -91,13 +91,20 @@ class Nextflow_File(Nextflow_Building_Blocks):
if
(
self
.
first_file
):
return
self
.
output_dir
else
:
return
self
.
origin
.
get_output_dir
()
if
(
self
.
origin
==
None
):
return
self
.
output_dir
else
:
return
self
.
origin
.
get_output_dir
()
def
get_display_info
(
self
):
if
(
self
.
first_file
):
return
self
.
display_info
else
:
return
self
.
origin
.
get_display_info
()
if
(
self
.
origin
==
None
):
return
self
.
display_info
else
:
return
self
.
origin
.
get_display_info
()
def
set_name
(
self
):
...
...
This diff is collapsed.
Click to expand it.
tests/test_process.py
+
14
−
13
View file @
7f174dc5
...
...
@@ -10,20 +10,20 @@ class TestProcess(unittest.TestCase):
def
test_initialise_name
(
self
):
#DSL1
file
=
Nextflow_File
(
"
tests/ressources/process/process_DSL1.nf
"
,
display_info
=
False
)
file
=
Nextflow_File
(
"
tests/ressources/process/process_DSL1.nf
"
,
display_info
=
False
,
DSL
=
"
DSL1
"
)
file
.
initialise
()
process_DSL1
=
file
.
processes
[
0
]
self
.
assertEqual
(
process_DSL1
.
get_name
(),
"
cleanSpeciesTree
"
)
self
.
assertEqual
(
process_DSL1
.
get_alias
(),
"
cleanSpeciesTree
"
)
#DSL2
file
=
Nextflow_File
(
"
tests/ressources/process/process_DSL2.nf
"
,
display_info
=
False
)
file
=
Nextflow_File
(
"
tests/ressources/process/process_DSL2.nf
"
,
display_info
=
False
,
DSL
=
"
DSL2
"
)
file
.
initialise
()
process_DSL2
=
file
.
processes
[
0
]
self
.
assertEqual
(
process_DSL2
.
get_name
(),
"
OPENMS_FALSEDISCOVERYRATE
"
)
self
.
assertEqual
(
process_DSL2
.
get_alias
(),
"
OPENMS_FALSEDISCOVERYRATE
"
)
def
test_set_alias
(
self
):
file
=
Nextflow_File
(
"
tests/ressources/process/process_DSL2.nf
"
,
display_info
=
False
)
file
=
Nextflow_File
(
"
tests/ressources/process/process_DSL2.nf
"
,
display_info
=
False
,
DSL
=
"
DSL2
"
)
file
.
initialise
()
process_DSL2
=
file
.
processes
[
0
]
self
.
assertEqual
(
process_DSL2
.
get_alias
(),
"
OPENMS_FALSEDISCOVERYRATE
"
)
...
...
@@ -35,24 +35,24 @@ class TestProcess(unittest.TestCase):
def
test_which_DSL
(
self
):
#DSL1
file
=
Nextflow_File
(
"
tests/ressources/process/process_DSL1.nf
"
,
display_info
=
False
)
file
=
Nextflow_File
(
"
tests/ressources/process/process_DSL1.nf
"
,
display_info
=
False
,
DSL
=
"
DSL1
"
)
file
.
initialise
()
process_DSL1
=
file
.
processes
[
0
]
self
.
assertEqual
(
process_DSL1
.
which_DSL
(),
"
DSL1
"
)
#DSL2
file
=
Nextflow_File
(
"
tests/ressources/process/process_DSL2.nf
"
,
display_info
=
False
)
file
=
Nextflow_File
(
"
tests/ressources/process/process_DSL2.nf
"
,
display_info
=
False
,
DSL
=
"
DSL1
"
)
file
.
initialise
()
process_DSL2
=
file
.
processes
[
0
]
self
.
assertEqual
(
process_DSL2
.
which_DSL
(),
"
DSL2
"
)
def
test_is_initialised
(
self
):
#DSL1
file
=
Nextflow_File
(
"
tests/ressources/process/process_DSL1.nf
"
,
display_info
=
False
)
file
=
Nextflow_File
(
"
tests/ressources/process/process_DSL1.nf
"
,
display_info
=
False
,
DSL
=
"
DSL1
"
)
file
.
initialise
()
process_DSL1
=
file
.
processes
[
0
]
self
.
assertTrue
(
process_DSL1
.
is_initialised
())
#DSL2
file
=
Nextflow_File
(
"
tests/ressources/process/process_DSL2.nf
"
,
display_info
=
False
)
file
=
Nextflow_File
(
"
tests/ressources/process/process_DSL2.nf
"
,
display_info
=
False
,
DSL
=
"
DSL2
"
)
file
.
initialise
()
process_DSL2
=
file
.
processes
[
0
]
self
.
assertTrue
(
process_DSL2
.
is_initialised
())
...
...
@@ -60,12 +60,12 @@ class TestProcess(unittest.TestCase):
def
test_get_type
(
self
):
#DSL1
file
=
Nextflow_File
(
"
tests/ressources/process/process_DSL1.nf
"
,
display_info
=
False
)
file
=
Nextflow_File
(
"
tests/ressources/process/process_DSL1.nf
"
,
display_info
=
False
,
DSL
=
"
DSL1
"
)
file
.
initialise
()
process_DSL1
=
file
.
processes
[
0
]
self
.
assertEqual
(
process_DSL1
.
get_type
(),
"
Process
"
)
#DSL2
file
=
Nextflow_File
(
"
tests/ressources/process/process_DSL2.nf
"
,
display_info
=
False
)
file
=
Nextflow_File
(
"
tests/ressources/process/process_DSL2.nf
"
,
display_info
=
False
,
DSL
=
"
DSL2
"
)
file
.
initialise
()
process_DSL2
=
file
.
processes
[
0
]
self
.
assertEqual
(
process_DSL2
.
get_type
(),
"
Process
"
)
...
...
@@ -74,7 +74,7 @@ class TestProcess(unittest.TestCase):
def
test_get_structure
(
self
):
#DSL1
file
=
Nextflow_File
(
"
tests/ressources/process/process_DSL1.nf
"
,
display_info
=
False
)
file
=
Nextflow_File
(
"
tests/ressources/process/process_DSL1.nf
"
,
display_info
=
False
,
DSL
=
"
DSL1
"
)
file
.
initialise
()
process_DSL1
=
file
.
processes
[
0
]
dico
=
{}
...
...
@@ -82,10 +82,11 @@ class TestProcess(unittest.TestCase):
dico
[
'
edges
'
]
=
[]
dico
[
'
subworkflows
'
]
=
{}
process_DSL1
.
get_structure
(
dico
)
dico_true
=
{
'
nodes
'
:
[{
'
id
'
:
str
(
process_DSL1
),
'
name
'
:
'
cleanSpeciesTree
'
,
'
shape
'
:
'
ellipse
'
,
'
xlabel
'
:
''
}],
'
edges
'
:
[],
'
subworkflows
'
:
{}}
dico_true
=
{
'
nodes
'
:
[{
'
id
'
:
str
(
process_DSL1
),
'
name
'
:
'
cleanSpeciesTree
'
,
'
shape
'
:
'
ellipse
'
,
'
xlabel
'
:
''
,
'
fillcolor
'
:
''
}],
'
edges
'
:
[],
'
subworkflows
'
:
{}}
self
.
assertEqual
(
dico
,
dico_true
)
#DSL2
file
=
Nextflow_File
(
"
tests/ressources/process/process_DSL2.nf
"
,
display_info
=
False
)
file
=
Nextflow_File
(
"
tests/ressources/process/process_DSL2.nf
"
,
display_info
=
False
,
DSL
=
"
DSL2
"
)
file
.
initialise
()
process_DSL2
=
file
.
processes
[
0
]
dico
=
{}
...
...
@@ -97,7 +98,7 @@ class TestProcess(unittest.TestCase):
self
.
assertEqual
(
dico
,
dico_true
)
def
test_
(
self
):
file
=
Nextflow_File
(
"
tests/ressources/process/process_DSL1.nf
"
,
display_info
=
False
)
file
=
Nextflow_File
(
"
tests/ressources/process/process_DSL1.nf
"
,
display_info
=
False
,
DSL
=
"
DSL1
"
)
file
.
initialise
()
process_DSL1
=
file
.
processes
[
0
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment