Skip to content

Commit

Permalink
Merge pull request ckan#44 from qld-gov-au/QOLSVC-1280-xloader-fix-2
Browse files Browse the repository at this point in the history
QOLSVC-1280 decouple tabulator as its just used to get a list of exte…
  • Loading branch information
duttonw authored Apr 3, 2023
2 parents f01c40c + c8b4f03 commit 47c249e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
22 changes: 21 additions & 1 deletion ckanext/validation/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,32 @@
import json

import ckantoolkit as tk
from tabulator.config import PARSERS


import ckan.plugins as plugins

from ckanext.validation.interfaces import IDataValidation

try:
from tabulator.config import PARSERS
except NameError:
# Point in time list of parsers from v1.53.5 if library Tabulator not loaded
PARSERS = {
'csv': 'tabulator.parsers.csv.CSVParser',
'datapackage': 'tabulator.parsers.datapackage.DataPackageParser',
'gsheet': 'tabulator.parsers.gsheet.GsheetParser',
'html': 'tabulator.parsers.html.HTMLTableParser',
'inline': 'tabulator.parsers.inline.InlineParser',
'json': 'tabulator.parsers.json.JSONParser',
'jsonl': 'tabulator.parsers.ndjson.NDJSONParser',
'ndjson': 'tabulator.parsers.ndjson.NDJSONParser',
'ods': 'tabulator.parsers.ods.ODSParser',
'sql': 'tabulator.parsers.sql.SQLParser',
'tsv': 'tabulator.parsers.tsv.TSVParser',
'xls': 'tabulator.parsers.xls.XLSParser',
'xlsx': 'tabulator.parsers.xlsx.XLSXParser',
}

SUPPORTED_FORMATS_KEY = u"ckanext.validation.formats"
DEFAULT_SUPPORTED_FORMATS = [u'csv', u'xls', u'xlsx']
DEFAULT_VALIDATION_OPTIONS_KEY = "ckanext.validation.default_validation_options"
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ckantoolkit>=0.0.3
goodtables==1.5.1
tabulator==1.53.5
six>=1.13.0
-e git+https://github.com/ckan/[email protected]#egg=ckanext-scheming

0 comments on commit 47c249e

Please sign in to comment.