Skip to content

Commit

Permalink
fixed docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsage1 committed Mar 15, 2024
1 parent 54c98da commit 87215a1
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions apps/openchallenges/edam-etl/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@
print(f"OC DB URL: {OC_DB_URL}")


"""Download EDAM concepts from GitHub or S3 bucket (CSV file)"""


def download_edam_csv(url: str, version: str) -> Optional[bool]:
"""Download EDAM concepts from GitHub or S3 bucket (CSV file)"""
print("Downloading the EDAM concepts from GitHub (CSV file)...")
try:
response = requests.get(url)
Expand All @@ -31,10 +29,8 @@ def download_edam_csv(url: str, version: str) -> Optional[bool]:
return None


"""Transform the CSV to a DataFrame with indices starting from 1"""


def transform_to_dataframe(version: str) -> pd.DataFrame:
"""Transform the CSV to a DataFrame with indices starting from 1"""
print("Processing the EDAM concepts...")
try:
df = (
Expand All @@ -52,10 +48,8 @@ def transform_to_dataframe(version: str) -> pd.DataFrame:
print(f"Error processing EDAM concepts: {e}")


"""Gather data about the EDAM ontology"""


def print_info_statistics(df: pd.DataFrame) -> None:
"""Gather data about the EDAM ontology"""
if df is not None:
print(f"Number of Concepts Transformed: {len(df)}")
print(f"Column names: {df.columns.tolist()}")
Expand All @@ -67,10 +61,8 @@ def print_info_statistics(df: pd.DataFrame) -> None:
print("No data available.")


"""Main function to excute preceeding functions"""


def main() -> None:
"""Main function to excute preceeding functions"""
url: str = (
f"https://github.com/edamontology/edamontology/raw/main/releases/EDAM_{VERSION}.csv"
)
Expand Down

0 comments on commit 87215a1

Please sign in to comment.