Skip to content

Commit 21d779f

Browse files
authored
Merge pull request #2 from interTwin-eu/update
merge update to main
2 parents f43e1d1 + c69e90e commit 21d779f

File tree

231 files changed

+4733
-1086
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

231 files changed

+4733
-1086
lines changed
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: Build and Publish Docker Images
2+
3+
on:
4+
push:
5+
branches: [main, update]
6+
paths:
7+
- 'docker/**'
8+
- '.github/workflows/docker-*.yaml'
9+
- '.github/workflows/docker-*.yml'
10+
release:
11+
types: [published]
12+
workflow_dispatch:
13+
14+
env:
15+
REGISTRY: ghcr.io
16+
IMAGE_NAME: ${{ github.repository }}
17+
18+
jobs:
19+
build-and-push:
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: read
23+
packages: write
24+
25+
strategy:
26+
matrix:
27+
component: [hydromt, surrogate, wflow]
28+
29+
steps:
30+
- name: Show initial disk usage
31+
run: df -h
32+
33+
- name: Free up disk space and move Docker storage
34+
run: |
35+
echo "=== Cleaning up system to free space ==="
36+
sudo apt-get clean
37+
sudo apt-get autoremove -y
38+
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
39+
40+
echo "=== Removing preinstalled Docker images and cache ==="
41+
docker image prune -af || true
42+
docker builder prune -af || true
43+
sudo rm -rf /var/lib/docker || true
44+
45+
echo "=== Moving Docker data to /mnt/docker for more space ==="
46+
sudo mkdir -p /mnt/docker
47+
sudo systemctl stop docker
48+
sudo rsync -aP /var/lib/docker/ /mnt/docker/ || true
49+
sudo rm -rf /var/lib/docker
50+
sudo ln -s /mnt/docker /var/lib/docker
51+
sudo systemctl start docker
52+
53+
echo "=== Running final cleanup ==="
54+
docker system prune -af --volumes || true
55+
echo "=== Disk usage after cleanup ==="
56+
df -h
57+
58+
- name: Checkout repository
59+
uses: actions/checkout@v4
60+
61+
- name: Set up Docker Buildx
62+
uses: docker/setup-buildx-action@v3
63+
64+
- name: Log in to GitHub Container Registry
65+
uses: docker/login-action@v3
66+
with:
67+
registry: ${{ env.REGISTRY }}
68+
username: ${{ github.actor }}
69+
password: ${{ secrets.GITHUB_TOKEN }}
70+
71+
- name: Extract metadata
72+
id: meta
73+
uses: docker/metadata-action@v5
74+
with:
75+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/${{ matrix.component }}
76+
tags: |
77+
type=raw,value=latest,enable={{is_default_branch}}
78+
type=sha
79+
80+
- name: Build and push Docker image
81+
uses: docker/build-push-action@v5
82+
with:
83+
context: ./docker/${{ matrix.component }}
84+
file: ./docker/${{ matrix.component }}/Dockerfile
85+
push: true
86+
load: false
87+
tags: ${{ steps.meta.outputs.tags }}
88+
labels: ${{ steps.meta.outputs.labels }}
89+
platforms: linux/amd64
90+
cache-from: type=gha,scope=${{ matrix.component }}
91+
cache-to: type=gha,mode=max,scope=${{ matrix.component }}
92+
build-args: |
93+
BUILDKIT_INLINE_CACHE=1
94+
95+
- name: Clean up after build
96+
if: always()
97+
run: |
98+
echo "=== Cleaning up after build ==="
99+
docker system prune -af --volumes || true
100+
echo "=== Final disk usage ==="
101+
df -h

.gitignore

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
11
!hydromt/cwl/81iegmjn/
22

33
.oscar-venv/
4+
.env*
5+
tests/*.z*
46

7+
scripts/
8+
9+
.secrets.baseline
510
/openeo/hydromt/hydromt-output/
611
/openeo/wflow/wflow-output/
712
/openeo/surrogate/surrogate-output/
813

9-
tests/tmp/
1014

15+
docker/surrogate/src/outputs/
16+
tests/tmp/
17+
tests/tmp*
1118
.venv
1219
object_urls.txt
1320

14-
*.geojson
21+
1522
*.nc
1623
*.log
1724
.vscode/

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[submodule "example/openeo-processes-dask"]
2+
path = example/openeo-processes-dask
3+
url = https://github.com/jzvolensky/openeo-processes-dask.git
4+
branch = run_oscar

.pre-commit-config.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.4.0
4+
hooks:
5+
- id: check-yaml
6+
- id: end-of-file-fixer
7+
- id: trailing-whitespace
8+
- id: check-added-large-files
9+
- id: check-merge-conflict
10+
- id: debug-statements
11+
- id: check-docstring-first
12+
- repo: https://github.com/pre-commit/mirrors-autopep8
13+
rev: v2.0.4
14+
hooks:
15+
- id: autopep8
16+
args: [--in-place, --aggressive, --aggressive, --max-line-length=88]
17+
- repo: https://github.com/psf/black
18+
rev: 23.12.1
19+
hooks:
20+
- id: black
21+
language_version: python3
22+
args: [--line-length=88]
23+
- repo: https://github.com/pycqa/isort
24+
rev: 5.13.2
25+
hooks:
26+
- id: isort
27+
args: [--profile=black, --line-length=88]
28+
- repo: https://github.com/pycqa/flake8
29+
rev: 7.0.0
30+
hooks:
31+
- id: flake8
32+
args: [--max-line-length=88, --ignore=E203,W503]
33+
exclude: ^(archive/|docker/dummy/)

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,25 @@
55
Since we are working on 1 branch now and my commit messages are getting \
66
ridiculously long, I thought it would be a good idea to start a changelog.
77

8+
## 01/11/2025 preparation for the review
9+
10+
### Changes
11+
12+
- Move old stuff to the archive
13+
- Rework the README to reflect the current state of the project
14+
- Update the environment.yaml to include all necessary packages for local development
15+
- add `example/usecase.ipynb` with a simple OpenEO workflow to run the use case
16+
- Add github action to build and push the docker images
17+
- Add documentation for the new features and changes
18+
- Updated labels of docker images in the Dockerfiles
19+
20+
### In progress
21+
22+
- Final fixes for the use case containers
23+
- Final testing and preparation of the use case example
24+
- Final review of the documentation
25+
- SQAaaS integration after this update
26+
827
## 10/07/2024 Reworking the project structure in preparation for OpenEO demo
928

1029
### Fixes

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Contributing to HyDroForM (WIP)
1+
# Contributing to HyDroForM
22

33
First off, thanks for taking the time to contribute! ❤️
44

@@ -39,7 +39,7 @@ We will then take care of the issue as soon as possible.
3939

4040
## I Want To Contribute
4141

42-
> ### Legal Notice
42+
> ### Legal Notice
4343
> When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license.
4444
4545
### Reporting Bugs
@@ -101,7 +101,7 @@ Enhancement suggestions are tracked as [GitHub issues](/issues).
101101
- Use a **clear and descriptive title** for the issue to identify the suggestion.
102102
- Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
103103
- **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives do not work for you.
104-
- You may want to **include screenshots and animated GIFs** which help you demonstrate the steps or point out the part which the suggestion is related to. You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux.
104+
- You may want to **include screenshots and animated GIFs** which help you demonstrate the steps or point out the part which the suggestion is related to. You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux.
105105
- **Explain why this enhancement would be useful** to most CONTRIBUTING.md users. You may also want to point out the other projects that solved it better and which could serve as inspiration.
106106

107107

0 commit comments

Comments
 (0)