update requirements.txt
This commit is contained in:
4 files changed
+29
-11
No files matched your search
@@ -16,8 +16,6 @@ async def getInsights(repoURL: str, attempt: int = 0) -> Dict[str, str|None] | N
|
||||
owner: str = repoURL.split("/")[3]
|
||||
repo: str = repoURL.split("/")[4]
|
||||
|
||||
# print(f"Querying {repo}")
|
||||
|
||||
query: str = f"https://api.github.com/repos/{owner}/{repo}/stats/contributors"
|
||||
headers: Dict[str, str] = {
|
||||
"Accept": "application/vnd.github+json",
|
||||
@@ -27,12 +25,9 @@ async def getInsights(repoURL: str, attempt: int = 0) -> Dict[str, str|None] | N
|
||||
|
||||
async with aiohttp.ClientSession() as session:
|
||||
async with session.get(query, headers=headers, timeout=5) as resp:
|
||||
# print(f" {urls.index(repoURL) + 1}/{len(urls)} - {resp.status}")
|
||||
if resp.status > 400:
|
||||
# print(f"An Error Occured Querying {repo}")
|
||||
return None
|
||||
if resp.status == 202 and attempt <= MAX_RETRY:
|
||||
# print(f"{repo} Was queried, but no data was received")
|
||||
time.sleep(15)
|
||||
attempt += 1
|
||||
team = await getInsights(repoURL, attempt)
|
||||
|
||||
+6
-5
@@ -5,21 +5,22 @@ from prettytable import PrettyTable
|
||||
import os, shutil
|
||||
from datetime import datetime
|
||||
|
||||
def pretty_table(dct: Dict, title: str, add: str=""):
|
||||
def pretty_table(dct: Dict, title: str, add: str="") -> None:
|
||||
table = PrettyTable()
|
||||
|
||||
for c in dct.keys():
|
||||
table.add_column(c, [])
|
||||
table.add_column(c, [])
|
||||
|
||||
table.add_row(['\n'.join(dct[c]) for c in dct.keys()])
|
||||
table.align = "l"
|
||||
|
||||
with open(f"./boards/{title}.txt", "a") as file:
|
||||
if add != "":
|
||||
file.write(f"{add}\n")
|
||||
|
||||
file.write(table.__str__())
|
||||
file.write("\n\n")
|
||||
|
||||
# with open(f"./boards/{title}", "ab") as file:
|
||||
# pickle.dump(dct, file)
|
||||
|
||||
def setupDir() -> None:
|
||||
if not os.path.exists("./boards"):
|
||||
os.makedirs("./boards")
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
from typing import List, Dict
|
||||
import json
|
||||
|
||||
# Only ever really needs to be run one time
|
||||
|
||||
def getSet(team: str) -> str:
|
||||
team = team.upper()
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
aiohappyeyeballs==2.6.1
|
||||
aiohttp==3.11.13
|
||||
aiosignal==1.3.2
|
||||
attrs==25.3.0
|
||||
blinker==1.9.0
|
||||
click==8.1.8
|
||||
Flask==3.1.0
|
||||
frozenlist==1.5.0
|
||||
gunicorn==23.0.0
|
||||
idna==3.10
|
||||
itsdangerous==2.2.0
|
||||
Jinja2==3.1.6
|
||||
MarkupSafe==3.0.2
|
||||
multidict==6.1.0
|
||||
packaging==24.2
|
||||
prettytable==3.15.1
|
||||
propcache==0.3.0
|
||||
tqdm==4.67.1
|
||||
wcwidth==0.2.13
|
||||
Werkzeug==3.1.3
|
||||
yarl==1.18.3
|
||||
Reference in new issue
Block a user