Skip to content

Commit

Permalink
remove extraneous code
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyburnett committed Jan 19, 2022
1 parent b47db7d commit 00d8585
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 258 deletions.
8 changes: 3 additions & 5 deletions stormevents/nhc/track.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from functools import wraps
import gzip
import io
import logging
import os
from os import PathLike
import pathlib
Expand All @@ -28,9 +29,6 @@
atcf_url,
normalize_atcf_value,
)
from stormevents.utilities import get_logger

LOGGER = get_logger(__name__)


class VortexTrack:
Expand Down Expand Up @@ -262,7 +260,7 @@ def write(self, path: PathLike, overwrite: bool = False):
with open(path, 'w') as f:
f.write(str(self))
else:
LOGGER.warning(f'skipping existing file "{path}"')
logging.warning(f'skipping existing file "{path}"')

@property
def storm_id(self) -> str:
Expand Down Expand Up @@ -935,7 +933,7 @@ def get_atcf_file(
storm_id: str, file_deck: ATCF_FileDeck = None, mode: ATCF_Mode = None
) -> io.BytesIO:
url = atcf_url(file_deck=file_deck, storm_id=storm_id, mode=mode).replace('ftp://', "")
LOGGER.info(f'Downloading storm data from {url}')
logging.info(f'Downloading storm data from {url}')

hostname, filename = url.split('/', 1)

Expand Down
176 changes: 0 additions & 176 deletions stormevents/plotting.py

This file was deleted.

9 changes: 3 additions & 6 deletions stormevents/usgs/highwatermarks.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from enum import Enum
from functools import lru_cache
import logging
from os import PathLike
import re
from typing import Any, Dict, Iterable, List
Expand All @@ -9,7 +10,6 @@
from typepigeon import convert_value

from stormevents.nhc import nhc_storms
from stormevents.utilities import get_logger


class EventType(Enum):
Expand Down Expand Up @@ -279,9 +279,6 @@ def __init__(
)


LOGGER = get_logger(__name__)


@lru_cache(maxsize=None)
def usgs_highwatermark_events(
event_type: EventType = None, year: int = None, event_status: EventStatus = None,
Expand Down Expand Up @@ -357,7 +354,7 @@ def usgs_highwatermark_events(
},
)

LOGGER.info('building table of USGS high-water mark survey events')
logging.info('building table of USGS high-water mark survey events')

data = response.json()

Expand Down Expand Up @@ -386,7 +383,7 @@ def usgs_highwatermark_events(
if len(years) == 1:
event_year = years[0]
else:
LOGGER.warning(
logging.warning(
f'could not find year of "{name}" in USGS high-water mark database nor in NHC table'
)
event_year = None
Expand Down
71 changes: 0 additions & 71 deletions stormevents/utilities.py

This file was deleted.

0 comments on commit 00d8585

Please sign in to comment.