diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2019-10-03 07:41:58 +0100 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2019-10-03 07:42:39 +0100 |
commit | 3971c0347489012a5c58e332f5f6525ab052c5d8 (patch) | |
tree | 35637fa850d66546da5d183e80a54051fc87ca67 | |
parent | dfb3bd5bfcc885363d8daf031163137ebaac245d (diff) |
removed colorlog dependency
-rw-r--r-- | Pipfile | 2 | ||||
-rw-r--r-- | Pipfile.lock | 11 | ||||
-rw-r--r-- | datamaps/main.py | 14 | ||||
-rw-r--r-- | datamaps/process/cleansers.py | 4 | ||||
-rw-r--r-- | setup.py | 1 |
5 files changed, 10 insertions, 22 deletions
@@ -13,9 +13,7 @@ flake8 = "*" mypy = "*" [packages] -openpyxl = "*" bcompiler-engine = {editable = true,path = "/home/lemon/code/python/bcompiler-engine"} -colorlog = "*" python-dateutil = "*" click = "*" datamaps = {editable = true,path = "."} diff --git a/Pipfile.lock b/Pipfile.lock index a9bf28b..a954cd9 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "08d7e6946d6f15cdb46c5a51492f0700391a86e92201a082b1224f0a5a8ea6ce" + "sha256": "e486a56570f81c6dedf9066ab24883a309d73a7367a09f9c10fc5d912b2dea2d" }, "pipfile-spec": 6, "requires": { @@ -35,14 +35,6 @@ "index": "pypi", "version": "==7.0" }, - "colorlog": { - "hashes": [ - "sha256:3cf31b25cbc8f86ec01fef582ef3b840950dea414084ed19ab922c8b493f9b42", - "sha256:450f52ea2a2b6ebb308f034ea9a9b15cea51e65650593dca1da3eb792e4e4981" - ], - "index": "pypi", - "version": "==4.0.2" - }, "datamaps": { "editable": true, "path": "." @@ -64,7 +56,6 @@ "hashes": [ "sha256:340a1ab2069764559b9d58027a43a24db18db0e25deb80f81ecb8ca7ee5253db" ], - "index": "pypi", "version": "==3.0.0" }, "python-dateutil": { diff --git a/datamaps/main.py b/datamaps/main.py index 7adc84c..cce33c7 100644 --- a/datamaps/main.py +++ b/datamaps/main.py @@ -21,18 +21,18 @@ import logging from functools import partial import click - -import colorlog from click import version_option -from datamaps import __version__ +from datamaps import __version__ from engine.adapters import cli as engine_cli from engine.config import Config as engine_config from engine.use_cases.parsing import MalFormedCSVHeaderException -logger = colorlog.getLogger("datamaps") +logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) +be_logger = logging.getLogger("engine.use_cases.parsing") + # we want to pass echo func down to bcompiler-engine output_funcs = dict( click_echo_green=partial(click.secho, nl=False, fg="green"), @@ -100,9 +100,9 @@ def templates(to_master): click.style("Incorrect headers in datamap. {}.".format(e.args[0]), bold=True, reverse=True, fg="cyan")) except KeyError as e: if "Expected Sheet Missing" in e.args: - click.echo("Expected Sheet Missing: sheet Introduction in test_template.xlsm is expected from" \ - " datamap.csv. Not processing that file until fixed." \ - "Imported data from input/dft1_temp.xlsm to output/master.xlsx." \ + click.echo("Expected Sheet Missing: sheet Introduction in test_template.xlsm is expected from" + " datamap.csv. Not processing that file until fixed." + "Imported data from input/dft1_temp.xlsm to output/master.xlsx." "Finished.") else: click.secho("Not implemented yet. Try --to-master/-m flag") diff --git a/datamaps/process/cleansers.py b/datamaps/process/cleansers.py index d562f9c..d2225ce 100644 --- a/datamaps/process/cleansers.py +++ b/datamaps/process/cleansers.py @@ -1,12 +1,12 @@ import datetime +import logging import re from datetime import date from operator import itemgetter -import colorlog from dateutil.parser import parse -logger = colorlog.getLogger("bcompiler.cleanser") +logger = logging.getLogger("bcompiler.cleanser") ENDASH_REGEX = r"–" ENDASH_FIX = r"-" @@ -59,7 +59,6 @@ setup( setup_requires=['wheel'], install_requires=[ 'click', - 'colorlog', 'python-dateutil', 'bcompiler-engine @ https://github.com/hammerheadlemon/bcompiler-engine/archive/master.zip#egg=bcompiler-engine' ], |