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
nomad-lab
nomad-FAIR
Commits
48d0b33b
Commit
48d0b33b
authored
Aug 21, 2019
by
Markus Scheidgen
Browse files
Configurable parser matching size.
parent
12177199
Pipeline
#54106
passed with stages
in 19 minutes and 28 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nomad/config.py
View file @
48d0b33b
...
...
@@ -199,6 +199,7 @@ release = 'devel'
domain
=
'DFT'
service
=
'unknown nomad service'
auxfile_cutoff
=
100
parser_matching_size
=
9128
console_log_level
=
logging
.
WARNING
...
...
nomad/parsing/__init__.py
View file @
48d0b33b
...
...
@@ -116,7 +116,7 @@ def match_parser(mainfile: str, upload_files: Union[str, files.StagingUploadFile
compression
,
open_compressed
=
_compressions
.
get
(
f
.
read
(
3
),
(
None
,
open
))
with
open_compressed
(
mainfile_path
,
'rb'
)
as
cf
:
buffer
=
cf
.
read
(
2048
)
buffer
=
cf
.
read
(
config
.
parser_matching_size
)
mime_type
=
magic
.
from_buffer
(
buffer
,
mime
=
True
)
for
parser
in
parsers
:
...
...
Write
Preview
Supports
Markdown
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