Skip to content

Commit 9371980

Browse files
committed
Add debug statement to live version
1 parent a1a5b0b commit 9371980

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

index.qmd

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import plotly.express as px
3333
import polars as pl
3434
import requests
3535
import os
36+
import time
3637
from datetime import datetime, timedelta
3738
from typing import List, Dict, Optional
3839
@@ -62,7 +63,6 @@ def fetch_issues():
6263
"""Fetch all issues from the pyOpenSci software-submission repository using GraphQL"""
6364
# Check for GitHub token in environment variables
6465
github_token = os.environ.get('GITHUB_TOKEN')
65-
6666
if github_token:
6767
headers['Authorization'] = f'Bearer {github_token}'
6868
else:
@@ -76,6 +76,7 @@ def fetch_issues():
7676
hasNextPage
7777
endCursor
7878
}
79+
totalCount
7980
nodes {
8081
number
8182
title
@@ -95,7 +96,7 @@ def fetch_issues():
9596
}
9697
}
9798
"""
98-
99+
99100
all_issues = []
100101
cursor = None
101102
@@ -120,6 +121,9 @@ def fetch_issues():
120121
# Add the current page of issues
121122
all_issues.extend(issues['nodes'])
122123
124+
# Print progress
125+
print(f"Fetched {len(all_issues)} issues out of {issues['totalCount']}")
126+
123127
if not issues['pageInfo']['hasNextPage']:
124128
break
125129
@@ -131,9 +135,9 @@ def fetch_issues():
131135
except Exception as e:
132136
print(f"Error fetching issues: {e}")
133137
break
134-
135-
return all_issues
136138
139+
return all_issues
140+
137141
def process_issues(issues: List[Dict]) -> pl.DataFrame:
138142
"""Process raw issue data into a Polars DataFrame"""
139143
# Extract label names for each issue
@@ -177,7 +181,6 @@ def process_issues(issues: List[Dict]) -> pl.DataFrame:
177181
# Fetch and process the data
178182
issues_data = fetch_issues()
179183
df = process_issues(issues_data)
180-
181184
```
182185

183186
## Row

0 commit comments

Comments
 (0)