Skip to content

Commit

Permalink
Merge pull request #78 from UAL-ODIS/chore/77_logging
Browse files Browse the repository at this point in the history
Chore: Refactor logging by using redata-commons
  • Loading branch information
astrochun committed Apr 20, 2021
2 parents 651a743 + 62287fe commit b92c9ef
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 81 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ jobs:
python -m pip install --upgrade pip
python -m pip install pytest pytest-cov
python setup.py install
- name: Test with pytest
run: |
pytest --cov-report term-missing --cov-config=.coveragerc --cov=requiam_csv tests
# - name: Test with pytest
# run: |
# pytest --cov-report term-missing --cov-config=.coveragerc --cov=requiam_csv tests
- name: Test scripts
run: |
./requiam_csv/script_run --ci
3 changes: 1 addition & 2 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
sphinx>=3.0
sphinx-rtd-theme==0.5.1
sphinx-autodoc-typehints==1.11.1
numpy==1.19.5
pandas==1.2.1
redata==0.3.0
8 changes: 0 additions & 8 deletions docs/source/requiam_csv.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,3 @@ Submodules
:members:
:undoc-members:
:show-inheritance:

``logger`` module
~~~~~~~~~~~~~~~~~

.. automodule:: requiam_csv.logger
:members:
:undoc-members:
:show-inheritance:
2 changes: 1 addition & 1 deletion requiam_csv/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = "0.12.0"
__version__ = "0.12.1"

38 changes: 0 additions & 38 deletions requiam_csv/logger.py

This file was deleted.

4 changes: 2 additions & 2 deletions requiam_csv/script_run
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import configparser
import argparse

from requiam_csv.create_csv import create_csv
from requiam_csv.logger import LogClass
from redata.commons.logger import log_setup

today = date.today()

Expand Down Expand Up @@ -39,7 +39,7 @@ if __name__ == '__main__':
logfile_prefix = config.get('global', 'logfile_prefix')
logfile = f"{logfile_prefix}.{today.strftime('%Y-%m-%d')}.log"

log = LogClass(log_dir, logfile).get_logger()
log = log_setup(log_dir, logfile)

log.info("Started script_run")

Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
pandas==1.2.1
numpy==1.19.5
redata>=0.3.0
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name='requiam_csv',
version='0.12.0',
version='0.12.1',
packages=['requiam_csv'],
url='https://github.com/UAL-ODIS/ReQUIAM_csv',
license='MIT License',
Expand Down
24 changes: 0 additions & 24 deletions tests/test_logger.py

This file was deleted.

0 comments on commit b92c9ef

Please sign in to comment.