Skip to content

Commit

Permalink
Merge pull request #125 from categulario/fix-container
Browse files Browse the repository at this point in the history
import syntax and ckanserviceprovider version

Thanks @categulario for your valuable contribution!
  • Loading branch information
jqnatividad authored Oct 25, 2023
2 parents 06f1f49 + 3127cc0 commit 7bf1302
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions datapusher/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,21 @@ class DataPusherPlusConfig(MutableMapping):

PREFER_DMY: bool = False
PREVIEW_ROWS: int = 0

AUTO_INDEX_THRESHOLD: int = 3
AUTO_UNIQUE_INDEX:bool = True
AUTO_INDEX_DATES: bool = True

SORT_AND_DUPE_CHECK: bool = True
DEDUP: bool = False
DEFAULT_EXCEL_SHEET: int = 0

UNSAFE_PREFIX: str = "unsafe_"
RESERVED_COLNAMES: str = "_id"

ADD_SUMMARY_STATS_RESOURCE: bool = False
SUMMARY_STATS_OPTIONS: str = ""

AUTO_ALIAS: bool = True
AUTO_ALIAS_UNIQUE: bool = False

Expand Down
6 changes: 3 additions & 3 deletions datapusher/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

# CKAN-related imports
from ckanserviceprovider import web
from datapusher.config import config
from .config import config


if locale.getdefaultlocale()[0]:
Expand Down Expand Up @@ -372,7 +372,7 @@ def push_to_datastore(task_id, input, dry_run=False):
with tempfile.TemporaryDirectory() as temp_dir:
return _push_to_datastore(task_id, input, dry_run=dry_run, temp_dir=temp_dir)


def _push_to_datastore(task_id, input, dry_run=False, temp_dir=None):
handler = util.StoringHandler(task_id, input)
logger = logging.getLogger(task_id)
Expand Down Expand Up @@ -669,7 +669,7 @@ def _push_to_datastore(task_id, input, dry_run=False, temp_dir=None):
# using uchardet to determine encoding
file_encoding = subprocess.run(
[
"uchardet",
"uchardet",
tmp.name
],
check=True,
Expand Down
4 changes: 2 additions & 2 deletions datapusher/main.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import os
import ckanserviceprovider.web as web

from datapusher import jobs
from config import config
from . import jobs
from .config import config

# check whether jobs have been imported properly
assert jobs.push_to_datastore
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
install_requires=[
"APScheduler == 3.9.1.post1",
"python-dotenv",
'ckanserviceprovider == 1.1.0',
'ckanserviceprovider == 1.2.0',
'requests',
"psycopg2-binary",
'datasize',
Expand Down

0 comments on commit 7bf1302

Please sign in to comment.