Skip to content

Commit

Permalink
Major update
Browse files Browse the repository at this point in the history
  • Loading branch information
robbibt committed Oct 7, 2024
1 parent f6617f8 commit b4d4bf4
Show file tree
Hide file tree
Showing 17 changed files with 261 additions and 941 deletions.
15 changes: 10 additions & 5 deletions .github/actions/setup-python-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ description: "Set up Python environment for the given Python version"

inputs:
python-version:
description: "Python version for setup-python"
description: "Python version to use"
required: true
default: "3.10"
uv-version:
description: "uv version to use"
required: true
default: "0.4.18"

runs:
using: "composite"
Expand All @@ -15,10 +19,11 @@ runs:
python-version: ${{ inputs.python-version }}

- name: Install uv
run: pipx install uv
env:
UV_VERSION: "0.4.10"
shell: bash
uses: astral-sh/setup-uv@v2
with:
version: ${{ inputs.uv-version }}
enable-cache: "true"
cache-suffix: ${{ matrix.python-version }}

- name: Install Python dependencies
# This will install eo-tides and all required dependencies specified in
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ test: ## Test the code with pytest
@echo "🚀 Testing code: Running pytest"
@tar -xvzf ./tests/data/tide_models.tar.gz -C ./tests/data
@export EO_TIDES_TIDE_MODELS=./tests/data/tide_models && \
uv run python -m pytest --cov --cov-config=pyproject.toml --cov-report=xml
uv run python -m pytest --cov --cov-config=pyproject.toml --cov-report=xml --verbose
@export EO_TIDES_TIDE_MODELS=./tests/data/tide_models && \
uv run python -m pytest --nbval-lax docs/notebooks/
uv run python -m pytest --nbval-lax docs/notebooks/ --verbose

.PHONY: build
build: clean-build ## Build wheel file
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

[![Release](https://img.shields.io/github/v/release/GeoscienceAustralia/eo-tides)](https://pypi.org/project/eo-tides/)
[![Build status](https://img.shields.io/github/actions/workflow/status/GeoscienceAustralia/eo-tides/main.yml?branch=main)](https://github.com/GeoscienceAustralia/eo-tides/actions/workflows/main.yml?query=branch%3Amain)
![Python Version from PEP 621 TOML](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2FGeoscienceAustralia%2Feo-tides%2Frefs%2Fheads%2Fmain%2Fpyproject.toml)
[![codecov](https://codecov.io/gh/GeoscienceAustralia/eo-tides/branch/main/graph/badge.svg)](https://codecov.io/gh/GeoscienceAustralia/eo-tides)
[![Commit activity](https://img.shields.io/github/commit-activity/m/GeoscienceAustralia/eo-tides)](https://img.shields.io/github/commit-activity/m/GeoscienceAustralia/eo-tides)
[![License](https://img.shields.io/github/license/GeoscienceAustralia/eo-tides)](https://img.shields.io/github/license/GeoscienceAustralia/eo-tides)

- **Github repository**: <https://github.com/GeoscienceAustralia/eo-tides/>
Expand All @@ -22,7 +22,7 @@ These tools can be applied to petabytes of freely available satellite data (e.g.

- 🌊 Model tides from multiple global ocean tide models in parallel, and return tide heights in standardised `pandas.DataFrame` format for further analysis
- 🛰️ "Tag" satellite data with tide height and stage based on the exact moment of image acquisition
- 🌐 Model tides for every individual satellite pixel, producing three-dimensional "tide height" `xarray`-format datacubes that can be combined with satellite data
- 🌐 Model tides for every individual satellite pixel, producing three-dimensional "tide height" `xarray`-format datacubes that can be integrated with satellite data
- 🎯 Combine multiple tide models into a single locally-optimised "ensemble" model informed by satellite altimetry and satellite-observed patterns of tidal inundation
- 📈 Calculate statistics describing local tide dynamics, as well as biases caused by interactions between tidal processes and satellite orbits
- 🛠️ Validate modelled tides using measured sea levels from coastal tide gauges (e.g. [GESLA Global Extreme Sea Level Analysis](https://gesla.org/))
Expand Down
3 changes: 3 additions & 0 deletions README_dev.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[![Commit activity](https://img.shields.io/github/commit-activity/m/GeoscienceAustralia/eo-tides)](https://img.shields.io/github/commit-activity/m/GeoscienceAustralia/eo-tides)
![PyPI - Downloads](https://img.shields.io/pypi/dm/eo-tides)

## Getting started

### 1. Create a New Repository
Expand Down
1 change: 1 addition & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
::: eo_tides.model
::: eo_tides.eo
::: eo_tides.stats
::: eo_tides.validation
::: eo_tides.utils
8 changes: 5 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<img style="float: left; margin: 0 50px 0 0;" src="assets/eo-tides-logo-256.png" width="136">
# `eo-tides`: Tide modelling tools for large-scale satellite Earth observation analysis
![Alt text](assets/eo-tides-logo-256.png#only-dark){: align=left style="margin-right: 20px; margin-top: -12px;" width="155"}
![Alt text](assets/eo-tides-logo.gif#only-light){: align=left style="margin-right: 20px; margin-top: -12px;" width="155"}

# `eo-tides`: Tide modelling tools for large-scale satellite Earth observation analysis 🌊🛰️🛠️

[![Release](https://img.shields.io/github/v/release/GeoscienceAustralia/eo-tides)](https://img.shields.io/github/v/release/GeoscienceAustralia/eo-tides)
[![Build status](https://img.shields.io/github/actions/workflow/status/GeoscienceAustralia/eo-tides/main.yml?branch=main)](https://github.com/GeoscienceAustralia/eo-tides/actions/workflows/main.yml?query=branch%3Amain)
Expand All @@ -20,7 +22,7 @@ These tools can be applied to petabytes of freely available satellite data (e.g.

- 🌊 Model tides from multiple global ocean tide models in parallel, and return tide heights in standardised `pandas.DataFrame` format for further analysis
- 🛰️ "Tag" satellite data with tide height and stage based on the exact moment of image acquisition
- 🌐 Model tides for every individual satellite pixel, producing three-dimensional "tide height" `xarray`-format datacubes that can be combined with satellite data
- 🌐 Model tides for every individual satellite pixel, producing three-dimensional "tide height" `xarray`-format datacubes that can be integrated with satellite data
- 🎯 Combine multiple tide models into a single locally-optimised "ensemble" model informed by satellite altimetry and satellite-observed patterns of tidal inundation
- 📈 Calculate statistics describing local tide dynamics, as well as biases caused by interactions between tidal processes and satellite orbits
- 🛠️ Validate modelled tides using measured sea levels from coastal tide gauges (e.g. [GESLA Global Extreme Sea Level Analysis](https://gesla.org/))
Expand Down
19 changes: 17 additions & 2 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,30 @@ pip install eo-tides[notebooks]

## Unstable development version

To install the latest unstable development version of `eo-tides`, run:
To install the latest unstable development version of `eo-tides` directly from Github, run:

```console
pip install git+https://github.com/GeoscienceAustralia/eo-tides.git
```

### Cloning locally

To clone the `eo-tides` repository locally:

```console
git clone https://github.com/GeoscienceAustralia/eo-tides.git
```

Navigate to the project directory and install in editable mode from your local copy of the repository:

```console
cd eo_tides
pip install -e .
```

!!! important

The unstable development version of `eo-tides` may contain bugs and untested new features. Unless you need access to a specific unpublished feature, we recommend installing the latest stable version instead.
Unstable development versions of `eo-tides` may contain bugs and untested new features. Unless you need access to a specific unpublished feature, we recommend installing the latest stable version instead.

## Next steps

Expand Down
69 changes: 28 additions & 41 deletions docs/notebooks/Model_tides.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
{
"cell_type": "code",
"execution_count": 41,
"execution_count": 1,
"metadata": {
"tags": []
},
Expand All @@ -41,7 +41,7 @@
},
{
"cell_type": "code",
"execution_count": 42,
"execution_count": 2,
"metadata": {
"tags": []
},
Expand All @@ -50,18 +50,12 @@
"name": "stdout",
"output_type": "stream",
"text": [
"─────────────────────────────────────────────────────────────────────────────────────\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"────────────────────────────────────────────────────────────────────────────────\n",
" 󠀠🌊 | Model | Expected path \n",
"─────────────────────────────────────────────────────────────────────────────────────\n",
"────────────────────────────────────────────────────────────────────────────────\n",
" ✅ │ EOT20 │ ../../tests/data/tide_models/EOT20/ocean_tides \n",
" ✅ │ HAMTIDE11 │ ../../tests/data/tide_models/hamtide \n",
"─────────────────────────────────────────────────────────────────────────────────────\n",
"────────────────────────────────────────────────────────────────────────────────\n",
"\n",
"Summary:\n",
"Available models: 2/50\n"
Expand Down Expand Up @@ -97,7 +91,7 @@
},
{
"cell_type": "code",
"execution_count": 43,
"execution_count": 3,
"metadata": {
"tags": []
},
Expand Down Expand Up @@ -193,7 +187,7 @@
"2018-01-01 04:00:00 122.2186 -18.0008 EOT20 1.181283"
]
},
"execution_count": 43,
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -229,7 +223,7 @@
},
{
"cell_type": "code",
"execution_count": 44,
"execution_count": 4,
"metadata": {
"tags": []
},
Expand Down Expand Up @@ -271,7 +265,7 @@
},
{
"cell_type": "code",
"execution_count": 45,
"execution_count": 5,
"metadata": {
"tags": []
},
Expand All @@ -287,14 +281,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
" 0%| | 0/2 [00:00<?, ?it/s]"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 2/2 [00:00<00:00, 12.85it/s]\n"
"100%|██████████| 2/2 [00:00<00:00, 4.03it/s]\n"
]
},
{
Expand Down Expand Up @@ -388,7 +375,7 @@
"2018-01-01 04:00:00 122.2186 -18.0008 1.181283 1.034931"
]
},
"execution_count": 45,
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -416,7 +403,7 @@
},
{
"cell_type": "code",
"execution_count": 46,
"execution_count": 6,
"metadata": {
"tags": []
},
Expand All @@ -427,7 +414,7 @@
"<Axes: xlabel='time'>"
]
},
"execution_count": 46,
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
},
Expand Down Expand Up @@ -464,7 +451,7 @@
},
{
"cell_type": "code",
"execution_count": 47,
"execution_count": 7,
"metadata": {
"tags": []
},
Expand All @@ -487,7 +474,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 2/2 [00:00<00:00, 11.21it/s]\n"
"100%|██████████| 2/2 [00:00<00:00, 5.01it/s]\n"
]
},
{
Expand Down Expand Up @@ -566,7 +553,7 @@
"2018-01-31 122.22 -18.21 EOT20 0.368303"
]
},
"execution_count": 47,
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -596,7 +583,7 @@
},
{
"cell_type": "code",
"execution_count": 48,
"execution_count": 8,
"metadata": {
"tags": []
},
Expand Down Expand Up @@ -650,7 +637,7 @@
"1 2018-01-31 122.22 -18.21"
]
},
"execution_count": 48,
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -675,7 +662,7 @@
},
{
"cell_type": "code",
"execution_count": 49,
"execution_count": 9,
"metadata": {
"tags": []
},
Expand All @@ -691,7 +678,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 2/2 [00:00<00:00, 13.64it/s]\n"
"100%|██████████| 2/2 [00:00<00:00, 4.93it/s]\n"
]
},
{
Expand Down Expand Up @@ -746,7 +733,7 @@
"1 2018-01-31 122.22 -18.21 0.368303"
]
},
"execution_count": 49,
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -775,7 +762,7 @@
},
{
"cell_type": "code",
"execution_count": 50,
"execution_count": 10,
"metadata": {
"tags": []
},
Expand All @@ -791,7 +778,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 4/4 [00:00<00:00, 15.71it/s]\n"
"100%|██████████| 4/4 [00:00<00:00, 5.35it/s]\n"
]
},
{
Expand Down Expand Up @@ -902,7 +889,7 @@
"2018-01-31 122.22 -18.21 HAMTIDE11 0.588129"
]
},
"execution_count": 50,
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -929,7 +916,7 @@
},
{
"cell_type": "code",
"execution_count": 51,
"execution_count": 11,
"metadata": {
"tags": []
},
Expand All @@ -945,7 +932,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 4/4 [00:00<00:00, 16.48it/s]\n"
"100%|██████████| 4/4 [00:00<00:00, 5.39it/s]\n"
]
},
{
Expand Down Expand Up @@ -1029,7 +1016,7 @@
" 122.22 -18.21 0.368303 0.588129"
]
},
"execution_count": 51,
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -1057,7 +1044,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": ".venv",
"language": "python",
"name": "python3"
},
Expand Down
Loading

0 comments on commit b4d4bf4

Please sign in to comment.