diff --git a/.github/workflows/black.yaml b/.github/workflows/black.yaml deleted file mode 100644 index 667332c..0000000 --- a/.github/workflows/black.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: Python Black - -on: [push, pull_request] - -jobs: - lint: - name: Python Lint - runs-on: ubuntu-latest - steps: - - name: Setup Python - uses: actions/setup-python@v5 - - name: Setup checkout - uses: actions/checkout@v4 - - name: Lint with Black - run: | - pip install black - black --diff --check src/motile_toolbox tests diff --git a/.github/workflows/mypy.yaml b/.github/workflows/mypy.yaml index 12f89f6..8ffc108 100644 --- a/.github/workflows/mypy.yaml +++ b/.github/workflows/mypy.yaml @@ -1,6 +1,10 @@ name: Python mypy -on: [push, pull_request] +on: + push: + branches: + - main + pull_request: jobs: static-analysis: diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index fa14252..caf676c 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -2,9 +2,22 @@ name: Test on: push: + branches: + - main + pull_request: jobs: + ruff: + name: Ruff + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: chartboost/ruff-action@v1 + with: + args: 'format --check' + test: + name: Test runs-on: ubuntu-latest strategy: fail-fast: false diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e0f6442..e06c0e2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,8 +3,6 @@ ci: autofix_commit_msg: "style(pre-commit.ci): auto fixes [...]" autoupdate_commit_msg: "ci(pre-commit.ci): autoupdate" -default_install_hook_types: [pre-commit, commit-msg] - repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v3.2.0 @@ -14,16 +12,12 @@ repos: - id: check-yaml - id: check-added-large-files - - repo: https://github.com/psf/black - rev: 23.1.0 - hooks: - - id: black - - - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.2.2 + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.5.0 hooks: - id: ruff args: [--fix] + - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy rev: v1.0.1 diff --git a/pyproject.toml b/pyproject.toml index cc060d4..789918a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,13 +30,13 @@ dependencies = [ dev = [ 'pytest', 'pytest-cov', - 'black', 'mypy', 'pdoc', 'pre-commit', 'types-tqdm', 'pytest-unordered', 'plotly', + 'ruff', ] [project.urls]