Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
b01de4d
Add reproduction scripts and tests for Zarr consolidation issue #3289
emmanuelmathot Aug 11, 2025
6b8d6bc
Merge branch 'main' into consolidated_metadata_issue
emmanuelmathot Aug 12, 2025
99b520b
Consolidate metadata at root level for consistent Zarr access and upd…
emmanuelmathot Aug 12, 2025
623a74f
Refactor recursive_copy to iterative_copy for improved performance an…
emmanuelmathot Aug 12, 2025
789a80d
Enhance CRS handling in prepare_dataset_with_crs_info by adding grid_…
emmanuelmathot Aug 13, 2025
a693ef4
Implement code changes to enhance functionality and improve performance
emmanuelmathot Aug 13, 2025
1a75cc0
Update launch.json to modify GeoZarr conversion arguments and enhance…
emmanuelmathot Aug 13, 2025
7b256ed
Add storage options to dataset opening in write_dataset_band_by_band_…
emmanuelmathot Aug 13, 2025
eeaf26b
Update AWS endpoint variable name in launch.json for consistency
emmanuelmathot Aug 13, 2025
7d8de81
Remove obsolete test scripts related to zarr consolidation scenarios
emmanuelmathot Aug 13, 2025
0bfff88
Remove zarr consolidation issue analysis document as it is no longer …
emmanuelmathot Aug 13, 2025
db27998
Refactor geozarr.py and utils.py for improved readability and consist…
emmanuelmathot Aug 13, 2025
7e4227a
Refactor code for improved readability and consistency
emmanuelmathot Aug 13, 2025
cbae676
Update AWS endpoint variable name for consistency across documentatio…
emmanuelmathot Aug 13, 2025
9793f8a
Refactor type hints for improved clarity and consistency across modules
emmanuelmathot Aug 13, 2025
5b7b24b
Refactor test cases for prepare_dataset_with_crs_info to improve clar…
emmanuelmathot Aug 13, 2025
0d8eb59
Refactor prepare_dataset_with_crs_info calls for improved readability
emmanuelmathot Aug 13, 2025
2dd651a
Refactor test for prepare_dataset_with_crs_info to enhance clarity an…
emmanuelmathot Aug 13, 2025
2128fde
Refactor pyproject.toml for improved formatting and dependency manage…
emmanuelmathot Aug 13, 2025
80c3fb8
Remove code quality workflow configuration
emmanuelmathot Aug 13, 2025
8345338
Add proj-bin installation to CI and documentation workflows
emmanuelmathot Aug 13, 2025
f8131b1
Fix sudo usage in documentation workflow for dependency installation
emmanuelmathot Aug 13, 2025
1a9de21
Consolidate dependency installation steps and remove unused documenta…
emmanuelmathot Aug 13, 2025
a79e851
Add pyproj as a dependency for geospatial functionality
emmanuelmathot Aug 13, 2025
5066bb4
Add gdal-bin installation to CI and documentation workflows
emmanuelmathot Aug 13, 2025
6260e5e
Add libgdal-dev installation to CI and documentation workflows
emmanuelmathot Aug 13, 2025
e34fdab
Update dependency installation to use --only-binary option for pip
emmanuelmathot Aug 13, 2025
7480a26
Merge branch 'main' into consolidated_metadata_issue
emmanuelmathot Aug 13, 2025
845330c
Update validate-pyproject version to v0.24.1 in pre-commit configuration
emmanuelmathot Aug 13, 2025
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
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,14 @@ jobs:

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y proj-bin gdal-bin libgdal-dev
python -m pip install --upgrade pip
pip install -e ".[dev,test]"
pip install -e ".[dev,test]" --only-binary=:all:

- name: Run network tests
run: |
python -m pytest eopf_geozarr/tests/ -v --tb=short -m "network"

security:
runs-on: ubuntu-latest
steps:
Expand Down
89 changes: 0 additions & 89 deletions .github/workflows/code-quality.yml

This file was deleted.

4 changes: 3 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ jobs:

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y proj-bin gdal-bin libgdal-dev
python -m pip install --upgrade pip
pip install -e ".[docs]"
pip install -e ".[docs]" --only-binary=:all:

- name: Build documentation
run: |
Expand Down
49 changes: 17 additions & 32 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,44 +1,29 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.24.1
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-merge-conflict
- id: check-toml
- id: debug-statements
- id: validate-pyproject

- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
language_version: python3

- repo: https://github.com/pycqa/isort
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black"]
language_version: python

- repo: https://github.com/pycqa/flake8
rev: 6.0.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.4
hooks:
- id: flake8
additional_dependencies: [flake8-docstrings]
args: [--max-line-length=150, --extend-ignore=E203]
- id: ruff
args: ["--fix"]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
rev: v1.11.2
hooks:
- id: mypy
additional_dependencies: [types-requests, types-setuptools]
args: [--ignore-missing-imports]

- repo: https://github.com/pycqa/bandit
rev: 1.7.5
hooks:
- id: bandit
args: ["-c", "pyproject.toml"]
additional_dependencies: ["bandit[toml]"]
language_version: python
exclude: tests/.*
additional_dependencies:
- types-simplejson
- types-attrs
- pydantic~=2.0
21 changes: 14 additions & 7 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"PYTHONPATH": "${workspaceFolder}/.venv/bin",
"AWS_PROFILE": "eopf-explorer",
"AWS_DEFAULT_REGION": "de",
"AWS_S3_ENDPOINT": "https://s3.de.io.cloud.ovh.net/"
"AWS_ENDPOINT_URL": "https://s3.de.io.cloud.ovh.net/"
},

},
Expand Down Expand Up @@ -84,7 +84,7 @@
"PYTHONPATH": "${workspaceFolder}/.venv/bin",
"AWS_PROFILE": "eopf-explorer",
"AWS_DEFAULT_REGION": "de",
"AWS_S3_ENDPOINT": "https://s3.de.io.cloud.ovh.net/"
"AWS_ENDPOINT_URL": "https://s3.de.io.cloud.ovh.net/"
},

},
Expand All @@ -96,10 +96,17 @@
"module": "eopf_geozarr",
"args": [
"convert",
"https://objects.eodc.eu/e05ab01a9d56408d82ac32d69a5aae2a:202507-s02msil2a/04/products/cpm_v256/S2A_MSIL2A_20250704T094051_N0511_R036_T33SWB_20250704T115824.zarr",
"s3://esa-zarr-sentinel-explorer-fra/tests-output/eopf_geozarr/S2A_MSIL2A_20250704T094051_N0511_R036_T33SWB_20250704T115824.zarr",
// "https://objects.eodc.eu/e05ab01a9d56408d82ac32d69a5aae2a:202507-s02msil2a/04/products/cpm_v256/S2A_MSIL2A_20250704T094051_N0511_R036_T33SWB_20250704T115824.zarr",
// "https://objects.eodc.eu/e05ab01a9d56408d82ac32d69a5aae2a:202508-s02msil2a/04/products/cpm_v256/S2B_MSIL2A_20250804T103629_N0511_R008_T31TDH_20250804T130722.zarr",
// "https://objects.eodc.eu/e05ab01a9d56408d82ac32d69a5aae2a:202508-s02msil2a/07/products/cpm_v256/S2B_MSIL2A_20250807T104619_N0511_R051_T31TDH_20250807T131144.zarr",
"https://objects.eodc.eu/e05ab01a9d56408d82ac32d69a5aae2a:202508-s02msil2a/11/products/cpm_v256/S2C_MSIL2A_20250811T112131_N0511_R037_T29TPF_20250811T152216.zarr",
// "s3://esa-zarr-sentinel-explorer-fra/tests-output/eopf_geozarr/S2A_MSIL2A_20250704T094051_N0511_R036_T33SWB_20250704T115824.zarr",
// "s3://esa-zarr-sentinel-explorer-fra/tests-output/eopf_geozarr/S2B_MSIL2A_20250804T103629_N0511_R008_T31TDH_20250804T130722.zarr",
// "s3://esa-zarr-sentinel-explorer-fra/tests-output/eopf_geozarr/S2B_MSIL2A_20250807T104619_N0511_R051_T31TDH_20250807T131144.zarr",
"s3://esa-zarr-sentinel-explorer-fra/tests-output/eopf_geozarr/S2C_MSIL2A_20250811T112131_N0511_R037_T29TPF_20250811T152216.zarr",
"--groups", "/measurements/reflectance/r10m", "/measurements/reflectance/r20m", "/measurements/reflectance/r60m", "/quality/l2a_quicklook/r10m",
"--spatial-chunk", "1024",
"--crs-groups", "/conditions/geometry",
"--spatial-chunk", "512",
"--min-dimension", "256",
"--tile-width", "256",
"--max-retries", "2",
Expand All @@ -113,7 +120,7 @@
"PYTHONPATH": "${workspaceFolder}/.venv/bin",
"AWS_PROFILE": "eopf-explorer",
"AWS_DEFAULT_REGION": "de",
"AWS_S3_ENDPOINT": "https://s3.de.io.cloud.ovh.net/"
"AWS_ENDPOINT_URL": "https://s3.de.io.cloud.ovh.net/"
},

},
Expand Down Expand Up @@ -154,7 +161,7 @@
"PYTHONPATH": "${workspaceFolder}/.venv/bin",
"AWS_PROFILE": "eopf-explorer",
"AWS_DEFAULT_REGION": "de",
"AWS_S3_ENDPOINT": "https://s3.de.io.cloud.ovh.net/"
"AWS_ENDPOINT_URL": "https://s3.de.io.cloud.ovh.net/"
},

}
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,21 +94,21 @@ export AWS_DEFAULT_REGION=us-east-1
export AWS_ACCESS_KEY_ID=your_ovh_access_key
export AWS_SECRET_ACCESS_KEY=your_ovh_secret_key
export AWS_DEFAULT_REGION=gra # or other OVH region
export AWS_S3_ENDPOINT=https://s3.gra.cloud.ovh.net # OVH endpoint
export AWS_ENDPOINT_URL=https://s3.gra.cloud.ovh.net # OVH endpoint
```

**For other S3-compatible providers:**
```bash
export AWS_ACCESS_KEY_ID=your_access_key
export AWS_SECRET_ACCESS_KEY=your_secret_key
export AWS_DEFAULT_REGION=your_region
export AWS_S3_ENDPOINT=https://your-s3-endpoint.com
export AWS_ENDPOINT_URL=https://your-s3-endpoint.com
```

**Alternative: AWS CLI Configuration**
```bash
aws configure
# Note: For custom endpoints, you'll still need to set AWS_S3_ENDPOINT
# Note: For custom endpoints, you'll still need to set AWS_ENDPOINT_URL
```

#### S3 Features
Expand Down Expand Up @@ -166,7 +166,7 @@ from eopf_geozarr import create_geozarr_dataset
os.environ['AWS_ACCESS_KEY_ID'] = 'your_ovh_access_key'
os.environ['AWS_SECRET_ACCESS_KEY'] = 'your_ovh_secret_key'
os.environ['AWS_DEFAULT_REGION'] = 'gra'
os.environ['AWS_S3_ENDPOINT'] = 'https://s3.gra.cloud.ovh.net'
os.environ['AWS_ENDPOINT_URL'] = 'https://s3.gra.cloud.ovh.net'

# Load your EOPF DataTree
dt = xr.open_datatree("path/to/eopf/dataset.zarr", engine="zarr")
Expand Down
4 changes: 2 additions & 2 deletions eopf_geozarr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
create_geozarr_dataset,
downsample_2d_array,
is_grid_mapping_variable,
recursive_copy,
iterative_copy,
setup_datatree_metadata_geozarr_spec_compliant,
validate_existing_band_data,
)
Expand All @@ -20,7 +20,7 @@
"__version__",
"create_geozarr_dataset",
"setup_datatree_metadata_geozarr_spec_compliant",
"recursive_copy",
"iterative_copy",
"consolidate_metadata",
"async_consolidate_metadata",
"downsample_2d_array",
Expand Down
Loading
Loading