Skip to content

Comments

Modernize CI workflow and API parser#226

Merged
thibaudcolas merged 2 commits intospringload:masterfrom
thi-bot:modernize-ci
Jan 2, 2026
Merged

Modernize CI workflow and API parser#226
thibaudcolas merged 2 commits intospringload:masterfrom
thi-bot:modernize-ci

Conversation

@thi-bot
Copy link
Contributor

@thi-bot thi-bot commented Jan 2, 2026

Updates the repository's CI infrastructure and README API parser to use modern Python 3 and GitHub Actions best practices.

Changes

Python API Parser (.github/api.py)

  • Upgrades from Python 2 compatibility to modern Python 3 with type hints
  • Replaces deprecated datetime.utcnow() with timezone-aware datetime.now(timezone.utc)
  • Uses pathlib.Path for cleaner file operations
  • Adds automatic directory creation (eliminates need for manual mkdir in CI)
  • Improves error handling with specific exception types instead of bare except
  • Adds docstrings to all functions

GitHub Actions Workflow

  • Updates to latest action versions (checkout@v6, setup-python@v5, setup-ruby@v1)
  • Uses Ruby 3.3 and Python 3.14 (current stable versions)
  • Separates build and deploy into distinct jobs following GitHub Pages best practices
  • Replaces deprecated peaceiris/actions-gh-pages with actions/deploy-pages@v4
  • Removes manual mkdir command (now handled by the upgraded Python script)
  • Adds pull request triggers for validation before merge

Other

  • Adds .claude directory to .gitignore for Claude Code configuration files

Testing

The API parser script will be validated automatically when this PR runs through CI. The workflow changes follow GitHub's recommended patterns for Pages deployment.

thi-bot and others added 2 commits January 2, 2026 14:19
Upgrades the API generator script from Python 2 compatibility to modern
Python 3 practices to improve maintainability and reliability.

Changes include:
- Add type hints to all functions for better code documentation
- Replace deprecated datetime.utcnow() with timezone-aware datetime.now()
- Use pathlib.Path for cleaner file operations instead of open()/codecs
- Add automatic directory creation eliminating need for manual mkdir
- Replace bare except with specific exception handling for better debugging
- Use f-strings instead of % formatting for readability
- Add proper docstrings to document function behavior

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Updates GitHub Actions workflow to use modern versions and removes manual
directory creation now handled by the upgraded API script.

Workflow changes:
- Upgrade to latest action versions (checkout@v6, setup-python@v5)
- Use Ruby 3.3 and Python 3.14 for current language versions
- Separate build and deploy jobs following GitHub Pages best practices
- Replace deprecated peaceiris/actions-gh-pages with actions/deploy-pages
- Remove manual mkdir as api.py now handles directory creation automatically
- Trigger on pull requests for validation before merge

Also adds .claude directory to .gitignore to exclude Claude Code
configuration files from version control.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Copy link
Collaborator

@thibaudcolas thibaudcolas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checks now running!

@thibaudcolas thibaudcolas merged commit 6f4dbe3 into springload:master Jan 2, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants