Skip to content

Commit

Permalink
fetch.py: fetch first 40k stargazers at least once
Browse files Browse the repository at this point in the history
  • Loading branch information
jgehrcke committed Sep 28, 2023
1 parent 096cc6b commit e922b28
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,14 @@ def fetch_and_write_stargazer_ts(repo: Repository.Repository, path: str):
os.rename(tmppath, snapshots_csv_path)

if current_stargazer_count > 40000:
log.info("40k limit crossed; skip (re)fetching entire stargazer timeseries")
return

if os.path.exists(path):
log.info("40k limit crossed; skip (re)fetching entire stargazer timeseries")
return

log.info(
"40k limit crossed, but %s does not exist yet -- fetch first 40k", path
)

dfstarscsv = get_stars_over_time_40k_limit(repo)
log.info("stars_cumulative, for CSV file:\n%s", dfstarscsv)
Expand Down

0 comments on commit e922b28

Please sign in to comment.