diff --git a/.github/workflows/flake8-to-ruff.yaml b/.github/workflows/flake8-to-ruff.yaml index 6bad614b36..7805ca28a4 100644 --- a/.github/workflows/flake8-to-ruff.yaml +++ b/.github/workflows/flake8-to-ruff.yaml @@ -8,7 +8,7 @@ concurrency: env: PACKAGE_NAME: flake8-to-ruff - SUBDIRECTORY_NAME: flake8_to_ruff + CRATE_NAME: flake8_to_ruff PYTHON_VERSION: "3.7" # to build abi3 wheels jobs: @@ -30,11 +30,11 @@ jobs: uses: messense/maturin-action@v1 with: target: x86_64 - args: --release --out dist --sdist -m ./crates/${{ env.SUBDIRECTORY_NAME }}/Cargo.toml + args: --release --out dist --sdist -m ./crates/${{ env.CRATE_NAME }}/Cargo.toml maturin-version: "v0.13.0" - name: Install built wheel - x86_64 run: | - pip install dist/${{ env.PACKAGE_NAME }}-*.whl --force-reinstall + pip install dist/${{ env.CRATE_NAME }}-*.whl --force-reinstall - name: Upload wheels uses: actions/upload-artifact@v2 with: @@ -57,7 +57,7 @@ jobs: - name: Build wheels - universal2 uses: messense/maturin-action@v1 with: - args: --release --universal2 --out dist -m ./crates/${{ env.SUBDIRECTORY_NAME }}/Cargo.toml + args: --release --universal2 --out dist -m ./crates/${{ env.CRATE_NAME }}/Cargo.toml maturin-version: "v0.13.0" - name: Install built wheel - universal2 run: | @@ -68,209 +68,209 @@ jobs: name: wheels path: dist - windows: - runs-on: windows-latest - strategy: - matrix: - target: [x64, x86] - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: ${{ env.PYTHON_VERSION }} - architecture: ${{ matrix.target }} - - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - default: true - - name: Build wheels - uses: messense/maturin-action@v1 - with: - target: ${{ matrix.target }} - args: --release --out dist -m ./crates/${{ env.SUBDIRECTORY_NAME }}/Cargo.toml - maturin-version: "v0.13.0" - - name: Install built wheel - shell: bash - run: | - python -m pip install dist/${{ env.PACKAGE_NAME }}-*.whl --force-reinstall - - name: Upload wheels - uses: actions/upload-artifact@v2 - with: - name: wheels - path: dist - - linux: - runs-on: ubuntu-latest - strategy: - matrix: - target: [x86_64, i686] - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: ${{ env.PYTHON_VERSION }} - architecture: x64 - - name: Build wheels - uses: messense/maturin-action@v1 - with: - target: ${{ matrix.target }} - manylinux: auto - args: --release --out dist -m ./crates/${{ env.SUBDIRECTORY_NAME }}/Cargo.toml - maturin-version: "v0.13.0" - - name: Install built wheel - if: matrix.target == 'x86_64' - run: | - pip install dist/${{ env.PACKAGE_NAME }}-*.whl --force-reinstall - - name: Upload wheels - uses: actions/upload-artifact@v2 - with: - name: wheels - path: dist - - linux-cross: - runs-on: ubuntu-latest - strategy: - matrix: - target: [aarch64, armv7, s390x, ppc64le, ppc64] - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: ${{ env.PYTHON_VERSION }} - - name: Build wheels - uses: messense/maturin-action@v1 - with: - target: ${{ matrix.target }} - manylinux: auto - args: --no-default-features --release --out dist -m ./crates/${{ env.SUBDIRECTORY_NAME }}/Cargo.toml - maturin-version: "v0.13.0" - - uses: uraimo/run-on-arch-action@v2.0.5 - if: matrix.target != 'ppc64' - name: Install built wheel - with: - arch: ${{ matrix.target }} - distro: ubuntu20.04 - githubToken: ${{ github.token }} - install: | - apt-get update - apt-get install -y --no-install-recommends python3 python3-pip - pip3 install -U pip - run: | - pip3 install ${{ env.PACKAGE_NAME }} --no-index --find-links dist/ --force-reinstall - - name: Upload wheels - uses: actions/upload-artifact@v2 - with: - name: wheels - path: dist - - musllinux: - runs-on: ubuntu-latest - strategy: - matrix: - target: - - x86_64-unknown-linux-musl - - i686-unknown-linux-musl - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: ${{ env.PYTHON_VERSION }} - architecture: x64 - - name: Build wheels - uses: messense/maturin-action@v1 - with: - target: ${{ matrix.target }} - manylinux: musllinux_1_2 - args: --release --out dist -m ./crates/${{ env.SUBDIRECTORY_NAME }}/Cargo.toml - maturin-version: "v0.13.0" - - name: Install built wheel - if: matrix.target == 'x86_64-unknown-linux-musl' - uses: addnab/docker-run-action@v3 - with: - image: alpine:latest - options: -v ${{ github.workspace }}:/io -w /io - run: | - apk add py3-pip - pip3 install ${{ env.PACKAGE_NAME }} --no-index --find-links /io/dist/ --force-reinstall - - name: Upload wheels - uses: actions/upload-artifact@v2 - with: - name: wheels - path: dist - - musllinux-cross: - runs-on: ubuntu-latest - strategy: - matrix: - platform: - - target: aarch64-unknown-linux-musl - arch: aarch64 - - target: armv7-unknown-linux-musleabihf - arch: armv7 - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: ${{ env.PYTHON_VERSION }} - - name: Build wheels - uses: messense/maturin-action@v1 - with: - target: ${{ matrix.platform.target }} - manylinux: musllinux_1_2 - args: --release --out dist -m ./crates/${{ env.SUBDIRECTORY_NAME }}/Cargo.toml - maturin-version: "v0.13.0" - - uses: uraimo/run-on-arch-action@master - name: Install built wheel - with: - arch: ${{ matrix.platform.arch }} - distro: alpine_latest - githubToken: ${{ github.token }} - install: | - apk add py3-pip - run: | - pip3 install ${{ env.PACKAGE_NAME }} --no-index --find-links dist/ --force-reinstall - - name: Upload wheels - uses: actions/upload-artifact@v2 - with: - name: wheels - path: dist - - pypy: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, macos-latest] - target: [x86_64, aarch64] - python-version: - - "3.7" - - "3.8" - - "3.9" - exclude: - - os: macos-latest - target: aarch64 - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: pypy${{ matrix.python-version }} - - name: Build wheels - uses: messense/maturin-action@v1 - with: - maturin-version: "v0.13.0" - target: ${{ matrix.target }} - manylinux: auto - args: --release --out dist -i pypy${{ matrix.python-version }} -m ./crates/${{ env.SUBDIRECTORY_NAME }}/Cargo.toml - - name: Install built wheel - if: matrix.target == 'x86_64' - run: | - pip install dist/${{ env.PACKAGE_NAME }}-*.whl --force-reinstall - - name: Upload wheels - uses: actions/upload-artifact@v2 - with: - name: wheels - path: dist +# windows: +# runs-on: windows-latest +# strategy: +# matrix: +# target: [x64, x86] +# steps: +# - uses: actions/checkout@v3 +# - uses: actions/setup-python@v4 +# with: +# python-version: ${{ env.PYTHON_VERSION }} +# architecture: ${{ matrix.target }} +# - name: Install Rust toolchain +# uses: actions-rs/toolchain@v1 +# with: +# toolchain: stable +# profile: minimal +# default: true +# - name: Build wheels +# uses: messense/maturin-action@v1 +# with: +# target: ${{ matrix.target }} +# args: --release --out dist -m ./crates/${{ env.CRATE_NAME }}/Cargo.toml +# maturin-version: "v0.13.0" +# - name: Install built wheel +# shell: bash +# run: | +# python -m pip install dist/${{ env.CRATE_NAME }}-*.whl --force-reinstall +# - name: Upload wheels +# uses: actions/upload-artifact@v2 +# with: +# name: wheels +# path: dist +# +# linux: +# runs-on: ubuntu-latest +# strategy: +# matrix: +# target: [x86_64, i686] +# steps: +# - uses: actions/checkout@v3 +# - uses: actions/setup-python@v4 +# with: +# python-version: ${{ env.PYTHON_VERSION }} +# architecture: x64 +# - name: Build wheels +# uses: messense/maturin-action@v1 +# with: +# target: ${{ matrix.target }} +# manylinux: auto +# args: --release --out dist -m ./crates/${{ env.CRATE_NAME }}/Cargo.toml +# maturin-version: "v0.13.0" +# - name: Install built wheel +# if: matrix.target == 'x86_64' +# run: | +# pip install dist/${{ env.CRATE_NAME }}-*.whl --force-reinstall +# - name: Upload wheels +# uses: actions/upload-artifact@v2 +# with: +# name: wheels +# path: dist +# +# linux-cross: +# runs-on: ubuntu-latest +# strategy: +# matrix: +# target: [aarch64, armv7, s390x, ppc64le, ppc64] +# steps: +# - uses: actions/checkout@v3 +# - uses: actions/setup-python@v4 +# with: +# python-version: ${{ env.PYTHON_VERSION }} +# - name: Build wheels +# uses: messense/maturin-action@v1 +# with: +# target: ${{ matrix.target }} +# manylinux: auto +# args: --no-default-features --release --out dist -m ./crates/${{ env.CRATE_NAME }}/Cargo.toml +# maturin-version: "v0.13.0" +# - uses: uraimo/run-on-arch-action@v2.0.5 +# if: matrix.target != 'ppc64' +# name: Install built wheel +# with: +# arch: ${{ matrix.target }} +# distro: ubuntu20.04 +# githubToken: ${{ github.token }} +# install: | +# apt-get update +# apt-get install -y --no-install-recommends python3 python3-pip +# pip3 install -U pip +# run: | +# pip3 install ${{ env.PACKAGE_NAME }} --no-index --find-links dist/ --force-reinstall +# - name: Upload wheels +# uses: actions/upload-artifact@v2 +# with: +# name: wheels +# path: dist +# +# musllinux: +# runs-on: ubuntu-latest +# strategy: +# matrix: +# target: +# - x86_64-unknown-linux-musl +# - i686-unknown-linux-musl +# steps: +# - uses: actions/checkout@v3 +# - uses: actions/setup-python@v4 +# with: +# python-version: ${{ env.PYTHON_VERSION }} +# architecture: x64 +# - name: Build wheels +# uses: messense/maturin-action@v1 +# with: +# target: ${{ matrix.target }} +# manylinux: musllinux_1_2 +# args: --release --out dist -m ./crates/${{ env.CRATE_NAME }}/Cargo.toml +# maturin-version: "v0.13.0" +# - name: Install built wheel +# if: matrix.target == 'x86_64-unknown-linux-musl' +# uses: addnab/docker-run-action@v3 +# with: +# image: alpine:latest +# options: -v ${{ github.workspace }}:/io -w /io +# run: | +# apk add py3-pip +# pip3 install ${{ env.PACKAGE_NAME }} --no-index --find-links /io/dist/ --force-reinstall +# - name: Upload wheels +# uses: actions/upload-artifact@v2 +# with: +# name: wheels +# path: dist +# +# musllinux-cross: +# runs-on: ubuntu-latest +# strategy: +# matrix: +# platform: +# - target: aarch64-unknown-linux-musl +# arch: aarch64 +# - target: armv7-unknown-linux-musleabihf +# arch: armv7 +# steps: +# - uses: actions/checkout@v3 +# - uses: actions/setup-python@v4 +# with: +# python-version: ${{ env.PYTHON_VERSION }} +# - name: Build wheels +# uses: messense/maturin-action@v1 +# with: +# target: ${{ matrix.platform.target }} +# manylinux: musllinux_1_2 +# args: --release --out dist -m ./crates/${{ env.CRATE_NAME }}/Cargo.toml +# maturin-version: "v0.13.0" +# - uses: uraimo/run-on-arch-action@master +# name: Install built wheel +# with: +# arch: ${{ matrix.platform.arch }} +# distro: alpine_latest +# githubToken: ${{ github.token }} +# install: | +# apk add py3-pip +# run: | +# pip3 install ${{ env.PACKAGE_NAME }} --no-index --find-links dist/ --force-reinstall +# - name: Upload wheels +# uses: actions/upload-artifact@v2 +# with: +# name: wheels +# path: dist +# +# pypy: +# runs-on: ${{ matrix.os }} +# strategy: +# matrix: +# os: [ubuntu-latest, macos-latest] +# target: [x86_64, aarch64] +# python-version: +# - "3.7" +# - "3.8" +# - "3.9" +# exclude: +# - os: macos-latest +# target: aarch64 +# steps: +# - uses: actions/checkout@v3 +# - uses: actions/setup-python@v4 +# with: +# python-version: pypy${{ matrix.python-version }} +# - name: Build wheels +# uses: messense/maturin-action@v1 +# with: +# maturin-version: "v0.13.0" +# target: ${{ matrix.target }} +# manylinux: auto +# args: --release --out dist -i pypy${{ matrix.python-version }} -m ./crates/${{ env.CRATE_NAME }}/Cargo.toml +# - name: Install built wheel +# if: matrix.target == 'x86_64' +# run: | +# pip install dist/${{ env.CRATE_NAME }}-*.whl --force-reinstall +# - name: Upload wheels +# uses: actions/upload-artifact@v2 +# with: +# name: wheels +# path: dist release: name: Release @@ -278,12 +278,12 @@ jobs: needs: - macos-universal - macos-x86_64 - - windows - - linux - - linux-cross - - musllinux - - musllinux-cross - - pypy +# - windows +# - linux +# - linux-cross +# - musllinux +# - musllinux-cross +# - pypy if: "startsWith(github.ref, 'refs/tags/')" steps: - uses: actions/download-artifact@v2 diff --git a/crates/flake8_to_ruff/README.md b/crates/flake8_to_ruff/README.md index 68d6a7381d..2c2fac7b12 100644 --- a/crates/flake8_to_ruff/README.md +++ b/crates/flake8_to_ruff/README.md @@ -25,6 +25,18 @@ flake8-to-ruff path/to/tox.ini flake8-to-ruff path/to/.flake8 ``` +## Limitations + +1. Ruff only supports a subset of the Flake configuration options. `flake8-to-ruff` will warn on and + ignore unsupported options in the `.flake8` file (or equivalent). (Similarly, Ruff has a few + configuration options that don't exist in Flake8.) +2. Ruff will omit any error codes that are unimplemented or unsupported by Ruff, including error + codes from unsupported plugins. (See the [Ruff README](https://github.com/charliermarsh/ruff#user-content-how-does-ruff-compare-to-flake8) + for the complete list of supported plugins.) +3. `flake8-to-ruff` does not auto-detect your Flake8 plugins, so any reliance on Flake8 plugins that + implicitly enable third-party checks will be ignored. Instead, add those error codes to your + `select` or `extend-select` fields, so that `flake8-to-ruff` can pick them up. + ## License MIT diff --git a/crates/flake8_to_ruff/pyproject.toml b/crates/flake8_to_ruff/pyproject.toml index e000e40908..786f4ec676 100644 --- a/crates/flake8_to_ruff/pyproject.toml +++ b/crates/flake8_to_ruff/pyproject.toml @@ -30,5 +30,4 @@ build-backend = "maturin" [tool.maturin] bindings = "bin" -sdist-include = ["Cargo.lock"] strip = true