Skip to content

Commit

Permalink
[ruff] Add basic configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
salkinium committed Nov 17, 2024
1 parent 8b28630 commit c7fb4f4
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,15 @@ jobs:
- name: Run Regression Tests
run: |
make run-regression-tests
- name: Run Ruff Formatter
uses: chartboost/ruff-action@v1
with:
src: "./src"
args: "format --check"

- name: Run Ruff Linter
uses: chartboost/ruff-action@v1
with:
src: "./src"
args: "check"
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,8 @@ modm_data = ["*.md", "*/*.md", "*/*/*.md", "*/*/*/*.md"]

[tool.setuptools-git-versioning]
version_file = "VERSION"

[tool.ruff]
exclude = [".venv/", "ext/", "build/", "log/"]
line-length = 120
target-version = "py311"
7 changes: 7 additions & 0 deletions tools/make/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ clean-venv:
@rm -rf .venv


.PHONY: format
## Format the Python source code
format:
@ruff format src
@ruff check --fix src
@ruff format src

# =============================== Documentation ===============================
.PHONY: build-homepage
## Generate the entire homepage to /docs.
Expand Down

0 comments on commit c7fb4f4

Please sign in to comment.