From dece4050e6e93bdaae984fe8f3d28bdcc39f3eb8 Mon Sep 17 00:00:00 2001 From: Kristof Van Tricht Date: Wed, 5 Jun 2024 08:15:53 +0200 Subject: [PATCH 1/8] Attempt to fix jenkins build --- Jenkinsfile | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ba6e29fa..39c435ec 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,10 +1,6 @@ #!/usr/bin/env groovy -/* - This Jenkinsfile is used to provide snapshot builds using the VITO CI system. Travis is used to provide publicly accessible test results. - This Jenkinsfile uses the Jenkins shared library. (ssh://git@git.vito.local:7999/biggeo/jenkinslib.git) - Information about the pythonPipeline method can be found in pythonPipeline.groovy -*/ +/* Jenkinsfile for snapshot building with VITO CI system. */ @Library('lib')_ @@ -12,23 +8,8 @@ pythonPipeline { package_name = 'worldcereal-classification' wipeout_workspace = true python_version = ["3.10"] + extras_require = 'dev' upload_dev_wheels = false pipeline_triggers = [cron('H H(0-6) * * *')] - wheel_repo = 'python-packages-public' - wheel_repo_dev = 'python-packages-public-snapshot' pep440 = true - venv_rpm_deps = ['gcc', 'gcc-c++'] - extra_env_variables = [ - 'OPENEO_AUTH_METHOD=client_credentials', - ] - extra_env_secrets = [ - // Secrets for Terrascope openEO backend (openeo.vito.be) - 'OPENEO_AUTH_PROVIDER_ID': 'TAP/big_data_services/openeo/openeo-cropclass-service-account provider_id', - 'OPENEO_AUTH_CLIENT_ID': 'TAP/big_data_services/openeo/openeo-cropclass-service-account client_id', - 'OPENEO_AUTH_CLIENT_SECRET': 'TAP/big_data_services/openeo/openeo-cropclass-service-account client_secret', - // Secrets for CDSE openEO backend (openeo-staging.dataspace.copernicus.eu) - 'OPENEO_AUTH_CDSE_PROVIDER_ID': 'TAP/big_data_services/openeo/openeo-cropclass-service-account-cdse provider_id', - 'OPENEO_AUTH_CDSE_CLIENT_ID': 'TAP/big_data_services/openeo/openeo-cropclass-service-account-cdse client_id', - 'OPENEO_AUTH_CDSE_CLIENT_SECRET': 'TAP/big_data_services/openeo/openeo-cropclass-service-account-cdse client_secret', - ] } From bb3ec8088fe38109d9f2cb9b2b45b9c5436c9ab1 Mon Sep 17 00:00:00 2001 From: Kristof Van Tricht Date: Wed, 5 Jun 2024 10:44:14 +0200 Subject: [PATCH 2/8] Added test_module_name --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 39c435ec..6e613f82 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,6 +6,7 @@ pythonPipeline { package_name = 'worldcereal-classification' + test_module_name = 'worldcereal_classification' wipeout_workspace = true python_version = ["3.10"] extras_require = 'dev' From 06d863b09fc514c416f4924ca69ff4f96f1e2f86 Mon Sep 17 00:00:00 2001 From: Kristof Van Tricht Date: Wed, 5 Jun 2024 10:48:27 +0200 Subject: [PATCH 3/8] local processing option not needed --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6b6133dd..7359f240 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,7 +33,7 @@ dependencies = [ "rioxarray>=0.13.0", "loguru>=0.7.2", "h5netcdf>=1.2.0", - "openeo[localprocessing]", + "openeo", "cftime", "pytest-depends", "pyarrow", From 52f0893cb0297616b4c62dbdb07b260b4650cc4d Mon Sep 17 00:00:00 2001 From: Kristof Van Tricht Date: Wed, 5 Jun 2024 10:49:11 +0200 Subject: [PATCH 4/8] Minimum openeo version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7359f240..bd044453 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,7 +33,7 @@ dependencies = [ "rioxarray>=0.13.0", "loguru>=0.7.2", "h5netcdf>=1.2.0", - "openeo", + "openeo>=0.29.0", "cftime", "pytest-depends", "pyarrow", From 472ccb7c6f6184828a59e6f299ee7f0a8bd51722 Mon Sep 17 00:00:00 2001 From: Kristof Van Tricht Date: Wed, 5 Jun 2024 10:52:01 +0200 Subject: [PATCH 5/8] Updated test_module_name --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6e613f82..489e5128 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,7 +6,7 @@ pythonPipeline { package_name = 'worldcereal-classification' - test_module_name = 'worldcereal_classification' + test_module_name = 'worldcereal' wipeout_workspace = true python_version = ["3.10"] extras_require = 'dev' From 6a1e165a9c519e1de2293b1277e01e09615c783d Mon Sep 17 00:00:00 2001 From: Kristof Van Tricht Date: Wed, 5 Jun 2024 11:21:03 +0200 Subject: [PATCH 6/8] black fixes --- scripts/extractions/extract_meteo.py | 1 + scripts/extractions/extract_optical.py | 1 + scripts/extractions/extract_sar.py | 1 + 3 files changed, 3 insertions(+) diff --git a/scripts/extractions/extract_meteo.py b/scripts/extractions/extract_meteo.py index 91ac84b7..6a081476 100644 --- a/scripts/extractions/extract_meteo.py +++ b/scripts/extractions/extract_meteo.py @@ -1,4 +1,5 @@ """Extract AGERA5 (Meteo) data using OpenEO-GFMAP package.""" + import argparse from functools import partial from pathlib import Path diff --git a/scripts/extractions/extract_optical.py b/scripts/extractions/extract_optical.py index 7fc952f2..e20ab97d 100644 --- a/scripts/extractions/extract_optical.py +++ b/scripts/extractions/extract_optical.py @@ -1,4 +1,5 @@ """Extract S2 data using OpenEO-GFMAP package.""" + import argparse import json from datetime import datetime diff --git a/scripts/extractions/extract_sar.py b/scripts/extractions/extract_sar.py index 199c163d..85066d24 100644 --- a/scripts/extractions/extract_sar.py +++ b/scripts/extractions/extract_sar.py @@ -1,4 +1,5 @@ """Extract S1 data using OpenEO-GFMAP package.""" + import argparse import json import logging From 8faf8680d06351f4af6e595dc1b3c1f3eda7add8 Mon Sep 17 00:00:00 2001 From: Kristof Van Tricht Date: Wed, 5 Jun 2024 11:21:34 +0200 Subject: [PATCH 7/8] test module rename --- tests/worldcerealtests/test_openeo.py | 3 --- tests/worldcerealtests/test_worldcereal.py | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) delete mode 100644 tests/worldcerealtests/test_openeo.py create mode 100644 tests/worldcerealtests/test_worldcereal.py diff --git a/tests/worldcerealtests/test_openeo.py b/tests/worldcerealtests/test_openeo.py deleted file mode 100644 index 34e98d73..00000000 --- a/tests/worldcerealtests/test_openeo.py +++ /dev/null @@ -1,3 +0,0 @@ - -def test_dummy(): - pass \ No newline at end of file diff --git a/tests/worldcerealtests/test_worldcereal.py b/tests/worldcerealtests/test_worldcereal.py new file mode 100644 index 00000000..8bdb4fbb --- /dev/null +++ b/tests/worldcerealtests/test_worldcereal.py @@ -0,0 +1,5 @@ +import worldcereal + + +def test_import_worldcereal(): + print(f"WorldCereal version: {worldcereal.__version__}") From bd9cb8084aa3c751d098cd3e0554f4d14b7ff247 Mon Sep 17 00:00:00 2001 From: Kristof Van Tricht Date: Wed, 5 Jun 2024 11:31:07 +0200 Subject: [PATCH 8/8] fix import test --- tests/worldcerealtests/test_worldcereal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/worldcerealtests/test_worldcereal.py b/tests/worldcerealtests/test_worldcereal.py index 8bdb4fbb..bf73e1b0 100644 --- a/tests/worldcerealtests/test_worldcereal.py +++ b/tests/worldcerealtests/test_worldcereal.py @@ -2,4 +2,4 @@ def test_import_worldcereal(): - print(f"WorldCereal version: {worldcereal.__version__}") + assert worldcereal