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
7c006c4a
Commit
7c006c4a
authored
1 year ago
by
Bienchen
Browse files
Options
Downloads
Patches
Plain Diff
Add 'errors' to report
parent
94deb4c5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
validation/validate-mmcif-file.py
+24
-7
24 additions, 7 deletions
validation/validate-mmcif-file.py
with
24 additions
and
7 deletions
validation/validate-mmcif-file.py
+
24
−
7
View file @
7c006c4a
...
@@ -709,13 +709,6 @@ class _CifCheck:
...
@@ -709,13 +709,6 @@ class _CifCheck:
Be aware, that cuts away the majority of the messages. But solving those
Be aware, that cuts away the majority of the messages. But solving those
issues first, may already repair a mmCIF file.
"""
issues first, may already repair a mmCIF file.
"""
not_implemented
=
[
"
errors
"
]
for
category
in
not_implemented
:
if
len
(
self
.
check_results
[
category
])
>
0
:
raise
NotImplementedError
(
f
"
Results for category
'
{
category
}
'
not yet supported in
"
+
"
report.
"
)
print
(
"
Report
"
)
print
(
"
Report
"
)
print
(
"
======
"
)
print
(
"
======
"
)
print
(
f
"
Status of check:
{
self
.
check_results
[
'
status
'
]
}
"
)
print
(
f
"
Status of check:
{
self
.
check_results
[
'
status
'
]
}
"
)
...
@@ -814,6 +807,30 @@ class _CifCheck:
...
@@ -814,6 +807,30 @@ class _CifCheck:
for
line
in
sorted
(
rprt
[
"
parchild_mm
"
]):
for
line
in
sorted
(
rprt
[
"
parchild_mm
"
]):
print
(
f
"
{
line
}
"
)
print
(
f
"
{
line
}
"
)
# condense 'other' errors
rprt
=
{
"
missing_files
"
:
{},
}
for
line
in
self
.
check_results
[
"
errors
"
]:
match
=
re
.
match
(
r
"
ma_entry_associated_files.file_url
'
(?P<arc>.*)
'
is missing ma_associated_archive_file_details.file_path
'
(?P<fle>.*)
'"
,
line
)
if
match
is
not
None
:
try
:
rprt
[
"
missing_files
"
][
match
.
group
(
'
arc
'
)].
append
(
match
.
group
(
'
fle
'
))
except
KeyError
:
rprt
[
"
missing_files
"
][
match
.
group
(
'
arc
'
)]
=
[
match
.
group
(
'
fle
'
)]
continue
# Unmatched lines need to be added to above evaluation
raise
RuntimeError
(
f
'
Unmatched error line found:
\n
"""
{
line
}
"""'
)
# print above evaluation in the report
print
(
"
Other issues:
"
)
if
len
(
rprt
[
"
missing_files
"
])
>
0
:
print
(
"
Missing (archive) )files:
"
)
for
arc
,
fles
in
rprt
[
"
missing_files
"
].
items
():
print
(
f
"
{
arc
}
:
"
)
for
line
in
fles
:
print
(
f
"
{
line
}
"
)
# print erros/ messages caught
# print erros/ messages caught
print
(
"
Errors by running CifCheck:
"
)
print
(
"
Errors by running CifCheck:
"
)
for
line
in
self
.
check_results
[
"
cifcheck-errors
"
]:
for
line
in
self
.
check_results
[
"
cifcheck-errors
"
]:
...
...
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