marine-extremes 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- marine_extremes-0.1.0/.github/workflows/ci.yml +35 -0
- marine_extremes-0.1.0/.github/workflows/release.yml +145 -0
- marine_extremes-0.1.0/.gitignore +61 -0
- marine_extremes-0.1.0/CHANGELOG.md +13 -0
- marine_extremes-0.1.0/CITATION.cff +38 -0
- marine_extremes-0.1.0/Cargo.lock +280 -0
- marine_extremes-0.1.0/Cargo.toml +22 -0
- marine_extremes-0.1.0/LICENSE +21 -0
- marine_extremes-0.1.0/PKG-INFO +318 -0
- marine_extremes-0.1.0/README.md +262 -0
- marine_extremes-0.1.0/README.zh-CN.md +262 -0
- marine_extremes-0.1.0/benchmarks/bench_global_scale.py +95 -0
- marine_extremes-0.1.0/examples/quickstart.py +89 -0
- marine_extremes-0.1.0/pyproject.toml +76 -0
- marine_extremes-0.1.0/python/marine_extremes/__init__.py +37 -0
- marine_extremes-0.1.0/python/marine_extremes/api.py +395 -0
- marine_extremes-0.1.0/python/marine_extremes/baselines.py +1126 -0
- marine_extremes-0.1.0/python/marine_extremes/calendar.py +462 -0
- marine_extremes-0.1.0/python/marine_extremes/catalog.py +557 -0
- marine_extremes-0.1.0/python/marine_extremes/compat.py +93 -0
- marine_extremes-0.1.0/python/marine_extremes/io_formats.py +2484 -0
- marine_extremes-0.1.0/python/marine_extremes/result.py +191 -0
- marine_extremes-0.1.0/python/marine_extremes/streaming.py +385 -0
- marine_extremes-0.1.0/src/baseline.rs +727 -0
- marine_extremes-0.1.0/src/compat.rs +90 -0
- marine_extremes-0.1.0/src/detect.rs +672 -0
- marine_extremes-0.1.0/src/lib.rs +1301 -0
- marine_extremes-0.1.0/src/quantile.rs +81 -0
- marine_extremes-0.1.0/tests/test_adversarial_and_stress.py +217 -0
- marine_extremes-0.1.0/tests/test_baselines_and_calendars.py +240 -0
- marine_extremes-0.1.0/tests/test_compat_parity.py +295 -0
- marine_extremes-0.1.0/tests/test_edge_cases_and_streaming.py +305 -0
- marine_extremes-0.1.0/tests/test_io_formats.py +430 -0
- marine_extremes-0.1.0/tests/test_review_regressions.py +991 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
test:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
strategy:
|
|
15
|
+
fail-fast: false
|
|
16
|
+
matrix:
|
|
17
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
- uses: actions/setup-python@v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: ${{ matrix.python-version }}
|
|
23
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
24
|
+
- name: Run Rust unit tests
|
|
25
|
+
run: cargo test --lib
|
|
26
|
+
- name: Build and install marine-extremes wheel
|
|
27
|
+
run: |
|
|
28
|
+
python -m pip install --upgrade pip maturin
|
|
29
|
+
maturin build --release --out dist
|
|
30
|
+
WHEEL=$(ls dist/marine_extremes-*.whl)
|
|
31
|
+
python -m pip install "${WHEEL}[io,dev]"
|
|
32
|
+
- name: Run Python test suite
|
|
33
|
+
run: pytest -v
|
|
34
|
+
- name: Run quickstart smoke test
|
|
35
|
+
run: python examples/quickstart.py
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
name: Release & Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
inputs:
|
|
8
|
+
publish_to_pypi:
|
|
9
|
+
description: "Publish built wheels and sdist to PyPI via Trusted Publisher"
|
|
10
|
+
type: boolean
|
|
11
|
+
default: false
|
|
12
|
+
release_tag:
|
|
13
|
+
description: "Optional existing GitHub Release tag (e.g. v0.1.0) to attach built assets"
|
|
14
|
+
type: string
|
|
15
|
+
default: ""
|
|
16
|
+
|
|
17
|
+
permissions:
|
|
18
|
+
contents: read
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
verify:
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v4
|
|
25
|
+
- uses: actions/setup-python@v5
|
|
26
|
+
with:
|
|
27
|
+
python-version: "3.12"
|
|
28
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
29
|
+
- name: Check version matches release tag
|
|
30
|
+
if: github.event_name == 'release' || inputs.release_tag != ''
|
|
31
|
+
env:
|
|
32
|
+
RELEASE_TAG: ${{ github.event_name == 'release' && github.event.release.tag_name || inputs.release_tag }}
|
|
33
|
+
run: |
|
|
34
|
+
python - <<'PY'
|
|
35
|
+
import os, tomllib
|
|
36
|
+
tag = os.environ["RELEASE_TAG"].lstrip("v")
|
|
37
|
+
py_ver = tomllib.load(open("pyproject.toml", "rb"))["project"]["version"]
|
|
38
|
+
rs_ver = tomllib.load(open("Cargo.toml", "rb"))["package"]["version"]
|
|
39
|
+
print(f"tag={tag}, pyproject={py_ver}, cargo={rs_ver}")
|
|
40
|
+
assert tag == py_ver == rs_ver, f"Version mismatch: tag={tag}, pyproject={py_ver}, cargo={rs_ver}"
|
|
41
|
+
PY
|
|
42
|
+
- name: Run Rust unit tests
|
|
43
|
+
run: cargo test --lib
|
|
44
|
+
- name: Build wheel and run Python tests
|
|
45
|
+
run: |
|
|
46
|
+
python -m pip install --upgrade pip maturin
|
|
47
|
+
maturin build --release --out dist
|
|
48
|
+
WHEEL=$(ls dist/marine_extremes-*.whl)
|
|
49
|
+
python -m pip install "${WHEEL}[io,dev]"
|
|
50
|
+
pytest -q
|
|
51
|
+
python examples/quickstart.py
|
|
52
|
+
|
|
53
|
+
wheels:
|
|
54
|
+
needs: verify
|
|
55
|
+
strategy:
|
|
56
|
+
fail-fast: false
|
|
57
|
+
matrix:
|
|
58
|
+
include:
|
|
59
|
+
- os: ubuntu-latest
|
|
60
|
+
target: x86_64
|
|
61
|
+
manylinux: auto
|
|
62
|
+
macos_target: ""
|
|
63
|
+
- os: ubuntu-24.04-arm
|
|
64
|
+
target: aarch64
|
|
65
|
+
manylinux: auto
|
|
66
|
+
macos_target: ""
|
|
67
|
+
- os: macos-15
|
|
68
|
+
target: aarch64
|
|
69
|
+
manylinux: off
|
|
70
|
+
macos_target: "11.0"
|
|
71
|
+
- os: macos-15
|
|
72
|
+
target: x86_64
|
|
73
|
+
manylinux: off
|
|
74
|
+
macos_target: "10.15"
|
|
75
|
+
- os: windows-latest
|
|
76
|
+
target: x64
|
|
77
|
+
manylinux: off
|
|
78
|
+
macos_target: ""
|
|
79
|
+
runs-on: ${{ matrix.os }}
|
|
80
|
+
steps:
|
|
81
|
+
- uses: actions/checkout@v4
|
|
82
|
+
- uses: actions/setup-python@v5
|
|
83
|
+
with:
|
|
84
|
+
python-version: "3.12"
|
|
85
|
+
- name: Build abi3 wheel
|
|
86
|
+
uses: PyO3/maturin-action@v1
|
|
87
|
+
env:
|
|
88
|
+
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos_target }}
|
|
89
|
+
with:
|
|
90
|
+
target: ${{ matrix.target }}
|
|
91
|
+
args: --release --out dist
|
|
92
|
+
manylinux: ${{ matrix.manylinux }}
|
|
93
|
+
- uses: actions/upload-artifact@v4
|
|
94
|
+
with:
|
|
95
|
+
name: wheels-${{ matrix.os }}-${{ matrix.target }}
|
|
96
|
+
path: dist/*.whl
|
|
97
|
+
|
|
98
|
+
sdist:
|
|
99
|
+
needs: verify
|
|
100
|
+
runs-on: ubuntu-latest
|
|
101
|
+
steps:
|
|
102
|
+
- uses: actions/checkout@v4
|
|
103
|
+
- name: Build source distribution
|
|
104
|
+
uses: PyO3/maturin-action@v1
|
|
105
|
+
with:
|
|
106
|
+
command: sdist
|
|
107
|
+
args: --out dist
|
|
108
|
+
- uses: actions/upload-artifact@v4
|
|
109
|
+
with:
|
|
110
|
+
name: sdist
|
|
111
|
+
path: dist/*.tar.gz
|
|
112
|
+
|
|
113
|
+
publish:
|
|
114
|
+
needs: [wheels, sdist]
|
|
115
|
+
if: github.event_name == 'release' || inputs.publish_to_pypi
|
|
116
|
+
runs-on: ubuntu-latest
|
|
117
|
+
environment:
|
|
118
|
+
name: pypi
|
|
119
|
+
url: https://pypi.org/p/marine-extremes
|
|
120
|
+
permissions:
|
|
121
|
+
id-token: write
|
|
122
|
+
contents: write
|
|
123
|
+
steps:
|
|
124
|
+
- uses: actions/download-artifact@v4
|
|
125
|
+
with:
|
|
126
|
+
path: dist
|
|
127
|
+
merge-multiple: true
|
|
128
|
+
- uses: actions/setup-python@v5
|
|
129
|
+
with:
|
|
130
|
+
python-version: "3.12"
|
|
131
|
+
- name: Verify distributions with twine
|
|
132
|
+
run: |
|
|
133
|
+
python -m pip install --upgrade twine
|
|
134
|
+
ls -lh dist/
|
|
135
|
+
twine check --strict dist/*
|
|
136
|
+
- name: Publish to PyPI via Trusted Publisher
|
|
137
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
138
|
+
with:
|
|
139
|
+
packages-dir: dist/
|
|
140
|
+
- name: Attach wheels and sdist to GitHub Release
|
|
141
|
+
if: github.event_name == 'release' || inputs.release_tag != ''
|
|
142
|
+
uses: softprops/action-gh-release@v2
|
|
143
|
+
with:
|
|
144
|
+
tag_name: ${{ github.event_name == 'release' && github.event.release.tag_name || inputs.release_tag }}
|
|
145
|
+
files: dist/*
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Engramory local agent memory (MUST stay untracked)
|
|
2
|
+
.engramory-memory/
|
|
3
|
+
|
|
4
|
+
# Rust
|
|
5
|
+
/target/
|
|
6
|
+
Cargo.lock
|
|
7
|
+
**/*.rs.bk
|
|
8
|
+
|
|
9
|
+
# Python
|
|
10
|
+
__pycache__/
|
|
11
|
+
*.py[cod]
|
|
12
|
+
*$py.class
|
|
13
|
+
*.so
|
|
14
|
+
*.pyd
|
|
15
|
+
.Python
|
|
16
|
+
build/
|
|
17
|
+
develop-eggs/
|
|
18
|
+
dist/
|
|
19
|
+
downloads/
|
|
20
|
+
eggs/
|
|
21
|
+
.eggs/
|
|
22
|
+
lib/
|
|
23
|
+
lib64/
|
|
24
|
+
parts/
|
|
25
|
+
sdist/
|
|
26
|
+
var/
|
|
27
|
+
wheels/
|
|
28
|
+
*.egg-info/
|
|
29
|
+
.installed.cfg
|
|
30
|
+
*.egg
|
|
31
|
+
.pytest_cache/
|
|
32
|
+
.mypy_cache/
|
|
33
|
+
.ruff_cache/
|
|
34
|
+
.coverage
|
|
35
|
+
htmlcov/
|
|
36
|
+
.venv/
|
|
37
|
+
venv/
|
|
38
|
+
ENV/
|
|
39
|
+
|
|
40
|
+
# Jupyter
|
|
41
|
+
.ipynb_checkpoints/
|
|
42
|
+
|
|
43
|
+
# Large scientific data outputs
|
|
44
|
+
*.nc
|
|
45
|
+
*.nc4
|
|
46
|
+
*.hdf5
|
|
47
|
+
*.h5
|
|
48
|
+
*.zarr
|
|
49
|
+
*.zarr/
|
|
50
|
+
*.mat
|
|
51
|
+
*.npz
|
|
52
|
+
*.parquet
|
|
53
|
+
*.feather
|
|
54
|
+
|
|
55
|
+
# OS & Editors
|
|
56
|
+
.DS_Store
|
|
57
|
+
Thumbs.db
|
|
58
|
+
.vscode/
|
|
59
|
+
.idea/
|
|
60
|
+
*.swp
|
|
61
|
+
*.swo
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `marine-extremes` are documented in this file.
|
|
4
|
+
|
|
5
|
+
## [0.1.0] - 2026-11-27
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- Rust + Rayon parallel detection core (`marine_extremes._core`) compiled with PyO3 `abi3-py311`, releasing the Python GIL (`py.detach()`), skipping land pixels, and running a compact `float32` tile fast path (`working_dtype="auto"`) with internal `f64` accumulation.
|
|
9
|
+
- Single-pass MHW and MCS detection (`event="both"`), plus general upper/lower scalar extreme detection across 1D-4D gridded and station datasets.
|
|
10
|
+
- Baseline definitions: `FixedBaseline` (with optional external `clim_data`), `DetrendedBaseline` (`linear` and `quadratic` OLS detrending), `MovingBaseline` (sliding multi-year window with `clamp`/`shrink` boundaries), `FixedThreshold`, and `ExternalClimatology`.
|
|
11
|
+
- Native Gregorian and CMIP6 `cftime` calendars (`standard`, `proleptic_gregorian`, `noleap`/`365_day`, `360_day`, `all_leap`/`366_day`) and `freq="monthly"` detection.
|
|
12
|
+
- Explicit cross-tool compatibility profiles (`"standard"`, `"m_mhw"`, `"m_mhw_python"`, `"oliver"`, `"heatwaveR"`), verified against MATLAB R2025b `m_mhw1.0`, `ecjoliver/marineHeatWaves.py`, `mhw-detect`, `heatwave3`, and `xmhw` on real NOAA OISST v2.1 data.
|
|
13
|
+
- Memory-bounded out-of-core streaming (`memory_limit`) across multi-file NetCDF/Zarr globs and seven standalone single-target output formats (`.nc`, `.mat` v7.3 HDF5 and v5 `detectc` cell, `.zarr`, `.npz`, `.parquet`, `.feather`, `.csv`) with CSR `grid_offsets` for O(1) lazy grid lookup.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
title: "marine-extremes"
|
|
3
|
+
message: "If you use this software, please cite it using the metadata from this file."
|
|
4
|
+
type: software
|
|
5
|
+
authors:
|
|
6
|
+
- family-names: "Ren"
|
|
7
|
+
given-names: "Jie"
|
|
8
|
+
email: "renjie22@mails.ucas.ac.cn"
|
|
9
|
+
affiliation: "South China Sea Institute of Oceanology, Chinese Academy of Sciences; University of Chinese Academy of Sciences"
|
|
10
|
+
orcid: "https://orcid.org/0009-0000-2806-6771"
|
|
11
|
+
repository-code: "https://github.com/Radianjayjay/marine-extremes"
|
|
12
|
+
url: "https://github.com/Radianjayjay/marine-extremes"
|
|
13
|
+
doi: "10.5281/zenodo.24579203"
|
|
14
|
+
identifiers:
|
|
15
|
+
- type: doi
|
|
16
|
+
value: "10.5281/zenodo.24579203"
|
|
17
|
+
description: "Zenodo Concept DOI (always resolves to the latest version)"
|
|
18
|
+
- type: doi
|
|
19
|
+
value: "10.5281/zenodo.24579204"
|
|
20
|
+
description: "Zenodo DOI for v0.1.0"
|
|
21
|
+
abstract: >-
|
|
22
|
+
Rust-accelerated Python package for detecting marine heatwaves (MHWs),
|
|
23
|
+
marine cold spells (MCSs), and general scalar marine extremes across 1D-4D
|
|
24
|
+
gridded and multi-calendar ocean datasets.
|
|
25
|
+
keywords:
|
|
26
|
+
- oceanography
|
|
27
|
+
- marine heatwaves
|
|
28
|
+
- marine cold spells
|
|
29
|
+
- climate extremes
|
|
30
|
+
- python
|
|
31
|
+
- rust
|
|
32
|
+
- xarray
|
|
33
|
+
- netcdf
|
|
34
|
+
license: MIT
|
|
35
|
+
version: "0.1.0"
|
|
36
|
+
contact:
|
|
37
|
+
- email: "renjie22@mails.ucas.ac.cn"
|
|
38
|
+
name: "Jie Ren"
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "autocfg"
|
|
7
|
+
version = "1.5.1"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
|
|
10
|
+
|
|
11
|
+
[[package]]
|
|
12
|
+
name = "crossbeam-deque"
|
|
13
|
+
version = "0.8.8"
|
|
14
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
15
|
+
checksum = "622f3fc73690be383c7214310406f28a90e6edeadc3cea882f9d71e495b9711a"
|
|
16
|
+
dependencies = [
|
|
17
|
+
"crossbeam-epoch",
|
|
18
|
+
"crossbeam-utils",
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
[[package]]
|
|
22
|
+
name = "crossbeam-epoch"
|
|
23
|
+
version = "0.9.21"
|
|
24
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
25
|
+
checksum = "dc74980687109a3b14c72fd458107bf0baa1da1a1a805e178d15501ba9b86d9d"
|
|
26
|
+
dependencies = [
|
|
27
|
+
"crossbeam-utils",
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
[[package]]
|
|
31
|
+
name = "crossbeam-utils"
|
|
32
|
+
version = "0.8.23"
|
|
33
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
34
|
+
checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6"
|
|
35
|
+
|
|
36
|
+
[[package]]
|
|
37
|
+
name = "either"
|
|
38
|
+
version = "1.19.0"
|
|
39
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
40
|
+
checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be"
|
|
41
|
+
|
|
42
|
+
[[package]]
|
|
43
|
+
name = "heck"
|
|
44
|
+
version = "0.5.0"
|
|
45
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
46
|
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
47
|
+
|
|
48
|
+
[[package]]
|
|
49
|
+
name = "libc"
|
|
50
|
+
version = "0.2.191"
|
|
51
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
52
|
+
checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a"
|
|
53
|
+
|
|
54
|
+
[[package]]
|
|
55
|
+
name = "marine-extremes"
|
|
56
|
+
version = "0.1.0"
|
|
57
|
+
dependencies = [
|
|
58
|
+
"numpy",
|
|
59
|
+
"pyo3",
|
|
60
|
+
"rayon",
|
|
61
|
+
]
|
|
62
|
+
|
|
63
|
+
[[package]]
|
|
64
|
+
name = "matrixmultiply"
|
|
65
|
+
version = "0.3.11"
|
|
66
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
67
|
+
checksum = "3f607c237553f086e7043417a51df26b2eb899d3caff94e6a67592ff992fedc7"
|
|
68
|
+
dependencies = [
|
|
69
|
+
"autocfg",
|
|
70
|
+
"rawpointer",
|
|
71
|
+
]
|
|
72
|
+
|
|
73
|
+
[[package]]
|
|
74
|
+
name = "ndarray"
|
|
75
|
+
version = "0.17.2"
|
|
76
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
77
|
+
checksum = "520080814a7a6b4a6e9070823bb24b4531daac8c4627e08ba5de8c5ef2f2752d"
|
|
78
|
+
dependencies = [
|
|
79
|
+
"matrixmultiply",
|
|
80
|
+
"num-complex",
|
|
81
|
+
"num-integer",
|
|
82
|
+
"num-traits",
|
|
83
|
+
"portable-atomic",
|
|
84
|
+
"portable-atomic-util",
|
|
85
|
+
"rawpointer",
|
|
86
|
+
]
|
|
87
|
+
|
|
88
|
+
[[package]]
|
|
89
|
+
name = "num-complex"
|
|
90
|
+
version = "0.4.6"
|
|
91
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
92
|
+
checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495"
|
|
93
|
+
dependencies = [
|
|
94
|
+
"num-traits",
|
|
95
|
+
]
|
|
96
|
+
|
|
97
|
+
[[package]]
|
|
98
|
+
name = "num-integer"
|
|
99
|
+
version = "0.1.47"
|
|
100
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
101
|
+
checksum = "7ce2d95d4b3734dc35aa2f45e1aa22cd416814592a4f9d9205e11affd5b8e10b"
|
|
102
|
+
dependencies = [
|
|
103
|
+
"num-traits",
|
|
104
|
+
]
|
|
105
|
+
|
|
106
|
+
[[package]]
|
|
107
|
+
name = "num-traits"
|
|
108
|
+
version = "0.2.19"
|
|
109
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
110
|
+
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
|
|
111
|
+
dependencies = [
|
|
112
|
+
"autocfg",
|
|
113
|
+
]
|
|
114
|
+
|
|
115
|
+
[[package]]
|
|
116
|
+
name = "numpy"
|
|
117
|
+
version = "0.30.0"
|
|
118
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
119
|
+
checksum = "aa0b9111761885449e894981fa8051dcf69e0bd114aecbd4bcdd830b6be4ed92"
|
|
120
|
+
dependencies = [
|
|
121
|
+
"libc",
|
|
122
|
+
"ndarray",
|
|
123
|
+
"num-complex",
|
|
124
|
+
"num-integer",
|
|
125
|
+
"num-traits",
|
|
126
|
+
"pyo3",
|
|
127
|
+
"pyo3-build-config",
|
|
128
|
+
"rustc-hash",
|
|
129
|
+
]
|
|
130
|
+
|
|
131
|
+
[[package]]
|
|
132
|
+
name = "once_cell"
|
|
133
|
+
version = "1.21.4"
|
|
134
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
135
|
+
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
|
136
|
+
|
|
137
|
+
[[package]]
|
|
138
|
+
name = "portable-atomic"
|
|
139
|
+
version = "1.15.0"
|
|
140
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
141
|
+
checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85"
|
|
142
|
+
|
|
143
|
+
[[package]]
|
|
144
|
+
name = "portable-atomic-util"
|
|
145
|
+
version = "0.2.8"
|
|
146
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
147
|
+
checksum = "10ab3eb7f3becc3a1cbc4f2c6f20267996cfc1a6467a873763411b136a122715"
|
|
148
|
+
dependencies = [
|
|
149
|
+
"portable-atomic",
|
|
150
|
+
]
|
|
151
|
+
|
|
152
|
+
[[package]]
|
|
153
|
+
name = "proc-macro2"
|
|
154
|
+
version = "1.0.107"
|
|
155
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
156
|
+
checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
|
|
157
|
+
dependencies = [
|
|
158
|
+
"unicode-ident",
|
|
159
|
+
]
|
|
160
|
+
|
|
161
|
+
[[package]]
|
|
162
|
+
name = "pyo3"
|
|
163
|
+
version = "0.30.1"
|
|
164
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
165
|
+
checksum = "229ca13b8a15bb0d1487b81ab975bfcd97513416499a8312011b6036e42e0de4"
|
|
166
|
+
dependencies = [
|
|
167
|
+
"libc",
|
|
168
|
+
"once_cell",
|
|
169
|
+
"portable-atomic",
|
|
170
|
+
"pyo3-build-config",
|
|
171
|
+
"pyo3-ffi",
|
|
172
|
+
"pyo3-macros",
|
|
173
|
+
]
|
|
174
|
+
|
|
175
|
+
[[package]]
|
|
176
|
+
name = "pyo3-build-config"
|
|
177
|
+
version = "0.30.1"
|
|
178
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
179
|
+
checksum = "70130e2b6dd1ee589a8788026a429561ca5c40fa7a2fa7914c2282eddae24700"
|
|
180
|
+
dependencies = [
|
|
181
|
+
"target-lexicon",
|
|
182
|
+
]
|
|
183
|
+
|
|
184
|
+
[[package]]
|
|
185
|
+
name = "pyo3-ffi"
|
|
186
|
+
version = "0.30.1"
|
|
187
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
188
|
+
checksum = "5e7ff73c555c286d212d4ce7e5fbda845a973c4f61bd5f160f5f2c3c2a04d1c4"
|
|
189
|
+
dependencies = [
|
|
190
|
+
"libc",
|
|
191
|
+
"pyo3-build-config",
|
|
192
|
+
]
|
|
193
|
+
|
|
194
|
+
[[package]]
|
|
195
|
+
name = "pyo3-macros"
|
|
196
|
+
version = "0.30.1"
|
|
197
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
198
|
+
checksum = "c46d2e5862c7bb8207e3b639f713dda3c499933444784154c11d013c5a691b60"
|
|
199
|
+
dependencies = [
|
|
200
|
+
"proc-macro2",
|
|
201
|
+
"pyo3-macros-backend",
|
|
202
|
+
"quote",
|
|
203
|
+
"syn",
|
|
204
|
+
]
|
|
205
|
+
|
|
206
|
+
[[package]]
|
|
207
|
+
name = "pyo3-macros-backend"
|
|
208
|
+
version = "0.30.1"
|
|
209
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
210
|
+
checksum = "38b89f066f2ae72a2aef52d1537ca2fcd104440ebfadee06e97aa90738a25b9b"
|
|
211
|
+
dependencies = [
|
|
212
|
+
"heck",
|
|
213
|
+
"proc-macro2",
|
|
214
|
+
"quote",
|
|
215
|
+
"syn",
|
|
216
|
+
]
|
|
217
|
+
|
|
218
|
+
[[package]]
|
|
219
|
+
name = "quote"
|
|
220
|
+
version = "1.0.47"
|
|
221
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
222
|
+
checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
|
|
223
|
+
dependencies = [
|
|
224
|
+
"proc-macro2",
|
|
225
|
+
]
|
|
226
|
+
|
|
227
|
+
[[package]]
|
|
228
|
+
name = "rawpointer"
|
|
229
|
+
version = "0.2.1"
|
|
230
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
231
|
+
checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3"
|
|
232
|
+
|
|
233
|
+
[[package]]
|
|
234
|
+
name = "rayon"
|
|
235
|
+
version = "1.12.0"
|
|
236
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
237
|
+
checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d"
|
|
238
|
+
dependencies = [
|
|
239
|
+
"either",
|
|
240
|
+
"rayon-core",
|
|
241
|
+
]
|
|
242
|
+
|
|
243
|
+
[[package]]
|
|
244
|
+
name = "rayon-core"
|
|
245
|
+
version = "1.13.0"
|
|
246
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
247
|
+
checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91"
|
|
248
|
+
dependencies = [
|
|
249
|
+
"crossbeam-deque",
|
|
250
|
+
"crossbeam-utils",
|
|
251
|
+
]
|
|
252
|
+
|
|
253
|
+
[[package]]
|
|
254
|
+
name = "rustc-hash"
|
|
255
|
+
version = "2.1.3"
|
|
256
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
257
|
+
checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d"
|
|
258
|
+
|
|
259
|
+
[[package]]
|
|
260
|
+
name = "syn"
|
|
261
|
+
version = "3.0.10"
|
|
262
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
263
|
+
checksum = "4ae9ccbea3a7b0b09443036490c8f34a8b1b760fd345e5c0dae0aac718faea79"
|
|
264
|
+
dependencies = [
|
|
265
|
+
"proc-macro2",
|
|
266
|
+
"quote",
|
|
267
|
+
"unicode-ident",
|
|
268
|
+
]
|
|
269
|
+
|
|
270
|
+
[[package]]
|
|
271
|
+
name = "target-lexicon"
|
|
272
|
+
version = "0.13.6"
|
|
273
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
274
|
+
checksum = "8c447be3a2abfa84b2d91680c56600bd6b2873866de27b36ec911be705e291da"
|
|
275
|
+
|
|
276
|
+
[[package]]
|
|
277
|
+
name = "unicode-ident"
|
|
278
|
+
version = "1.0.27"
|
|
279
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
280
|
+
checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563"
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "marine-extremes"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
edition = "2021"
|
|
5
|
+
license = "MIT"
|
|
6
|
+
repository = "https://github.com/Radianjayjay/marine-extremes"
|
|
7
|
+
description = "Rust-accelerated core for marine heatwave, marine cold spell, and general marine extreme event detection."
|
|
8
|
+
readme = "README.md"
|
|
9
|
+
|
|
10
|
+
[lib]
|
|
11
|
+
name = "_core"
|
|
12
|
+
crate-type = ["cdylib", "rlib"]
|
|
13
|
+
|
|
14
|
+
[dependencies]
|
|
15
|
+
pyo3 = { version = "0.30", features = ["abi3-py311"] }
|
|
16
|
+
numpy = "0.30"
|
|
17
|
+
rayon = "1.12"
|
|
18
|
+
|
|
19
|
+
[profile.release]
|
|
20
|
+
opt-level = 3
|
|
21
|
+
lto = "thin"
|
|
22
|
+
codegen-units = 1
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jie Ren (marine-extremes contributors)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|