Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
akariv committed Sep 14, 2022
1 parent cf4b11f commit 37184a4
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions datacity_server/processors/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import copy

from dataflows import Flow, ResourceWrapper, PackageWrapper, load, dump_to_sql
from dataflows import Flow, ResourceWrapper, PackageWrapper
from dgp.core.base_enricher import BaseEnricher, DatapackageJoiner
from dgp.config.consts import RESOURCE_NAME, CONFIG_PRIMARY_KEY, \
CONFIG_TAXONOMY_CT, CONFIG_TAXONOMY_ID
Expand Down Expand Up @@ -36,19 +34,17 @@ def postflow(self):
self.remove_dups(key_field_names)
)


class MunicipalityNameToCodeEnricher(DatapackageJoiner):

REQUIRED_COLUMN_TYPES = ['municipality:name']
PROHIBITED_COLUMN_TYPES = ['municipality:code']
REF_DATAPACKAGE = 'http://next.obudget.org/datapackages/' +\
REF_DATAPACKAGE = 'https://next.obudget.org/datapackages/' +\
'lamas-municipal-data/datapackage.json'
REF_KEY_FIELDS = ['name_municipality']
REF_FETCH_FIELDS = ['symbol_municipality_2015']
SOURCE_KEY_FIELDS = ['municipality-name']
TARGET_FIELD_COLUMNTYPES = ['municipality:code']


class FilterEmptyFields(BaseEnricher):

FIELDS_TO_CHECK = {}
Expand Down

0 comments on commit 37184a4

Please sign in to comment.