Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
modelcif-converters
Manage
Activity
Members
Code
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
Analyze
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
schwede
modelcif-converters
Commits
0a3c7dc4
Commit
0a3c7dc4
authored
2 years ago
by
B13nch3n
Browse files
Options
Downloads
Patches
Plain Diff
Change error handling
parent
5646680c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
validation/validate-mmcif-file.py
+5
-17
5 additions, 17 deletions
validation/validate-mmcif-file.py
with
6 additions
and
17 deletions
.gitignore
0 → 100644
+
1
−
0
View file @
0a3c7dc4
\.DS_Store
This diff is collapsed.
Click to expand it.
validation/validate-mmcif-file.py
+
5
−
17
View file @
0a3c7dc4
...
...
@@ -423,16 +423,16 @@ class _CifCheck:
universal_newlines
=
True
,
cwd
=
cifcheck_wd
,
)
error_lst
=
[]
# get error messages on the command line
filename
=
os
.
path
.
basename
(
filepath
)
if
cps
.
returncode
!=
0
:
error_lst
=
_parse_cifcheck_stderr
(
cps
.
stderr
)
error_lst
.
extend
(
_parse_parser_file
(
filename
))
error_lst
.
extend
(
_parse_cifcheck_stderr
(
cps
.
stderr
))
error_lst
.
extend
(
_parse_parser_file
(
filepath
))
if
len
(
error_lst
)
>
0
:
raise
_CifCheckFailedError
(
cifcheck_cmd
,
error_lst
)
# get messages from diagnosis file
error_lst
.
extend
(
_parse_diag_file
(
os
.
path
.
join
(
cifcheck_wd
,
filename
)
))
error_lst
.
extend
(
_parse_diag_file
(
filepath
))
return
error_lst
...
...
@@ -625,12 +625,6 @@ def _main():
cifcheck
.
make_json_output
()
sys
.
exit
(
1
)
# do a first check of the model cif alone to make sure its actual cif
success
=
cifcheck
.
run
(
opts
.
model_cif
)
if
not
success
:
cifcheck
.
make_json_output
()
sys
.
exit
(
1
)
# check for associated files referenced by the model cif file
assoc_files
,
model_cif_data
,
entry_id_map
=
_get_associated_files
(
opts
.
model_cif
...
...
@@ -641,12 +635,6 @@ def _main():
# make sure associated files exist and merge all of them into the model
for
assoc
,
entry_id
in
assoc_files
:
assoc_path
=
os
.
path
.
join
(
opts
.
associates_dir
,
assoc
)
# CifCheck the file to make sure its actually cif, diagnosis messages do
# not matter at this point as an incomplete file is tested.
success
=
cifcheck
.
run
(
assoc_path
)
if
not
success
:
cifcheck
.
make_json_output
()
sys
.
exit
(
1
)
# merge the model.cif and the associated file
msgs
=
_merge_cif_data
(
model_cif_data
,
assoc_path
,
entry_id
,
entry_id_map
...
...
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