Skip to content
Merged
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
51 changes: 51 additions & 0 deletions .github/workflows/black-fix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Black (auto-fix)

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

permissions:
contents: write
pull-requests: write

jobs:
black_fix:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0

- uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install Black
run: pip install black

- name: Run Black on changed files
run: |
BASE=$(git merge-base origin/${{ github.base_ref }} HEAD)
FILES=$(git diff --name-only --diff-filter=d "$BASE" HEAD -- '*.py')
if [ -z "$FILES" ]; then
echo "No Python files changed."
exit 0
fi
echo "Formatting:"
echo "$FILES"
echo "$FILES" | xargs black

- name: Commit and push changes (if any)
run: |
if git diff --quiet; then
echo "No formatting changes needed."
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add -u
git commit -m "style: auto-format with black"
git push origin HEAD:${{ github.head_ref }}
45 changes: 0 additions & 45 deletions .github/workflows/static.yml

This file was deleted.

36 changes: 17 additions & 19 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
*logs_and_checkpoints/
checkpoints/

# Weights & Biases
wandb/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand All @@ -6,6 +12,14 @@ __pycache__/
# C extensions
*.so

# Scripting Artifacts
/wandb
*.sh
!tools/
!tools/*.sh
*.csv
*.pt

# Distribution / packaging
.Python
build/
Expand Down Expand Up @@ -94,12 +108,6 @@ ipython_config.py
# install all needed dependencies.
#Pipfile.lock

# UV
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
#uv.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
Expand All @@ -112,10 +120,8 @@ ipython_config.py
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
# https://pdm.fming.dev/#use-with-ide
.pdm.toml
.pdm-python
.pdm-build/

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/
Expand Down Expand Up @@ -164,13 +170,5 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# Ruff stuff:
.ruff_cache/

# PyPI configuration file
.pypirc
.DS_Store
movesets_data/
checks_data/
.idea/
metamon/data/stats
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "server/pokemon-showdown"]
path = server/pokemon-showdown
url = git@github.com:smogon/pokemon-showdown.git
url = https://github.com/smogon/pokemon-showdown.git
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
repos:
- repo: https://github.com/psf/black
rev: 25.1.0
hooks:
- id: black
16 changes: 16 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"folder-color.pathColors": [
{
"folderPath": "metamon/data/",
"color": "foldercolorizer.color_336633"
},
{
"folderPath": "metamon/backend/",
"color": "foldercolorizer.color_6666ff"
},
{
"folderPath": "metamon/il/",
"color": "foldercolorizer.color_666666"
}
]
}
Loading
Loading