Skip to content

Commit

Permalink
update environment
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinMohrmann committed Apr 11, 2024
1 parent 509bec7 commit 7d5c6e4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: check-ast
Expand All @@ -10,14 +10,14 @@ repos:
- id: check-added-large-files

- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
rev: 7.0.0
hooks:
- id: flake8
args: ["--max-line-length=105", "--select=C,E,F,W,B,B950", "--ignore=E203,E501,W503"]
exclude: docs/source/conf.py

- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.10.1
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
additional_dependencies: [toml]
Expand All @@ -29,7 +29,7 @@ repos:
- id: seed-isort-config

- repo: https://github.com/psf/black
rev: 22.10.0
rev: 24.3.0
hooks:
- id: black
language_version: python3
4 changes: 1 addition & 3 deletions glidertools/cleaning.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,9 +711,7 @@ def savitzky_golay(var, window_size, order, deriv=0, rate=1, interpolate=True):
y = array(arr)

# precompute coefficients
b = mat(
[[k**i for i in order_range] for k in range(-half_window, half_window + 1)]
)
b = mat([[k**i for i in order_range] for k in range(-half_window, half_window + 1)])
m = linalg.pinv(b).A[deriv] * rate**deriv * factorial(deriv)
# pad the signal at the extremes with
# values taken from the signal itself
Expand Down
6 changes: 3 additions & 3 deletions glidertools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,9 @@ def calc_dive_phase(time, depth, dive_depth_threshold=15):

phase[velocity > 0.5] = 1 # down dive
phase[velocity < -0.5] = 4 # up dive
phase[
(depth > dive_depth_threshold) & (velocity >= -0.5) & (velocity <= 0.5)
] = 3 # inflexion
phase[(depth > dive_depth_threshold) & (velocity >= -0.5) & (velocity <= 0.5)] = (
3 # inflexion
)
phase[depth <= dive_depth_threshold] = 0 # surface drift
phase[isnan(phase)] = 6
phase = phase.astype(int)
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12

## Add your email here
author_email = "[email protected]"
Expand Down

0 comments on commit 7d5c6e4

Please sign in to comment.