Skip to content

ci: rewrite deploy scripts with python3#7152

Open
ElectricalBoy wants to merge 56 commits intoLiquipedia:mainfrom
ElectricalBoy:deploy-with-python
Open

ci: rewrite deploy scripts with python3#7152
ElectricalBoy wants to merge 56 commits intoLiquipedia:mainfrom
ElectricalBoy:deploy-with-python

Conversation

@ElectricalBoy
Copy link
Collaborator

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Rewrites the repo’s CI deploy/protect/remove scripts from Bash to Python (shared helpers in scripts/deploy_util.py) and updates GitHub Actions workflows to run the new Python entrypoints.

Changes:

  • Replace Bash deploy/protect/remove/login scripts with Python equivalents using requests + cookie jars.
  • Add shared deploy utilities (deploy_util.py) and a new Python style workflow (pythoncheck.yml).
  • Update CI workflows to set up Python, install dependencies, and call the new Python scripts; add gitignore entries for Python/cookie artifacts.

Reviewed changes

Copilot reviewed 23 out of 24 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
scripts/remove_dev.sh Removes legacy Bash dev-env cleanup script
scripts/remove_dev.py New Python dev-env cleanup script
scripts/protect_templates.sh Removes legacy Bash template protection script
scripts/protect_templates.py New Python template protection script
scripts/protect_page.sh Removes legacy Bash protect-page helpers
scripts/protect_page.py New Python protect-page helpers and error aggregation
scripts/protect.sh Removes legacy Bash module protection script
scripts/protect.py New Python module protection script
scripts/login_and_get_token.sh Removes legacy Bash login/token script
scripts/login_and_get_token.py New Python login/token helpers with caching
scripts/deploy_res.sh Removes legacy Bash resource deploy script
scripts/deploy_res.py New Python resource deploy + cache update script
scripts/deploy.sh Removes legacy Bash Lua deploy script
scripts/deploy.py New Python Lua deploy script
scripts/deploy_util.py Shared helpers for wiki URL, deploy calls, cookies, summary output
.github/workflows/scheduled.yml Switch scheduled deploy to Python scripts + setup/install
.github/workflows/deploy.yml Switch deploy workflow to Python scripts + setup/install
.github/workflows/pythoncheck.yml Add Ruff lint/format CI for scripts
.vscode/settings.json Configure Python env file usage for local dev
.gitignore Ignore Python caches, .env, and cookie files
Comments suppressed due to low confidence (2)

scripts/deploy_res.py:4

  • sys is imported but never used in this file, which will fail the new Ruff linting workflow. Remove the unused import (or use it if intended).
import itertools
import pathlib
import sys
import subprocess

.vscode/settings.json:16

  • Indentation in .vscode/settings.json is currently tab-based, but the newly added python.terminal.useEnvFile line is indented with spaces. Re-indent it to match the surrounding style so diffs stay clean.
	"python.envFile": "${workspaceFolder}/.env",
    "python.terminal.useEnvFile": true,

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@FO-nTTaX FO-nTTaX left a comment

Choose a reason for hiding this comment

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

I don't have the time to do a line by line check, however there's nothing clearly wrong. On the assumption you have tested this LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants