Skip to content

Commit d17ac42

Browse files
committed
Regenerated contributors and put max tried on api call
1 parent d47c87d commit d17ac42

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

docs/contributors.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,30 @@
1717
len_per_info = len(per_info)
1818

1919
empty_list = []
20+
max_tries = 3
21+
2022
for i in range(len_per_info):
2123
url = per_info[i]
2224
print(url)
2325
data = requests.get(url=url)
2426
requests_status = "unknown"
25-
while (requests_status == "unknown") or (requests_status == "unsuccessful"):
27+
while max_tries > 0 and (
28+
(requests_status == "unknown") or (requests_status == "unsuccessful")
29+
):
2630
if data.status_code == 200:
2731
requests_status = "successful"
32+
print(" Received: %s" % data.json())
2833
empty_list.append(data.json())
2934
else:
3035
# handle failure on requests to the url for mac os
3136
requests_status = "unsuccessful"
3237
print(f"Failed to get data from: {url}")
3338
# make request again to get data from the url
3439
data = requests.get(url=url)
40+
max_tries -= 1
3541

3642
df1 = pd.DataFrame(empty_list)
37-
df1["name"] = df1["name"].fillna("")
43+
df1["name"] = df1["name"].fillna(df1["login"])
3844
name = df1["name"]
3945
login = df1["login"]
4046
url_html = df1["html_url"]

docs/sphinx/source/api/Contributors.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33
# Modelspec contributors
44

55
This page list names and Github profiles of contributors to Modelspec, listed in no particular order.
6-
This page is generated periodically, most recently on 2023-07-05.
6+
This page is generated periodically, most recently on 2023-08-23.
77

88
- Padraig Gleeson ([@pgleeson](https://github.com/pgleeson))
9+
- Manifest Chakalov ([@mqnifestkelvin](https://github.com/mqnifestkelvin))
910
- David Turner ([@davidt0x](https://github.com/davidt0x))
11+
- Peace Ododo ([@Onoyiza](https://github.com/Onoyiza))
1012
- Parikshit Singh Rathore ([@parikshit14](https://github.com/parikshit14))
11-
- Katherine Mantel ([@kmantel](https://github.com/kmantel))
13+
- Ankur Sinha ([@sanjayankur31](https://github.com/sanjayankur31))
14+
- kmantel ([@kmantel](https://github.com/kmantel))

test_all.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ pytest tests -v
3636

3737
cd docs
3838
python generate.py
39+
python contributors.py
3940
cd sphinx
4041
make clean
4142
make html

0 commit comments

Comments
 (0)