[GH-ISSUE #4] Enhancement: Restrict daily totals to portable assets and stable releases (configurable) #1

Open
opened 2026-10-26 22:08:19 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @benceruleanlu on GitHub (Nov 9, 2025).
Original GitHub issue: https://github.com/Comfy-Org/download-data/issues/4

Summary
Current implementation sums all assets for all fetched releases. To answer “how many downloads of the portable releases per day,” we should filter assets by name pattern and optionally exclude prereleases/drafts via configuration.

Details

  • All assets inserted: scripts/fetch-data.mjs:317–333
  • Daily totals don’t filter by flags: scripts/fetch-data.mjs:343–357

Proposed Fix

  • Add env flags:
    • PORTABLE_ONLY=true
    • PORTABLE_NAME_PATTERN=ComfyUI_windows_portable_
    • INCLUDE_PRERELEASE=false
    • INCLUDE_DRAFT=false
  • In storeDailyStats, skip releases when draft/prerelease if flags are false; skip assets not matching pattern when PORTABLE_ONLY=true.
  • Optionally enforce the same filter in the summary SQL for safety.

Acceptance Criteria

  • Changing flags alters which asset rows are stored for the bucket
  • Daily totals reflect only portable, stable releases by default

References

  • Asset loop: scripts/fetch-data.mjs:317–333
  • Summary calculation: scripts/fetch-data.mjs:343–357
Originally created by @benceruleanlu on GitHub (Nov 9, 2025). Original GitHub issue: https://github.com/Comfy-Org/download-data/issues/4 Summary Current implementation sums all assets for all fetched releases. To answer “how many downloads of the portable releases per day,” we should filter assets by name pattern and optionally exclude prereleases/drafts via configuration. Details - All assets inserted: scripts/fetch-data.mjs:317–333 - Daily totals don’t filter by flags: scripts/fetch-data.mjs:343–357 Proposed Fix - Add env flags: - PORTABLE_ONLY=true - PORTABLE_NAME_PATTERN=ComfyUI_windows_portable_ - INCLUDE_PRERELEASE=false - INCLUDE_DRAFT=false - In storeDailyStats, skip releases when draft/prerelease if flags are false; skip assets not matching pattern when PORTABLE_ONLY=true. - Optionally enforce the same filter in the summary SQL for safety. Acceptance Criteria - Changing flags alters which asset rows are stored for the bucket - Daily totals reflect only portable, stable releases by default References - Asset loop: scripts/fetch-data.mjs:317–333 - Summary calculation: scripts/fetch-data.mjs:343–357
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/download-data#1
No description provided.