Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update environment #197

Merged
merged 7 commits into from
Apr 11, 2024
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 .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI
on:
push:
branches:
- "master"
- "*"
pull_request:
branches:
- "*"
Expand Down
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
7 changes: 6 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py
Expand All @@ -18,7 +24,6 @@ formats: all

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
install:
- requirements: docs/requirements.txt

Expand Down
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
# needs_sphinx = '1.0'
needs_sphinx = "1.4"

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
Expand Down Expand Up @@ -74,8 +74,8 @@

# link to github issues
extlinks = {
"issue": ("https://github.com/GliderToolsCommunity/GliderTools/issues/%s", "GH#"),
"pull": ("https://github.com/GliderToolsCommunity/GliderTools/issues/%s", "GH#"),
"issue": ("https://github.com/GliderToolsCommunity/GliderTools/issues/%s", "GH#%s"),
"pull": ("https://github.com/GliderToolsCommunity/GliderTools/issues/%s", "GH#%s"),
}

# The language for content autogenerated by Sphinx. Refer to documentation
Expand Down
4 changes: 3 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
glidertools
docutils<0.18
docutils
recommonmark
sphinx-rtd-theme
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
Loading