Skip to content

Commit b32065c

Browse files
authored
Merge branch 'main' into feat/add-s1-slc-burst-selection-notebook
2 parents 08992f7 + 9dcfae8 commit b32065c

23 files changed

Lines changed: 2685 additions & 5962 deletions

.github/workflows/pre-commit.yaml

Lines changed: 0 additions & 81 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ exclude: "generate_gallery.py"
2828
repos:
2929
# Autoformat and lint Python code (exclude notebooks from ruff-format)
3030
- repo: https://github.com/astral-sh/ruff-pre-commit
31-
rev: v0.9.6
31+
rev: v0.15.7
3232
hooks:
3333
- id: ruff
3434
types_or: [python, jupyter]
@@ -45,7 +45,7 @@ repos:
4545

4646
# Autoformat and linting, misc. details
4747
- repo: https://github.com/pre-commit/pre-commit-hooks
48-
rev: v4.5.0
48+
rev: v6.0.0
4949
hooks:
5050
- id: end-of-file-fixer
5151
- id: requirements-txt-fixer
@@ -54,21 +54,21 @@ repos:
5454

5555
# Black for Python files
5656
- repo: https://github.com/psf/black-pre-commit-mirror
57-
rev: 24.8.0
57+
rev: 26.3.1
5858
hooks:
5959
- id: black
6060
types: [python]
6161

6262
# Black for Jupyter notebooks
6363
- repo: https://github.com/psf/black-pre-commit-mirror
64-
rev: 24.8.0
64+
rev: 26.3.1
6565
hooks:
6666
- id: black-jupyter
6767
types: [jupyter]
6868

6969
# NBQA for notebook-specific black formatting
7070
- repo: https://github.com/nbQA-dev/nbQA
71-
rev: 1.9.0
71+
rev: 1.9.1
7272
hooks:
7373
- id: nbqa-black
7474
types: [jupyter]

add-jupyterhub-button.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const plugin = {
7070
jupyterHubUrl =
7171
"https://jupyterhub.user.eopf.eodc.eu/hub/login?next=" +
7272
encodeURIComponent(spawn_next) +
73-
"%23fancy-forms-config=%7B%22profile%22%3A%22choose-your-environment%22%2C%22image%22%3A%22unlisted_choice%22%2C%22image%3Aunlisted_choice%22%3A%22yuvraj1989%2Feopf-zarr-driver%3Alatest%22%2C%20%22autoStart%22%3A%22true%22%7D";
73+
"%23fancy-forms-config=%7B%22profile%22%3A%22choose-your-environment%22%2C%22image%22%3A%22unlisted_choice%22%2C%22image%3Aunlisted_choice%22%3A%22yuvraj1989%2Feopf-zarr-driver%3A4.1%22%2C%20%22autoStart%22%3A%22true%22%7D";
7474
} else {
7575
jupyterHubUrl =
7676
"https://jupyterhub.user.eopf.eodc.eu/hub/login?next=" +

gallery-page.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,12 @@ const plugin = {
172172
description:
173173
"Notebooks demonstrating XArray, GDAL, XCube, Zarr, and more",
174174
},
175+
{
176+
title: "🔧 Tutorials",
177+
link: "gallery-tutorials",
178+
description:
179+
"Notebooks demonstrating the main workflows for accessing and working with the data.",
180+
},
175181
];
176182

177183
const cards = categories.map((cat) => ({
@@ -304,6 +310,8 @@ function getTagIcon(tag) {
304310
gdal: "🗺️",
305311
stac: "📋",
306312
zarr: "📦",
313+
dask: "🧮",
314+
basic: "👶",
307315
};
308316
return icons[tag] || "🏷️";
309317
}

generate_gallery.py

Lines changed: 75 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -286,19 +286,61 @@ def generate_gallery_pages(notebook_tags, output_dir="notebooks"):
286286
# Generate main gallery index
287287
with open(f"{output_dir}/gallery.md", "w") as f:
288288
f.write("""---
289-
title: Notebook Gallery
289+
title: Gallery
290290
---
291291
292-
# Notebook Gallery
292+
## How to run the notebooks
293293
294-
```{gallery-grid}
295-
:category: all
296-
:columns: 1 1 2 3
297-
```
294+
The notebooks can be run on the **EOPF Sentinel Zarr Samples JupyterHub**. Each notebook integrates a Launch in JupyterHub button.
295+
296+
![Screenshot: Launch Notebook button](static/launch_notebook.jpg)
297+
298+
---
299+
300+
Click **Sign in with CDSE IdP** to proceed.
301+
302+
You will be redirected to the CDSE login page:
303+
304+
![Screenshot: CDSE Login Page](static/CDSE_login.png)
305+
306+
---
307+
308+
Please log in using your **CDSE user account**.
309+
If you do not have one, create one now, it's free!
310+
311+
Once logged in, you will be able to run your notebook in JupyterLab!
312+
313+
---
314+
315+
If you encounter any problem or have suggestions, please let us know on GitHub, opening a new issue [here](https://github.com/EOPF-Sample-Service/eopf-sample-notebooks/issues).
298316
299-
""")
300317
301-
f.write("<!-- Generated by gallery plugin -->\n")
318+
## Notebooks Gallery
319+
320+
Click on the category to explore the corresponding notebooks!
321+
322+
### Sentinel Data
323+
<a class="link" href="gallery-sentinel#sentinel-1" ><p style="background-color:white;"><span class="gallery-tag tag-sentinel-1">🛰️ sentinel-1</span></p></a>
324+
<a class="link" href="gallery-sentinel#sentinel-2" ><p style="background-color:white;"><span class="gallery-tag tag-sentinel-2">🛰️ sentinel-2</span></p></a>
325+
<a class="link" href="gallery-sentinel#sentinel-3" ><p style="background-color:white;"><span class="gallery-tag tag-sentinel-3">🛰️ sentinel-3</span></p></a>
326+
327+
### Application Topics
328+
<a class="link" href="gallery-topics#land-applications" ><p style="background-color:white;"><span class="gallery-tag tag-land">🌱 land</span></p></a>
329+
<a class="link" href="gallery-topics#climate-monitoring" ><p style="background-color:white;"><span class="gallery-tag tag-climate-change">🌡️ climate-change</span></p></a>
330+
<a class="link" href="gallery-topics#marine-applications" ><p style="background-color:white;"><span class="gallery-tag tag-marine">🌊 marine</span></p></a>
331+
<a class="link" href="gallery-topics#emergency-and-security-applications" ><p style="background-color:white;"><span class="gallery-tag tag-security">🔒 security</span></p></a>
332+
333+
### Tools & Libraries
334+
<a class="link" href="gallery-tools/#xarray" ><p style="background-color:white;"><span class="gallery-tag tag-xarray">📊 xarray</span></p></a>
335+
<a class="link" href="gallery-tools/#xarray-eopf-plugin" ><p style="background-color:white;"><span class="gallery-tag tag-xarray-eopf">🔌 xarray-eopf</span></p></a>
336+
<a class="link" href="gallery-tools/#xcube-eopf-plugin" ><p style="background-color:white;"><span class="gallery-tag tag-xcube">🏷️ xcube</span></p></a>
337+
<a class="link" href="gallery-tools/#gdal" ><p style="background-color:white;"><span class="gallery-tag tag-gdal">🗺️ gdal</span></p></a>
338+
339+
### Basic Tutorials
340+
<a class="link" href="gallery-tutorials/#dask" ><p style="background-color:white;"><span class="gallery-tag tag-dask">🧮 dask</span></p></a>
341+
<a class="link" href="gallery-tutorials/#basic-data-access" ><p style="background-color:white;"><span class="gallery-tag tag-basic">👶 basic</span></p></a>
342+
343+
""")
302344

303345
# Generate Sentinel category page
304346
with open(categories["sentinel"]["file"], "w") as f:
@@ -308,6 +350,10 @@ def generate_gallery_pages(notebook_tags, output_dir="notebooks"):
308350
309351
# {categories["sentinel"]["title"]}
310352
353+
<a class="link" href="gallery-sentinel#sentinel-1" ><p style="background-color:white;"><span class="gallery-tag tag-sentinel-1">🛰️ sentinel-1</span></p></a>
354+
<a class="link" href="gallery-sentinel#sentinel-2" ><p style="background-color:white;"><span class="gallery-tag tag-sentinel-2">🛰️ sentinel-2</span></p></a>
355+
<a class="link" href="gallery-sentinel#sentinel-3" ><p style="background-color:white;"><span class="gallery-tag tag-sentinel-3">🛰️ sentinel-3</span></p></a>
356+
311357
{categories["sentinel"]["description"]}
312358
313359
## Sentinel-1
@@ -341,6 +387,12 @@ def generate_gallery_pages(notebook_tags, output_dir="notebooks"):
341387
342388
# {categories["topics"]["title"]}
343389
390+
<a class="link" href="gallery-topics#land-applications" ><p style="background-color:white;"><span class="gallery-tag tag-land">🌱 land</span></p></a>
391+
<a class="link" href="gallery-topics#climate-monitoring" ><p style="background-color:white;"><span class="gallery-tag tag-climate-change">🌡️ climate-change</span></p></a>
392+
<a class="link" href="gallery-topics#marine-applications" ><p style="background-color:white;"><span class="gallery-tag tag-marine">🌊 marine</span></p></a>
393+
<a class="link" href="gallery-topics#emergency-and-security-applications" ><p style="background-color:white;"><span class="gallery-tag tag-security">🔒 security</span></p></a>
394+
395+
344396
{categories["topics"]["description"]}
345397
346398
## Land Applications
@@ -381,6 +433,11 @@ def generate_gallery_pages(notebook_tags, output_dir="notebooks"):
381433
382434
# {categories["tools"]["title"]}
383435
436+
<a class="link" href="gallery-tools/#xarray" ><p style="background-color:white;"><span class="gallery-tag tag-xarray">📊 xarray</span></p></a>
437+
<a class="link" href="gallery-tools/#xarray-eopf-plugin" ><p style="background-color:white;"><span class="gallery-tag tag-xarray-eopf">🔌 xarray-eopf</span></p></a>
438+
<a class="link" href="gallery-tools/#xcube-eopf-plugin" ><p style="background-color:white;"><span class="gallery-tag tag-xcube">🏷️ xcube</span></p></a>
439+
<a class="link" href="gallery-tools/#gdal" ><p style="background-color:white;"><span class="gallery-tag tag-gdal">🗺️ gdal</span></p></a>
440+
384441
{categories["tools"]["description"]}
385442
386443
## Xarray
@@ -422,27 +479,31 @@ def generate_gallery_pages(notebook_tags, output_dir="notebooks"):
422479

423480
# Generate Tutorials category page
424481
with open(categories["tutorials"]["file"], "w") as f:
425-
f.write("""---
426-
title: Tutorials
482+
f.write(f"""---
483+
title: {categories["tutorials"]["title"]}
427484
---
428485
429-
# Tutorials
486+
# {categories["tutorials"]["title"]}
430487
431-
Notebooks demonstrating the main workflows for accessing and working with the data
488+
<a class="link" href="gallery-tutorials/#dask" ><p style="background-color:white;"><span class="gallery-tag tag-dask">🧮 dask</span></p></a>
489+
<a class="link" href="gallery-tutorials/#basic-data-access" ><p style="background-color:white;"><span class="gallery-tag tag-basic">👶 basic</span></p></a>
490+
491+
{categories["tutorials"]["description"]}
432492
433493
## Dask
434494
435-
```{gallery-grid}
495+
```{{gallery-grid}}
436496
:category: dask
437497
:columns: 1 1 2 3
438498
```
439499
440500
## Basic Data Access
441501
442-
```{gallery-grid}
502+
```{{gallery-grid}}
443503
:category: basic
444504
:columns: 1 1 2 3
445505
```
506+
446507
""")
447508

448509

myst.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ project:
2121
license:
2222
content: CC-BY-4.0
2323
code: Apache-2.0
24-
copyright: "2025"
24+
copyright: "2026"
2525
toc:
2626
# Main navigation
2727
- file: notebooks/README.md
@@ -67,12 +67,13 @@ project:
6767
- file: notebooks/Sentinel-1/Sentinel-1_Soil_moisture.ipynb
6868
- file: notebooks/Sentinel-3/GDAL_Sentinel-3_Multi-Product-Demo.ipynb
6969
- file: notebooks/Sentinel-1/GDAL_Sentinel-1_SLC_Burst_Selection.ipynb
70+
- file: notebooks/Sentinel-1/GDAL_Sentinel-1_GCP_Geolocation.ipynb
7071

7172
# Gallery categories (visible in navigation)
72-
- file: notebooks/gallery-tutorials.md
7373
- file: notebooks/gallery-sentinel.md
7474
- file: notebooks/gallery-topics.md
7575
- file: notebooks/gallery-tools.md
76+
- file: notebooks/gallery-tutorials.md
7677
subject: earth and related environmental sciences
7778

7879
site:

0 commit comments

Comments
 (0)