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
19
Issues
19
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
1a2ecbe2
Commit
1a2ecbe2
authored
Nov 20, 2018
by
Pierre Dittgen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplifying ValidateHelper
parent
2a8cabca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
8 deletions
+2
-8
validata_ui/validate_helper.py
validata_ui/validate_helper.py
+2
-8
No files found.
validata_ui/validate_helper.py
View file @
1a2ecbe2
...
@@ -82,20 +82,14 @@ class ValidatorHelper:
...
@@ -82,20 +82,14 @@ class ValidatorHelper:
sc_info
=
cls
.
schema_dict
[
schema_code
]
sc_info
=
cls
.
schema_dict
[
schema_code
]
# Build checks configuration
# Build checks configuration
checks
=
[
'structure'
,
'schema'
]
pre_checks_conf
=
None
pre_checks_conf
=
None
if
'goodtables_checks'
in
sc_info
:
if
'goodtables_checks'
in
sc_info
:
c_checks
=
sc_info
[
'goodtables_checks'
]
pre_checks_conf
=
sc_info
[
'goodtables_checks'
].
get
(
'pre_checks'
)
if
'custom_checks'
in
c_checks
:
for
check_conf
in
c_checks
[
'custom_checks'
]:
checks
.
append
({
check_conf
[
'name'
]:
check_conf
[
'params'
]})
pre_checks_conf
=
c_checks
.
get
(
'pre_checks'
)
return
validate
(
return
validate
(
source
=
args
[
'source'
],
source
=
args
[
'source'
],
schema
=
sc
_info
[
'schema'
]
,
schema
=
sc
hema_code
,
pre_checks_conf
=
pre_checks_conf
,
pre_checks_conf
=
pre_checks_conf
,
checks
=
checks
,
force_strings
=
True
,
force_strings
=
True
,
**
{
k
:
v
for
k
,
v
in
args
.
items
()
if
k
!=
'source'
}
**
{
k
:
v
for
k
,
v
in
args
.
items
()
if
k
!=
'source'
}
)
)
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