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
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
labels:
- "Bot"
groups:
github-actions:
patterns:
- '*'
cooldown:
default-days: 7

- package-ecosystem: "pre-commit"
directory: "/"
schedule:
interval: "daily"
Expand Down
19 changes: 9 additions & 10 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,20 @@ jobs:
fetch-depth: 0
persist-credentials: false

- name: Setup Micromamba Python
uses: mamba-org/setup-micromamba@f457c30a868e4760d3a6fcea5f25dc655b8edf39 # v3.2.1
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
environment-name: TEST
init-shell: bash
create-args: >-
python=3 --file requirements.txt --file requirements-dev.txt --channel conda-forge
python-version: "3.x"

- name: Install ctd
shell: bash -l {0}
- name: Install erddapy
run: |
python -m pip install -e . --no-deps --force-reinstall
pip install --group dev
pip install -e .

- name: Install pandoc
uses: pandoc/actions/setup@86321b6dd4675f5014c611e05088e10d4939e09e # v1.1.1

- name: Build documentation
shell: bash -l {0}
run: >
set -e
&& jupyter nbconvert --to notebook --execute notebooks/quick_intro.ipynb --output=quick_intro-output.ipynb
Expand Down
34 changes: 17 additions & 17 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,34 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [ "3.11", "3.12", "3.13", "3.14" ]
os: [ windows-latest, ubuntu-latest, macos-latest ]
python-version: [ "3.11", "3.15" ]
os: [ ubuntu-latest ]
include:
- os: windows-latest
python-version: "3.15"
- os: macos-latest
python-version: "3.15"
- os: macos-15-intel
python-version: "3.15"
fail-fast: false
permissions:
actions: none

steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Setup Micromamba Python ${{ matrix.python-version }}
uses: mamba-org/setup-micromamba@f457c30a868e4760d3a6fcea5f25dc655b8edf39 # v3.2.1
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
environment-name: TEST
init-shell: bash
create-args: >-
python=${{ matrix.python-version }} --file requirements.txt --file requirements-dev.txt --channel conda-forge
python-version: ${{ matrix.python-version }}

- name: Install ctd
shell: bash -l {0}
- name: Install library
run: |
python -m pip install -e . --no-deps --force-reinstall

- name: Tests
shell: bash -l {0}
run: |
python -m pytest -rxs tests
pip install --group dev
pip install -e .

- name: Doctests
shell: bash -l {0}
run: |
python -m pytest -s -rxs --doctest-modules -vv ctd
8 changes: 3 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ repos:
- id: check-docstring-first
- id: check-added-large-files
- id: requirements-txt-fixer
- id: file-contents-sorter
files: requirements-dev.txt

- repo: https://github.com/econchick/interrogate
rev: 1.7.0
Expand All @@ -29,7 +27,7 @@ repos:
- --ignore-words-list=pres,nd,te,afe,ue,wil,tey,te,ot,fo

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.16.10
rev: v0.17.3
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
Expand All @@ -52,12 +50,12 @@ repos:
- id: nb-strip-paths

- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.30.1
rev: v2.30.3
hooks:
- id: pyproject-fmt

- repo: https://github.com/woodruffw/zizmor-pre-commit
rev: v1.30.1
rev: v1.31.1
hooks:
- id: zizmor

Expand Down
6 changes: 3 additions & 3 deletions ctd/read.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import bz2
import collections
import datetime
import datetime as dt
import gzip
import linecache
import re
Expand Down Expand Up @@ -175,10 +175,10 @@ def _parse_seabird(lines: list, ftype: str) -> dict: # noqa: C901, PLR0912, PLR
if "NMEA UTC (Time)" in line:
time = line.split("=")[-1].strip()
# Should use some fuzzy datetime parser to make this more robust.
time = datetime.datetime.strptime(
time = dt.datetime.strptime(
time,
"%b %d %Y %H:%M:%S",
).astimezone(datetime.UTC)
).astimezone(dt.UTC)

# cnv file header ends with *END* while
if ftype == "cnv":
Expand Down
26 changes: 25 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,34 @@ classifiers = [
"Programming Language :: Python :: 3.15",
]
dynamic = [
"dependencies",
"readme",
"version",
]
dependencies = [
"chardet<7",
"gsw>=3.3",
"matplotlib",
"numpy>=2",
"pandas>=0.24",
"pandas-flavor>=0.1.2",
"scipy",
]

[dependency-groups]
dev = [
"check-manifest",
"mypy",
"nbclassic",
"nbconvert",
"nbsphinx",
"pooch",
"pre-commit",
"pytest",
"pytest-cov",
"setuptools-scm",
"sphinx",
"twine",
]
urls.documentation = "https://pyoceans.github.io/python-ctd"
urls.homepage = "https://github.com/pyoceans/python-ctd"
urls.repository = "https://github.com/pyoceans/python-ctd"
Expand Down
12 changes: 0 additions & 12 deletions requirements-dev.txt

This file was deleted.

7 changes: 0 additions & 7 deletions requirements.txt

This file was deleted.

Loading