Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
pep8
Browse files Browse the repository at this point in the history
prereq
  • Loading branch information
scivision committed Aug 15, 2018
1 parent def9d42 commit 737170c
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ clone_depth: 3

build: off

init:
- cmd: set PATH=%PY_DIR%;%PY_DIR%\Scripts;%PATH%

install: pip install -e .[tests]

test_script: pytest -rsv
Expand Down
7 changes: 2 additions & 5 deletions microbarometer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from pathlib import Path
from datetime import datetime, timedelta
from .io import load
from .io import load # noqa: F401


def t2dt(dat):
"""convert SEED time to Python datetime"""
Expand All @@ -17,6 +17,3 @@ def datetimerange(start: datetime, end: datetime, step: timedelta) -> list:
assert isinstance(step, timedelta)

return [start + i*step for i in range((end-start) // step)]



4 changes: 2 additions & 2 deletions microbarometer/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ def load(fn: Path, tlim: Tuple[datetime, datetime]=None) -> np.ndarray:
dat = readseed(fn, tlim=tlim)
else:
raise ValueError(f'unknown format file: {fn}')

return dat


def readasc(fn: Path, Nrows: int) -> pandas.DataFrame:
"""Use Pandas to load 100s of MB SAC_ASC text data."""
Expand Down
2 changes: 0 additions & 2 deletions pyproject.toml

This file was deleted.

2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ setup_requires =
include_package_data = True
packages = find:
install_requires =
cartopy
pandas

[options.extras_require]
Expand All @@ -41,6 +40,7 @@ plot =
matplotlib
io =
obspy
cartopy

[options.entry_points]
console_scripts =
Expand Down
3 changes: 2 additions & 1 deletion tests/test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
R = Path(__file__).parent
ascfn = R/'sample.asc'


def test_load():
dat = pm.load(ascfn)

assert dat.iloc[123,4] == approx(963895)
assert dat.iloc[123, 4] == approx(963895)


if __name__ == '__main__':
Expand Down

0 comments on commit 737170c

Please sign in to comment.