Skip to content

Commit

Permalink
change env
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsage1 committed Mar 15, 2024
1 parent 707f962 commit 24b2f73
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion apps/openchallenges/edam-etl/.env.example
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
OC_DB_URL=jdbc:mysql://openchallenges-mariadb:3306/challenge_service
OC_DB_URL=jdbc:mysql://openchallenges-mariadb:3306/challenge_service
OC_DB_VERSION=1.25
8 changes: 4 additions & 4 deletions apps/openchallenges/edam-etl/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

# Get config from the environment variables
oc_db_url = getenv("OC_DB_URL")
version = getenv("OC_DB_VERSION")
print(f"EDAM Version: {version}")
print(f"OC DB URL: {oc_db_url}")


Expand Down Expand Up @@ -40,8 +42,7 @@ def transform_to_dataframe(version):


# Gather data about the EDAM ontology
def print_info_statistics(version, df):
print(f"\nEDAM Version: {version}")
def print_info_statistics(df):
if df is not None:
print(f"Number of Concepts Transformed: {len(df)}")
print(f"Column names: {df.columns.tolist()}")
Expand All @@ -54,11 +55,10 @@ def print_info_statistics(version, df):


def main():
version = "1.25" # Change to desired version if needed
url = "https://github.com/edamontology/edamontology/raw/main/releases/EDAM_1.25.csv"
download_edam_csv(url, version)
df = transform_to_dataframe(version)
print_info_statistics(version, df)
print_info_statistics(df)


if __name__ == "__main__":
Expand Down

0 comments on commit 24b2f73

Please sign in to comment.