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
8317e93b
Commit
8317e93b
authored
1 year ago
by
Bryan Brancotte
Browse files
Options
Downloads
Patches
Plain Diff
transmit output_dir param, add test to prevent regression
parent
28c891c8
No related branches found
Branches containing commit
No related tags found
1 merge request
!5
Fix output dir issue
Pipeline
#13221
passed with stage
in 45 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/workflow.py
+8
-1
8 additions, 1 deletion
src/workflow.py
tests/test_cli.py
+20
-0
20 additions, 0 deletions
tests/test_cli.py
with
28 additions
and
1 deletion
src/workflow.py
+
8
−
1
View file @
8317e93b
...
@@ -6,6 +6,7 @@ from . import constant
...
@@ -6,6 +6,7 @@ from . import constant
import
os
import
os
import
re
import
re
import
json
import
json
from
pathlib
import
Path
class
Workflow
:
class
Workflow
:
...
@@ -14,7 +15,13 @@ class Workflow:
...
@@ -14,7 +15,13 @@ class Workflow:
license
=
None
,
creativeWorkStatus
=
None
,
authors
=
None
,
license
=
None
,
creativeWorkStatus
=
None
,
authors
=
None
,
version
=
None
,
keywords
=
None
,
producer
=
None
,
version
=
None
,
keywords
=
None
,
producer
=
None
,
publisher
=
None
):
publisher
=
None
):
self
.
nextflow_file
=
Nextflow_File
(
file
,
duplicate
=
duplicate
,
display_info
=
display_info
)
self
.
nextflow_file
=
Nextflow_File
(
file
,
duplicate
=
duplicate
,
display_info
=
display_info
,
output_dir
=
output_dir
)
self
.
output_dir
=
Path
(
output_dir
)
self
.
rocrate
=
None
self
.
rocrate
=
None
self
.
name
=
name
self
.
name
=
name
self
.
datePublished
=
datePublished
self
.
datePublished
=
datePublished
...
...
This diff is collapsed.
Click to expand it.
tests/test_cli.py
0 → 100644
+
20
−
0
View file @
8317e93b
import
pathlib
import
unittest
from
tempfile
import
TemporaryDirectory
from
bioflow_insight_cli.main
import
cli
class
TestCall
(
unittest
.
TestCase
):
def
test_cli_works
(
self
):
cli
(
"
./wf_test/main.nf
"
,
render_graphs
=
True
)
cli
(
"
./wf_test/main.nf
"
,
render_graphs
=
False
)
def
test_cli_output_considered
(
self
):
with
TemporaryDirectory
()
as
my_temp_dir
:
my_results
=
pathlib
.
Path
(
my_temp_dir
)
/
"
my_results
"
self
.
assertFalse
(
my_results
.
exists
())
cli
(
"
./wf_test/main.nf
"
,
render_graphs
=
False
,
output_dir
=
str
(
my_results
))
self
.
assertTrue
(
my_results
.
exists
(),
"
Results should be there, output_dir not taken into account
"
)
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