From 81c28b983d4e104606467232e33d2de886e99038 Mon Sep 17 00:00:00 2001 From: GotthardG <51994228+GotthardG@users.noreply.github.com> Date: Wed, 18 Dec 2024 15:28:08 +0100 Subject: [PATCH] Refactor OpenAPI fetcher for improved clarity and robustness Reorganized and enhanced the OpenAPI fetch logic for better maintainability and error handling. Key updates include improved environment variable validation, more detailed error messages, streamlined configuration loading, and additional safety checks for file paths and directories. Added proper logging and ensured the process flow is easy to trace. --- .gitlab-ci.yml | 2 ++ pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 13ad8fe..7266492 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -63,6 +63,8 @@ release: - echo "Setting up Python dependencies..." - source $VIRTUAL_ENV/bin/activate - pip install -r requirements.txt + - rm -f openapi.json || true + - rm -rf python-client || true - bash make_openapi_client.sh # Generate OpenAPI client and package - ls backend/python-client/dist/ # Debug artifacts to ensure files exist - twine upload --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi backend/python-client/dist/* \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index c8832c5..8638f67 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "aareDB" -version = "0.1.0a6" +version = "0.1.0a7" description = "Backend for next gen sample management system" authors = [{name = "Guillaume Gotthard", email = "guillaume.gotthard@psi.ch"}] license = {text = "MIT"}