Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Validata
Validata Core
Commits
bb1009b4
Commit
bb1009b4
authored
May 06, 2020
by
Pierre Dittgen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'inspector-init-options' into 'master'
Pass options to Inspector's init See merge request
!10
parents
c8d69513
2ae924e8
Pipeline
#1946
passed with stage
in 1 minute and 45 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
validata_core/__init__.py
validata_core/__init__.py
+15
-5
No files found.
validata_core/__init__.py
View file @
bb1009b4
...
...
@@ -355,11 +355,21 @@ def validate(source, schema, with_repair=True, **options):
if
custom_checks_config
:
for
custom_check_conf
in
custom_checks_config
:
checks
.
append
({
custom_check_conf
[
'name'
]:
custom_check_conf
[
'params'
]})
inspector
=
goodtables
.
Inspector
(
checks
=
checks
,
skip_checks
=
[
'non-matching-header'
,
'extra-header'
,
'missing-header'
],
row_limit
=
VALIDATA_MAX_ROWS
,
)
inspector_options_keys
=
[
'checks'
,
'skip_checks'
,
'infer_schema'
,
'infer_fields'
,
'order_fields'
,
'error_limit'
,
'table_limit'
,
'row_limit'
,
]
inspector_options
=
{
**
{
'checks'
:
checks
,
'skip_checks'
:
[
'non-matching-header'
,
'extra-header'
,
'missing-header'
],
'row_limit'
:
VALIDATA_MAX_ROWS
,
},
**
{
k
:
v
for
k
,
v
in
options
.
items
()
if
k
in
inspector_options_keys
}
}
inspector
=
goodtables
.
Inspector
(
**
inspector_options
)
options
=
{
**
base_options
}
if
with_repair
:
...
...
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