Skip to content

Commit

Permalink
Added Numpy-style docstrings to all functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Oct 31, 2024
1 parent 94ed67d commit 577af12
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions scripts/auto-add-download-statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@
import datetime

def main():

"""
Main function to run the script that:
1. Reads a repository name from command-line arguments.
2. Creates a new branch in the given repository.
3. Summarizes download statistics from a specified directory.
4. Saves the statistics to GitHub as a CSV file.
"""
repository = sys.argv[1]

# read "database"
Expand All @@ -32,10 +39,19 @@ def main():

def summarize_download_statistics(directory_path):
"""
This function summarizes the download statistics of all zenodo entries in the yml files
and saves the statistics in a csv file.
"""
Summarizes download statistics from all zenodo entries listed in YAML files in a given directory.
Parameters
----------
directory_path : str
The path to the directory containing the YAML files.
Returns
-------
str
The content of the created CSV file as a string.
"""

#import statements
import requests
import json
Expand Down Expand Up @@ -113,4 +129,3 @@ def summarize_download_statistics(directory_path):

if __name__ == "__main__":
main()

0 comments on commit 577af12

Please sign in to comment.