Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
genotoul-bioinfo
jflow
Commits
51ed8e44
Commit
51ed8e44
authored
Sep 23, 2015
by
Jerome Mariette
Browse files
from python2 to python3 > ok from command line
parent
0606ebe7
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/cctools/compat.py
View file @
51ed8e44
...
...
@@ -6,10 +6,6 @@
__all__
=
[
'map'
]
try
:
from
itertools
import
imap
map
=
imap
except
ImportError
:
map
=
map
map
=
map
# vim: set sts=4 sw=4 ts=8 expandtab ft=python:
src/cctools/debug.py
View file @
51ed8e44
...
...
@@ -4,8 +4,6 @@
""" CCTools Debugging module """
from
__future__
import
print_function
__all__
=
[
'set_name'
,
'set_file'
,
'set_flag'
,
'print_flags'
,
'clear_flags'
]
from
_cctools
import
debug_config
,
debug_config_file
,
debug_config_file_size
...
...
src/cctools/makeflow/dag.py
View file @
51ed8e44
...
...
@@ -4,7 +4,7 @@
""" cctools Makeflow dag module """
from
__future__
import
print_function
from
cctools.compat
import
map
from
cctools.error
import
raise_parser_error
,
ParserError
...
...
@@ -82,7 +82,7 @@ class DAG(object):
self
.
exports
.
update
(
line
.
split
()[
1
:])
def
parse_node
(
self
,
line
):
output_files
,
input_files
=
map
(
lambda
s
:
set
(
shlex
.
split
(
s
))
,
line
.
split
(
':'
)
)
output_files
,
input_files
=
[
set
(
shlex
.
split
(
s
))
for
s
in
line
.
split
(
':'
)
]
command
=
None
symbol
=
None
variables
=
[]
...
...
src/cctools/makeflow/log.py
View file @
51ed8e44
...
...
@@ -4,7 +4,7 @@
""" cctools Makeflow log module """
from
__future__
import
print_function
from
cctools.compat
import
map
from
cctools.error
import
raise_parser_error
,
ParserError
...
...
@@ -572,7 +572,7 @@ class Reporter(object):
if
sort_field
:
log
.
nodes
.
sort
(
key
=
operator
.
attrgetter
(
sort_field
))
if
filters
:
nodes
=
filter
(
lambda
node
:
all
(
map
(
lambda
f
:
eval
(
f
,
{
'node'
:
node
}),
filters
)),
log
.
nodes
)
nodes
=
[
node
for
node
in
log
.
nodes
if
all
([
eval
(
f
,
{
'node'
:
node
})
for
f
in
filters
])]
else
:
nodes
=
log
.
nodes
...
...
@@ -662,7 +662,7 @@ class JSONReporter(Reporter):
if
sort_field
:
log
.
nodes
.
sort
(
key
=
operator
.
attrgetter
(
sort_field
))
if
filters
:
nodes
=
filter
(
lambda
node
:
all
(
map
(
lambda
f
:
eval
(
f
,
{
'node'
:
node
}),
filters
)),
log
.
nodes
)
nodes
=
[
node
for
node
in
log
.
nodes
if
all
([
eval
(
f
,
{
'node'
:
node
})
for
f
in
filters
])]
else
:
nodes
=
log
.
nodes
...
...
src/cctools/plot.py
View file @
51ed8e44
...
...
@@ -4,8 +4,8 @@
""" CCTools Plotting module """
from
__future__
import
print_function
from
__future__
import
with_statement
import
os
...
...
@@ -62,7 +62,7 @@ def gnuplot(plot_path, data_path, plot_format=None, plot_fields=None, **kwargs):
with
open
(
script_path
,
'w+'
)
as
fs
:
print
(
'set output "{0}"'
.
format
(
plot_path
),
file
=
fs
)
for
key
,
value
in
kwargs
.
items
():
for
key
,
value
in
list
(
kwargs
.
items
()
)
:
if
key
in
GNUPLOT_STRING_FIELDS
:
print
(
'set {0} "{1}"'
.
format
(
key
,
value
),
file
=
fs
)
else
:
...
...
src/cctools/util.py
View file @
51ed8e44
...
...
@@ -4,7 +4,7 @@
""" CCTools Utility module """
from
__future__
import
print_function
from
cctools.compat
import
map
...
...
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