Skip to content

Commit

Permalink
Output the current stored data in action
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus committed Sep 3, 2024
1 parent a114d1f commit 83cadb5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions scripts/data/generate_category_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ async def _rate_limit() -> dict[str, Any]:
"changed": changed,
"current_count": current_count,
"diff": abs(new_count - current_count),
"real_diff": new_count - current_count,
"new_count": new_count,
"rate_limit": await _rate_limit(),
}
Expand Down Expand Up @@ -522,6 +523,17 @@ async def generate_category_data(category: str, repository_name: str = None):
"Validation did raise but did not exit!", category)
sys.exit(1) # Fallback, should not be reached

with open(
os.path.join(OUTPUT_DIR, category, "stored.json"),
mode="w",
encoding="utf-8",
) as data_file:
json.dump(
stored_data,
data_file,
cls=JSONEncoder,
separators=(",", ":"),
)
with open(
os.path.join(OUTPUT_DIR, category, "data.json"),
mode="w",
Expand Down

0 comments on commit 83cadb5

Please sign in to comment.