Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ blackdoc src tests examples
flake8 tests examples src --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 tests examples src --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
pytest -vv --cov py_eddy_tracker --cov-report html
python -m pytest -vv --cov py_eddy_tracker --cov-report html
2 changes: 1 addition & 1 deletion src/py_eddy_tracker/dataset/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ def get_mask(a):
if len(a.mask.shape):
m = a.mask
else:
m = ones(a.shape, dtype='bool') if a.mask else zeros(a.shape, dtype='bool')
m = ones(a.shape, dtype="bool") if a.mask else zeros(a.shape, dtype="bool")
return m

@staticmethod
Expand Down
5 changes: 4 additions & 1 deletion src/py_eddy_tracker/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
GUI class
"""

import logging
from datetime import datetime, timedelta

import matplotlib.pyplot as plt
Expand All @@ -11,6 +12,8 @@

from .generic import flatten_line_matrix, split_line

logger = logging.getLogger("pet")

try:
from pylook.axes import PlatCarreAxes
except ImportError:
Expand Down Expand Up @@ -91,7 +94,7 @@ def set_initial_values(self):
for dataset in self.datasets.values():
t0_, t1_ = dataset.period
t0, t1 = min(t0, t0_), max(t1, t1_)

logger.debug("period detected %f -> %f", t0, t1)
self.settings = dict(period=(t0, t1), now=t1)

@property
Expand Down
3 changes: 3 additions & 0 deletions src/py_eddy_tracker/observations/observation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,9 @@ def compare_units(input_unit, output_unit, name):
input_unit,
output_unit,
)
return factor
else:
return 1

@classmethod
def from_zarr(cls, handler):
Expand Down