diff --git a/.github/workflows/repo_status_weekly.yml b/.github/workflows/repo_status_weekly.yml index 39ae187..0428179 100644 --- a/.github/workflows/repo_status_weekly.yml +++ b/.github/workflows/repo_status_weekly.yml @@ -1,9 +1,12 @@ name: Repo-Updater # cron every sunday at 12 am, due to github api limits, change this to be ran once a week -on: - schedule: - - cron: '0 0 * * *' # do every hour for now +#on: +# schedule: +# - cron: '0 0 * * *' # do every hour for now + +# generate wiki page on every push +on: push jobs: # Set the job key. The key is displayed as the job name diff --git a/git_status.py b/git_status.py index d5fc35b..296e480 100644 --- a/git_status.py +++ b/git_status.py @@ -125,6 +125,17 @@ def convert_repo_list_to_df(repo_list, category): def search_new_repo_by_category(category: str, min_stars_number: int = 100, existing_repo_df: pd.DataFrame = None): + """ + + :param category: + :param min_stars_number: + :param existing_repo_df: + :return: + usage: + >>> category = 'Other Models' + >>> min_stars_number = 100 + >>> existing_repo_df = get_repo_list() + """ combined_df = None if category == 'Deep Learning And Reinforcement Learning': combined_df = search_repo_multiple_terms(['deep learning trading', @@ -145,7 +156,7 @@ def search_new_repo_by_category(category: str, # only find ones that need to be inserted if existing_repo_df is not None: combined_df = combined_df[ - ~combined_df['repo_path'].str.lower().isin(existing_repo_df['repo_path'].str.lower())] + ~combined_df['repo_path'].str.lower().isin(existing_repo_df['repo_path'].dropna().str.lower())] return combined_df