mirror of
https://github.com/firmai/financial-machine-learning.git
synced 2026-08-07 16:17:48 +00:00
bug fix on repo update
This commit is contained in:
@@ -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
|
||||
|
||||
+12
-1
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user