From d6cebc3349b507a4b239990a8cbc824830efe6d9 Mon Sep 17 00:00:00 2001 From: Thomas Schaffter Date: Mon, 25 Mar 2024 15:00:21 -0700 Subject: [PATCH] fix(openchallenges): fix OC EDAM ETL issues reported by Sonar (#2594) --- CODE_QUALITY.md | 1 + apps/openchallenges/edam-etl/Dockerfile | 4 ++-- apps/openchallenges/edam-etl/src/main.py | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CODE_QUALITY.md b/CODE_QUALITY.md index f3b528b108..ee500727ca 100644 --- a/CODE_QUALITY.md +++ b/CODE_QUALITY.md @@ -22,6 +22,7 @@ | **OpenChallenges** || | [app](https://sonarcloud.io/summary/overall?id=openchallenges-app) | ![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=openchallenges-app&metric=alert_status) | ![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=openchallenges-app&metric=reliability_rating) | ![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=openchallenges-app&metric=sqale_rating) | ![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=openchallenges-app&metric=sqale_index) | ![Coverage](https://sonarcloud.io/api/project_badges/measure?project=openchallenges-app&metric=coverage) | | [challenge-service](https://sonarcloud.io/summary/overall?id=openchallenges-challenge-service) | ![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=openchallenges-challenge-service&metric=alert_status) | ![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=openchallenges-challenge-service&metric=reliability_rating) | ![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=openchallenges-challenge-service&metric=sqale_rating) | ![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=openchallenges-challenge-service&metric=sqale_index) | ![Coverage](https://sonarcloud.io/api/project_badges/measure?project=openchallenges-challenge-service&metric=coverage) | +| [edam-etl](https://sonarcloud.io/summary/overall?id=openchallenges-edam-etl) | ![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=openchallenges-edam-etl&metric=alert_status) | ![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=openchallenges-edam-etl&metric=reliability_rating) | ![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=openchallenges-edam-etl&metric=sqale_rating) | ![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=openchallenges-edam-etl&metric=sqale_index) | ![Coverage](https://sonarcloud.io/api/project_badges/measure?project=openchallenges-edam-etl&metric=coverage) | | [image-service](https://sonarcloud.io/summary/overall?id=openchallenges-image-service) | ![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=openchallenges-image-service&metric=alert_status) | ![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=openchallenges-image-service&metric=reliability_rating) | ![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=openchallenges-image-service&metric=sqale_rating) | ![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=openchallenges-image-service&metric=sqale_index) | ![Coverage](https://sonarcloud.io/api/project_badges/measure?project=openchallenges-image-service&metric=coverage) | | [organization-service](https://sonarcloud.io/summary/overall?id=openchallenges-organization-service) | ![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=openchallenges-organization-service&metric=alert_status) | ![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=openchallenges-organization-service&metric=reliability_rating) | ![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=openchallenges-organization-service&metric=sqale_rating) | ![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=openchallenges-organization-service&metric=sqale_index) | ![Coverage](https://sonarcloud.io/api/project_badges/measure?project=openchallenges-organization-service&metric=coverage) | | **Schematic** || diff --git a/apps/openchallenges/edam-etl/Dockerfile b/apps/openchallenges/edam-etl/Dockerfile index 5f6503f053..128d307ce4 100644 --- a/apps/openchallenges/edam-etl/Dockerfile +++ b/apps/openchallenges/edam-etl/Dockerfile @@ -6,8 +6,8 @@ ARG USER_GID=$USER_UID ENV APP_DIR=/opt/app \ APP_USERNAME=${USERNAME} -RUN groupadd --gid $USER_GID $USERNAME \ - && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ +RUN groupadd --gid "$USER_GID" "$USERNAME" \ + && useradd --uid "$USER_UID" --gid "$USER_GID" -m "$USERNAME" \ # Install sudo && apt-get update -qq -y && export DEBIAN_FRONTEND=noninteractive \ && apt-get install --no-install-recommends -qq -y \ diff --git a/apps/openchallenges/edam-etl/src/main.py b/apps/openchallenges/edam-etl/src/main.py index 67bb6ddb8c..8b10bd05f9 100755 --- a/apps/openchallenges/edam-etl/src/main.py +++ b/apps/openchallenges/edam-etl/src/main.py @@ -1,3 +1,4 @@ +import numpy as np import pandas as pd import requests from os import getenv