Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
nomad-FAIR
Commits
a0a1ef55
Commit
a0a1ef55
authored
May 13, 2020
by
Markus Scheidgen
Browse files
Fixed linting after pycodestyle update.
parent
76488bd1
Pipeline
#74810
passed with stages
in 39 minutes and 15 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nomad/app/api/api.py
View file @
a0a1ef55
...
...
@@ -25,6 +25,7 @@ api = Api(
validate
=
True
)
''' Provides the flask restplus api instance for the regular NOMAD api'''
# For some unknown reason it is necessary for each fr api to have a handler.
# Otherwise the global app error handler won't be called.
@
api
.
errorhandler
(
Exception
)
...
...
nomad/cli/client/update_database.py
View file @
a0a1ef55
...
...
@@ -465,16 +465,15 @@ class DbUpdater:
def
prep_list
(
self
):
if
self
.
outfile
is
not
None
and
os
.
path
.
isfile
(
self
.
outfile
):
uplist
=
self
.
_read_from_file
(
self
.
outfile
)
self
.
update_list
=
[]
self
.
is_updated_list
=
[]
for
l
in
uplist
:
if
isinstance
(
l
,
str
):
self
.
update_list
.
append
(
l
)
for
l
ist_from_file
in
self
.
_read_from_file
(
self
.
outfile
)
:
if
isinstance
(
l
ist_from_file
,
str
):
self
.
update_list
.
append
(
l
ist_from_file
)
self
.
is_updated_list
.
append
(
False
)
else
:
self
.
update_list
.
append
(
l
[
0
])
self
.
is_updated_list
.
append
(
l
[
1
])
self
.
update_list
.
append
(
l
ist_from_file
[
0
])
self
.
is_updated_list
.
append
(
l
ist_from_file
[
1
])
else
:
if
self
.
parallel
>
1
:
...
...
@@ -493,6 +492,7 @@ class DbUpdater:
if
self
.
do_download
:
self
.
download
()
@
client
.
command
(
help
=
'Synchronizes the NOMAD database with the given external database.'
)
@
click
.
argument
(
'db_name'
,
nargs
=
1
,
required
=
True
)
...
...
nomad/metainfo/legacy.py
View file @
a0a1ef55
...
...
@@ -468,7 +468,7 @@ def generate_metainfo_code(metainfo_env: LegacyMetainfoEnvironment):
def
format_paragraph
(
paragraph
,
first
):
lines
=
textwrap
.
wrap
(
text
=
paragraph
,
width
=
width
-
indent
*
4
)
lines
=
[
l
.
replace
(
'
\\
'
,
'
\\\\
'
)
for
l
in
lines
]
lines
=
[
l
ine
.
replace
(
'
\\
'
,
'
\\\\
'
)
for
l
ine
in
lines
]
return
textwrap
.
indent
(
'
\n
'
.
join
(
lines
),
' '
*
4
*
indent
,
lambda
x
:
not
(
first
and
x
.
startswith
(
lines
[
0
])))
...
...
tests/processing/test_data.py
View file @
a0a1ef55
...
...
@@ -416,6 +416,7 @@ def test_task_failure(monkeypatch, uploaded, task, proc_infra, test_user, with_e
if
task
!=
'parsing'
:
assert
'section_run'
in
calc_archive
# TODO timeout
# consume_ram, segfault, and exit are not testable with the celery test worker
@
pytest
.
mark
.
parametrize
(
'failure'
,
[
'exception'
])
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment