Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
validata-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
23
Issues
23
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Validata
validata-ui
Commits
6dc7f077
Commit
6dc7f077
authored
Jul 23, 2019
by
Pierre Dittgen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't display column comparison anymore
parent
2cd7cbd5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
22 deletions
+1
-22
validata_ui/views.py
validata_ui/views.py
+1
-22
No files found.
validata_ui/views.py
View file @
6dc7f077
...
@@ -244,32 +244,11 @@ def create_validata_ui_report(validata_core_report, schema_dict):
...
@@ -244,32 +244,11 @@ def create_validata_ui_report(validata_core_report, schema_dict):
else
:
else
:
report
[
'table'
][
'errors'
][
'body'
].
append
(
err
)
report
[
'table'
][
'errors'
][
'body'
].
append
(
err
)
structure_errors
=
report
[
'table'
][
'errors'
][
'structure'
]
# Always displays body errors
# Always displays body errors
report
[
'table'
][
'do_display_body_errors'
]
=
True
report
[
'table'
][
'do_display_body_errors'
]
=
True
# Checks if a column comparison is needed
# Checks if a column comparison is needed
header_errors
=
(
'missing-headers'
,
'extra-headers'
,
'wrong-headers-order'
)
report
[
'table'
][
'column_comparison_needed'
]
=
False
structure_errors
=
[{
**
err
,
'in_column_comp'
:
err
[
'code'
]
in
header_errors
}
for
err
in
structure_errors
]
report
[
'table'
][
'errors'
][
'structure'
]
=
structure_errors
column_comparison_needed
=
any
(
err
[
'in_column_comp'
]
==
True
for
err
in
structure_errors
)
column_comparison_table
=
[]
if
column_comparison_needed
:
column_comparison_table
=
[]
field_names
=
[
f
[
'name'
]
for
f
in
schema_dict
.
get
(
'fields'
,
[])]
has_case_errors
=
False
for
t
in
itertools
.
zip_longest
(
headers
,
field_names
,
fillvalue
=
''
):
status
=
'ok'
if
t
[
0
]
==
t
[
1
]
else
'ko'
if
not
has_case_errors
and
status
==
'ko'
and
t
[
0
].
lower
()
==
t
[
1
].
lower
():
has_case_errors
=
True
column_comparison_table
.
append
((
*
t
,
status
))
info
=
{}
info
[
'table'
]
=
column_comparison_table
info
[
'has_missing'
]
=
len
(
headers
)
<
len
(
field_names
)
info
[
'has_case_errors'
]
=
has_case_errors
report
[
'table'
][
'column_comparison_info'
]
=
info
report
[
'table'
][
'column_comparison_needed'
]
=
column_comparison_needed
# Group body errors by row id
# Group body errors by row id
rows
=
[]
rows
=
[]
...
...
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