diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 517b1012..a4888f52 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,7 +2,10 @@ name: Run tests on: pull_request: - branches: [ "main", "copernicusmarine-toolbox-v2" ] + branches: + - "main" + - "copernicusmarine-toolbox-v2" + - "pre-releases/**" jobs: tests: diff --git a/copernicusmarine/core_functions/versions_verifier.py b/copernicusmarine/core_functions/versions_verifier.py index af3124c6..ea886d8a 100644 --- a/copernicusmarine/core_functions/versions_verifier.py +++ b/copernicusmarine/core_functions/versions_verifier.py @@ -43,16 +43,23 @@ def _check_version(function_name: str, staging: bool): function_name ]: required_version = marine_data_store_versions[service] - if not semver.Version.parse(client_version).match( - required_version - ): - logger.debug( - f"Client version {client_version} is not compatible with " - f"{service}. Service needs version {required_version}." - ) - logger.error( - f"Client version {client_version} is not compatible with current " - "backend service. Please update to the latest client version." + try: + if not semver.Version.parse(client_version).match( + required_version + ): + logger.debug( + f"Client version {client_version} is not compatible with " + f"{service}. Service needs version {required_version}." + ) + logger.error( + f"Client version {client_version} is not " + f"compatible with current backend service. " + f"Please update to the latest client version." + ) + except ValueError: + logger.warning( + f"Using a pre-release or a non-official version " + f"of the client. Client version: {client_version}" ) @staticmethod