Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
psot.repository
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container 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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SOaAS
psot.repository
Commits
044a1df9
Commit
044a1df9
authored
Jan 31, 2018
by
hmueller
Browse files
Options
Downloads
Patches
Plain Diff
Replace uuid in live results with tool name (resolves #20).
parent
c5e97033
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
psot/nextflow.py
+2
-2
2 additions, 2 deletions
psot/nextflow.py
psot/scripts/split_json_into_separate_files.py
+3
-4
3 additions, 4 deletions
psot/scripts/split_json_into_separate_files.py
with
5 additions
and
6 deletions
psot/nextflow.py
+
2
−
2
View file @
044a1df9
...
...
@@ -34,7 +34,7 @@ process ${id} {
live_results_template
=
Template
(
'''
process generate_${id}_live_results {
publishDir
"
${output}/live
"
, mode:
'
copy
'
, pattern:
'
*
????????-????-????-????-????????????
.json
'
publishDir
"
${output}/live
"
, mode:
'
copy
'
, pattern:
'
*
.*
.json
'
input:
file result from ${id}_json_live
...
...
@@ -44,7 +44,7 @@ process generate_${id}_live_results {
script:
"""
split_json_into_separate_files.py --json $$result --output . --
uu
id
split_json_into_separate_files.py --json $$result --output . --
tool ${
id
}
"""
}
'''
)
...
...
This diff is collapsed.
Click to expand it.
psot/scripts/split_json_into_separate_files.py
+
3
−
4
View file @
044a1df9
...
...
@@ -4,11 +4,10 @@ import json
import
argparse
import
os
import
os.path
from
uuid
import
uuid4
parser
=
argparse
.
ArgumentParser
(
description
=
'
Split a json file with multiple documents into single files per document
'
)
parser
.
add_argument
(
'
--json
'
,
'
-j
'
,
required
=
True
,
help
=
'
json documents
'
)
parser
.
add_argument
(
'
--
uuid
'
,
'
-
u
'
,
action
=
'
store_true
'
,
help
=
'
Include a uuid in the filename.
'
)
parser
.
add_argument
(
'
--
tool
'
,
'
-
t
'
,
help
=
'
The name of the tool with which the results were generated
'
)
parser
.
add_argument
(
'
--output
'
,
'
-o
'
,
required
=
True
,
help
=
'
The name of the output directory
'
)
args
=
parser
.
parse_args
()
...
...
@@ -24,8 +23,8 @@ file = args.json
with
open
(
file
)
as
f
:
doc
=
json
.
load
(
f
)
for
k
in
doc
:
if
args
.
uuid
:
output_filename
=
k
+
"
_
"
+
str
(
uuid4
())
+
'
.json
'
if
args
.
tool
:
output_filename
=
k
+
"
.
"
+
args
.
tool
+
'
.json
'
else
:
output_filename
=
k
+
'
.json
'
with
open
(
output_dir
+
'
/
'
+
output_filename
,
'
w
'
)
as
o
:
...
...
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
sign in
to comment