Skip to content

Point the docs at the site they are actually published on and serve their markdown #879

Point the docs at the site they are actually published on and serve their markdown

Point the docs at the site they are actually published on and serve their markdown #879

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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.10"
- name: Install uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
- 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