Skip to content

fix: 🐞 enable push triggers for MMDet CI and update find-links in pyproject.toml #485

fix: 🐞 enable push triggers for MMDet CI and update find-links in pyproject.toml

fix: 🐞 enable push triggers for MMDet CI and update find-links in pyproject.toml #485

Workflow file for this run

name: Ruff
on:
push:
branches: [main]
paths-ignore:
- "**.md"
- "**.ipynb"
- "**.cff"
- "docs/**"
- "demo/**"
pull_request:
branches: [main]
paths-ignore:
- "**.md"
- "**.ipynb"
- "**.cff"
- "docs/**"
- "demo/**"
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.10'
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Install dependencies
run: |
uv venv --python 3.10
uv sync --group dev
- name: Check code formatting
id: ruff_check
run: |
source .venv/bin/activate
python scripts/format_code.py check
continue-on-error: true
- name: Provide formatting guidance
if: steps.ruff_check.outcome == 'failure'
run: |
echo "::error::Code formatting check failed! 🚨"
echo ""
echo "::warning::To fix formatting issues, please run the following commands locally:"
echo ""
echo "1. Ensure you have the development environment set up:"
echo " pip install uv"
echo " uv venv --python 3.10"
echo " source .venv/bin/activate # On Windows: .venv\Scripts\activate"
echo " uv sync --extra dev"
echo ""
echo "2. Fix the formatting issues:"
echo " python scripts/format_code.py fix"
echo ""
echo "3. Commit and push the changes:"
echo " git add ."
echo " git commit -m 'Fix code formatting'"
echo " git push"
echo ""
echo "For more details, see CONTRIBUTING.md"
exit 1