diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml deleted file mode 100644 index c525dc4..0000000 --- a/.github/workflows/format.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Code formatting - -on: - workflow_dispatch: - pull_request: - -jobs: - CICD: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - uses: actions/setup-python@v4 - with: - python-version: '3.8' - - - uses: isort/isort-action@master - with: - requirementsFiles: "requirements_dev.txt" - configuration: "--check-only --up -l 100 " - - - uses: psf/black@stable - with: - options: "--check -S -l 100" - - - uses: py-actions/flake8@v2 diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml new file mode 100644 index 0000000..6fcd0f6 --- /dev/null +++ b/.github/workflows/ruff.yml @@ -0,0 +1,15 @@ +name: Ruff + +on: + workflow_dispatch: + pull_request: + +jobs: + ruff: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: chartboost/ruff-action@v1 + with: + version: 0.6.8 + args: 'format --check' diff --git a/pyproject.toml b/pyproject.toml index aabc179..c667ae3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,20 +30,20 @@ homepage = "https://github.com/jziolkowski/tdm" issue-tracker = "https://github.com/jziolkowski/tdm/issues" documentation = "https://github.com/jziolkowski/tdm/wiki" -[tool.black] -line-length = 100 -target-version = ["py38"] -skip-string-normalization = true - -[tool.isort] -profile = "black" -line_length = 100 -py_version = 38 -use_parentheses = true - [tool.setuptools_scm] write_to = "tdmgr/_version.py" local_scheme = "no-local-version" [project.scripts] tdmgr = "tdmgr.run:start" + +[tool.ruff] +line-length = 100 +target-version = "py38" + +[tool.ruff.format] +line-ending = "auto" +quote-style = "double" + +[tool.ruff.lint.per-file-ignores] +"__init__.py" = ["F401"] diff --git a/requirements_dev.txt b/requirements_dev.txt index 0179ff8..6280b6a 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -1,5 +1,3 @@ -r requirements.txt -black==24.3.0 -flake8==5.0.4 -isort==5.10.1 +ruff==0.6.8 pytest==7.4.3