Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 24 additions & 11 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,56 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages
# Automated Sprite Audit & Zero-Commit GitHub Pages Deployment
name: Audit Sprites & Deploy to Pages

on:
# Runs on pushes targeting the default branch
# Runs on pushes and PR merges targeting the master branch
push:
branches: ["master"]

# Allows you to run this workflow manually from the Actions tab
# Allows manual runs from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
# Sets permissions of the GITHUB_TOKEN to deploy to GitHub Pages without modifying git history
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Single deploy job since we're just deploying
deploy:
audit-and-deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
- name: Checkout repository
uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install audit dependencies
run: |
pip install pandas pillow requests jinja2

- name: Run Sprite Audit & Build Dashboard
run: |
python scripts/sprite_audit.py --category all --include-forms

- name: Setup Pages
uses: actions/configure-pages@v6
- name: Upload artifact

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v5
with:
# Upload entire repository
path: './website'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ bower_components
npm-debug.log
test/
desktop.ini
.vscode/
idea/

# PhpStorm
.idea/
Expand All @@ -14,3 +16,9 @@ desktop.ini

smogon/
scripts/downloads/

# Generated Audit Reports
scripts/sprite_audit_report.csv
website/audit.html
website/audit_data.json
website/audit_report.csv
42 changes: 32 additions & 10 deletions CONTRIBUTING_SPRITES.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,20 @@ This initial version of the maintenance workflow focuses specifically on:

**Script:** `scripts/sprite_audit.py`

This script identifies missing or invalid sprites in the `sprites/pokemon/` directory.

* **Data Sources:** It references `pokemon.csv` and `pokemon_forms.csv` from the PokéAPI database.
* **Logic:** It checks the existence and dimensions of four primary assets for every entry:
* Front (Default & Shiny)
* Back (Default & Shiny)
* **Output:** Issues are logged in `sprite_audit_report.csv` to track our progress toward a 100% complete National Dex.
This script identifies missing, corrupt, or incorrectly sized sprites across multiple asset categories and cosmetic forms.

* **Data Sources:** References `pokemon.csv`, `pokemon_forms.csv`, and `version_groups.csv` from the PokéAPI database.
* **Supported Categories (`--category`):**
* `default`: Front & Back (Default & Shiny) Gen 5 pixel art (`96x96`).
* `official-artwork`: High-res official artwork renders (`475x475`).
* `home`: Pokémon HOME 3D renders (`512x512`).
* `showdown`: Pokémon Showdown animated battle sprites (`.gif`).
* `dream-world`: Dream World vector sprites (`.svg`/`.png`).
* `all`: Runs audits across all asset categories.
* **Cosmetic Form Auditing (`--include-forms`):** Audits non-default cosmetic forms (such as Sinistea Antique, Polteageist Antique, Vivillon patterns, Unown letters, Alcremie forms) defined in `pokemon_forms.csv`.
* **Output & Reports:**
* Interactive HTML dashboard generated directly to `website/audit.html` (viewable on GitHub Pages). Custom path configurable via `-o` / `--output`.
* Grouped issues logged to CSV (`scripts/sprite_audit_report.csv`).

### 2. Synchronizing with Smogon

Expand Down Expand Up @@ -60,6 +67,21 @@ The Smogon source data is community-maintained and contains known inconsistencie

### How to Use

1. **Check for gaps:** `python scripts/sprite_audit.py`
2. **Sync Smogon assets:** `python scripts/smogon_download.py`
3. **Manual Fixes:** Review the downloaded files against the "Known Issues" above and correct names/folders manually before submitting a PR.
1. **Audit default sprites:**
```bash
python scripts/sprite_audit.py --category default
```
2. **Audit all categories including cosmetic forms (updates GitHub Pages dashboard):**
```bash
python scripts/sprite_audit.py --category all --include-forms
```
3. **Audit a specific category (e.g. Showdown or Official Artwork):**
```bash
python scripts/sprite_audit.py --category showdown
python scripts/sprite_audit.py --category official-artwork
```
4. **Sync Smogon assets:**
```bash
python scripts/smogon_download.py
```
5. **Manual Fixes:** Review the downloaded files against the "Known Issues" above and correct names/folders manually before submitting a PR.
Loading