Skip to content

Commit

Permalink
Merge pull request #18 from ocefpaf/no_maintenance_intended
Browse files Browse the repository at this point in the history
maintenance commit
  • Loading branch information
ocefpaf authored May 30, 2024
2 parents 4fb8d92 + 3b1a2fe commit 060ecad
Show file tree
Hide file tree
Showing 73 changed files with 2,388 additions and 1,738 deletions.
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# See https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/keeping-your-actions-up-to-date-with-dependabot

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
labels:
- "Bot"
groups:
github-actions:
patterns:
- '*'
49 changes: 49 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

name: Documentation

on:
pull_request:
push:
branches:
- main
release:
types:
- published

jobs:
build-docs:
runs-on: ubuntu-latest

steps:
- name: checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
with:
fetch-depth: 0

- name: Setup Micromamba
uses: mamba-org/setup-micromamba@422500192359a097648154e8db4e39bdb6c6eed7 #v1
with:
environment-name: TEST
init-shell: bash
create-args: >-
python=3 --file requirements.txt --file requirements-dev.txt --channel conda-forge
- name: Install erddapy
shell: bash -l {0}
run: |
python -m pip install -e . --no-deps --force-reinstall
- name: Build documentation
shell: bash -l {0}
run: >
set -e
&& pushd docs
&& make clean html linkcheck
&& popd
- name: Deploy
if: success() && github.event_name == 'release'
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e #v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html
36 changes: 36 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Full Tests

on:
pull_request:
push:
branches: [main]

jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
os: [windows-latest, ubuntu-latest, macos-latest]
fail-fast: false

steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4

- name: Setup Micromamba Python ${{ matrix.python-version }}
uses: mamba-org/setup-micromamba@422500192359a097648154e8db4e39bdb6c6eed7 #v1
with:
environment-name: TEST
init-shell: bash
create-args: >-
python=${{ matrix.python-version }} --file requirements.txt --file requirements-dev.txt --channel conda-forge
- name: Install seawater
shell: bash -l {0}
run: |
python -m pip install -e . --no-deps --force-reinstall
- name: Full Tests
shell: bash -l {0}
run: |
python -m pytest -rxs --doctest-modules --pyargs seawater
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
build/
docs/_build/
python-test.txt
seawater.egg-info/
seawater/_version.py
61 changes: 61 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
exclude: seawater/test/seawater_v3_3/

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: check-ast
- id: debug-statements
- id: end-of-file-fixer
- id: check-docstring-first
- id: check-added-large-files
exclude_types: [yaml]
- id: requirements-txt-fixer
- id: file-contents-sorter
files: requirements-dev.txt

- repo: https://github.com/keewis/blackdoc
rev: v0.3.9
hooks:
- id: blackdoc

- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
exclude: >
(?x)^(
.*\.yaml
)$
args:
- --ignore-words-list=pres,delt,arry

- repo: https://github.com/asottile/add-trailing-comma
rev: v3.1.0
hooks:
- id: add-trailing-comma

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.6
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
- id: ruff-format


- repo: https://github.com/tox-dev/pyproject-fmt
rev: 2.1.3
hooks:
- id: pyproject-fmt

ci:
autofix_commit_msg: |
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
autofix_prs: false
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
autoupdate_schedule: monthly
skip: []
submodules: false
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

22 changes: 18 additions & 4 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
include README.rst
include LICENSE.txt
include CHANGES.txt
include *.txt
include README.md
include pyproject.toml
include LICENSE.CSIRO
include seawater/*.py

graft seawater

prune .github
prune *.egg-info
prune docs
prune seawater/tests

exclude .coveragerc
exclude ruff.toml
exclude .gitignore
exclude .isort.cfg
exclude .pre-commit-config.yaml
exclude *.yml
exclude seawater/_version.py
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# python-seawater

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.11395.svg)](https://doi.org/10.5281/zenodo.11395)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/seawater)
[![Tests](https://github.com/pyoceans/python-seawater/actions/workflows/tests.yml/badge.svg)](https://github.com/pyoceans/python-seawater/actions/workflows/tests.yml)
![PyPI - License](https://img.shields.io/pypi/l/seawater)

[![No Maintenance Intended](https://unmaintained.tech/badge.svg)](http://unmaintained.tech/)

This is a Python re-write of the CSIRO seawater toolbox
([SEAWATER-3.3](https://www.cmar.csiro.au/datacentre/ext_docs/seawater.html))
for calculating the properties of sea water. The package uses the
formulas from Unesco's joint panel on oceanographic tables and
standards, UNESCO 1981 and UNESCO 1983 (EOS-80).

The EOS-80 library is considered now obsolete; it is provided here for
compatibility with old scripts, and to allow a smooth transition to the
new [TEOS-10](https://www.teos-10.org/).

## Warning

The Python version default output unit for sw.dist is *km* instead of
*nm*.

Here we assume pressure as the first dimension, i.e. M pressure by N
positions (See the table below). The Matlab version does some guessing
at this that we simply ignore to avoid confusions.

| **P** | **S** | **T** |
|------:|:-------:|:-------:|
| 10 | 34.5487 | 28.7856 |
| 50 | 34.7275 | 28.4329 |
| 125 | 34.8605 | 22.8103 |
| 250 | 34.6810 | 10.2600 |
| 600 | 34.5680 | 6.8863 |
| 1000 | 34.5600 | 4.4036 |

The current version was tested against the Matlab seawater v3.3
reproducing all functions and results from that release.

More information at
[http://pythonhosted.org/seawater](http://pythonhosted.org/seawater).
64 changes: 0 additions & 64 deletions README.rst

This file was deleted.

Loading

0 comments on commit 060ecad

Please sign in to comment.