drivendataorg / cookiecutter-data-science

A logical, reasonably standardized, but flexible project structure for doing and sharing data science work.
https://cookiecutter-data-science.drivendata.org/
MIT License
8.38k stars 2.47k forks source link

Ruff lint configuration names are incorrect #388

Open r-b-g-b opened 5 months ago

r-b-g-b commented 5 months ago

To reproduce:

  1. Create a new cookiecutter-data-science repo
  2. Run ruff lint .

Error:

Ruff: Lint failed (ruff failed
  Cause: Failed to parse /home/.../pyproject.toml
  Cause: TOML parse error at line 30, column 12
   |
30 | [tool.ruff.lint.isort]
   |            ^^^^
unknown field `known_first_party`, expected one of `force-wrap-aliases`, `force-single-line`, `single-line-exclusions`, `combine-as-imports`, `split-on-trailing-comma`, `order-by-type`, `force-sort-within-sections`, `case-sensitive`, `force-to-top`, `known-first-party`, `known-third-party`, `known-local-folder`, `extra-standard-library`, `relative-imports-order`, `required-imports`, `classes`, `constants`, `variables`, `no-lines-before`, `lines-after-imports`, `lines-between-types`, `forced-separate`, `section-order`, `default-section`, `no-sections`, `detect-same-package`, `from-first`, `length-sort`, `length-sort-straight`, `sections`
)

It appears that the pyproject.toml ruff configuration setting names are incorrect -- they should use hyphens rather than underscores as separators.

https://docs.astral.sh/ruff/configuration/

r-b-g-b commented 5 months ago

Possibly fixed by #387

tomaz-suller commented 4 days ago

This issue is still relevant, just like the discussion on how to best implement changes to linting in #387 . Perhaps another PR for a hotfix could do?