diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml new file mode 100644 index 0000000000..0860cd8fc9 --- /dev/null +++ b/.github/workflows/ruff.yml @@ -0,0 +1,23 @@ +name: Ruff Linting + +on: + pull_request: + types: [synchronize, opened, reopened] + branches: + - main + +concurrency: # Cancel previous workflows on the same pull request + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + run: + name: Ruff Linting + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/ruff-action@v3 + with: + args: check diff --git a/pyproject.toml b/pyproject.toml index cb838b94d4..7f754b68b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,6 +52,11 @@ exclude = ["spikeinterface.*.tests"] [tool.black] line-length = 120 +[tool.ruff] +line-length = 120 +[tool.ruff.lint] +select = ['F401'] + [project.urls] homepage = "https://github.com/SpikeInterface/spikeinterface" repository = "https://github.com/SpikeInterface/spikeinterface" diff --git a/src/spikeinterface/extractors/phykilosortextractors.py b/src/spikeinterface/extractors/phykilosortextractors.py index 8209d93543..46a8e4cecb 100644 --- a/src/spikeinterface/extractors/phykilosortextractors.py +++ b/src/spikeinterface/extractors/phykilosortextractors.py @@ -40,7 +40,7 @@ class BasePhyKilosortSortingExtractor(BaseSorting): The cluster_id column is used as the merge key to combine properties from multiple files. All loaded properties are added to the sorting extractor as unit properties, with some renamed for SpikeInterface conventions: 'group' becomes 'quality', 'cluster_id' - becomes 'original_cluster_id'. These properties can be accessed via ``sorting.get_property()`` + becomes 'original_cluster_id'. These properties can be accessed via ``sorting.get_property()`` function. """