Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: test

on:
push:
branches: ["master"]
pull_request:
branches: ["master"]

jobs:
test:
name: "Test - Python ${{ matrix.python-version}}"
runs-on: ubuntu-24.04

strategy:
matrix:
python-version: ["3.10", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4

- name: Install Poetry
run: pipx install poetry==2.1.3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"

- name: Install dependencies
run: poetry install --with dev

- name: Test with Pytest
run: poetry run pytest
29 changes: 29 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: precommit

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
precommit:
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- name: Clone repo
uses: actions/checkout@v4

- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install Poetry
run: pipx install poetry==2.1.3

- name: Install ogs_riverger
run: poetry install --with dev

- name: Run precommit
run: poetry run pre-commit run --show-diff-on-failure --color=always --all-files
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea/
**/__pycache__/
.env
.run/*
10 changes: 5 additions & 5 deletions src/ogs_riverger/efas/efas_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,11 +670,11 @@ def _read_unzipped_efas_files(
f"ValueError while trying to read file {file_path}"
) from e

logger.debug("Retrieving rivers' data from the map")
file_content = single_ds.isel(
longitude=lon_indices - i_lon1,
latitude=lat_indices - i_lat1,
).load()
logger.debug("Retrieving rivers' data from the map")
file_content = single_ds.isel(
longitude=lon_indices - i_lon1,
latitude=lat_indices - i_lat1,
).load()

# Remove the surface variable
if "surface" in file_content:
Expand Down
Loading