Skip to content

Commit

Permalink
removed bad logger calls
Browse files Browse the repository at this point in the history
  • Loading branch information
jreniel committed Feb 28, 2021
1 parent e6c32d7 commit 03af0a4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 34 deletions.
14 changes: 0 additions & 14 deletions pyschism/driver/driver.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from datetime import datetime, timedelta
import logging
import os
import pathlib
import subprocess
Expand Down Expand Up @@ -183,19 +182,6 @@ def hotstart_file(self):
def makefile(self):
return self._makefile

@property
def logger(self):
try:
return self._logger
except AttributeError:
self._logger = get_logger()
return self._logger

@logger.setter
def logger(self, logger: logging.Logger):
assert isinstance(logger, logging.Logger)
self._logger = logger

@property
def _nws(self):
return self.__nws
Expand Down
25 changes: 5 additions & 20 deletions pyschism/forcing/hydrology/base.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# from abc import ABC
import logging
import os
import pathlib
from typing import Union # , Dict
from typing import Union

# import numpy as np # type: ignore[import]
import pandas as pd # type: ignore[import]
import pandas as pd


_logger = logging.getLogger(__name__)


class TimeHistoryFile:
Expand Down Expand Up @@ -224,12 +225,10 @@ def sinks(self):
class Hydrology:

def __init__(self):
self.logger.debug("Hydrology.__init__")
self._sources = Sources()
self._sinks = Sinks()

def __call__(self, model_driver):
self.logger.debug("Hydrology.__call__")
self._model_driver = model_driver

def write(
Expand All @@ -241,7 +240,6 @@ def write(
vsink: Union[str, bool] = True,
source_sink: Union[str, bool] = True,
):
self.logger.debug("Hydrology.write")

start_date = self.model_driver.param.opt.start_date
rnday = self.model_driver.param.core.rnday
Expand Down Expand Up @@ -292,16 +290,3 @@ def sinks(self):
@property
def model_driver(self):
return self._model_driver

@property
def logger(self):
try:
return self._logger
except AttributeError:
self._logger = get_logger()
return self._logger

@logger.setter
def logger(self, logger):
assert isinstance(logger, logging.Logger)
self._logger = logger

0 comments on commit 03af0a4

Please sign in to comment.