Skip to content

Purge R code

Purge R code #20

Workflow file for this run

name: Format
on: [pull_request]
env:
UV_SYSTEM_PYTHON: 1
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: '2'
ref: ${{ github.head_ref }}
- name: Format imports
uses: astral-sh/ruff-action@v1
with:
args: "check --fix --select I"
changed-files: "true"
- name: Format code
uses: astral-sh/ruff-action@v1
with:
args: "format"
changed-files: "true"
- name: Commit Changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "style: format code and imports with `ruff`"
file_pattern: "main/como/*.py"
notebooks:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.10" ]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: '1'
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Install Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- name: Format Notebook
uses: astral-sh/ruff-action@v1
with:
args: "format main/COMO.ipynb"
- name: Install Jupyter
run: uv pip install jupyter nbconvert
- name: Strip Notebook Output
run: jupyter nbconvert --clear-output --inplace "main/COMO.ipynb"