Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
remi-braun committed Apr 26, 2024
1 parent b4de5d9 commit 54677f7
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions CI/scripts_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
from typing import Callable

import tempenv
from sertit import AnyPath, unistra
from sertit.s3 import USE_S3_STORAGE
from sertit import AnyPath, s3, unistra
from sertit.types import AnyPathType
from sertit.unistra import get_db2_path, get_db3_path, get_geodatastore
from sertit.unistra import (
UNISTRA_S3_ENPOINT,
get_db2_path,
get_db3_path,
get_geodatastore,
)

from eoreader import EOREADER_NAME
from eoreader.env_vars import TILE_SIZE
Expand Down Expand Up @@ -93,7 +97,9 @@ def get_db_dir() -> AnyPathType:
Returns:
str: Database directory
"""
with tempenv.TemporaryEnvironment({USE_S3_STORAGE: os.getenv(CI_EOREADER_S3, "0")}):
with tempenv.TemporaryEnvironment(
{s3.USE_S3_STORAGE: os.getenv(CI_EOREADER_S3, "0")}
):
return get_geodatastore()


Expand Down Expand Up @@ -150,7 +156,9 @@ def broken_s2_path():


def s3_env(function):
return unistra.s3_env(use_s3_env_var=CI_EOREADER_S3)(function)
return s3.s3_env(endpoint=UNISTRA_S3_ENPOINT, use_s3_env_var=CI_EOREADER_S3)(
function
)


def compare(to_be_checked, ref, topic):
Expand Down

0 comments on commit 54677f7

Please sign in to comment.