-
Notifications
You must be signed in to change notification settings - Fork 5
Add example Ruff configurations for various domains #83
Description
Create a configs/ directory in the repository with nested pyproject.toml or ruff.toml files. This structure allows users to sync curated domain-specific configurations out of the box using the --path flag.
Proposed Structure
configs/
├── kitchen-sink/
│ └── ruff.toml
├── fastapi/
│ └── ruff.toml
└── data-science-engineering/
└── ruff.toml
Domain Configurations (Sub-Issues)
We have broken out the creation and discussion of these specific configurations into their own sub-issues. We strongly encourage contributors to join the discussion on these issues, propose rules/settings they find valuable in their daily work, and submit PRs for new domain-specific configs!
💡 Have an idea for a new domain config? We encourage contributors to open new issues proposing entirely new domains (e.g., django, aws-lambda, etc.), along with what makes their configurations unique.
-
Kitchen Sink (Done in Example Config: Kitchen Sink #85):
configs/kitchen-sink/ruff.toml- Enables ALL possible Ruff rules.
- Includes comments explaining each rule or collection of rules.
- Provides links to the official Ruff documentation.
- Includes relevant configuration block settings (e.g.
[lint.isort]and[format]).
-
FastAPI/Web App:
configs/fastapi/ruff.toml- See Sub-Issue: Example Config: FastAPI / Web App #86
- Enabled rules relevant to web development (e.g.,
ANNfor annotations,T20for print statements,UPfor upgrade). - Optimized for modern asynchronous applications.
- Includes
[lint.flake8-fastapi](if applicable) and typing settings.
-
Data Science/Data Engineering:
configs/data-science-engineering/ruff.toml- See Sub-Issue: Example Config: Data Science / Data Engineering #87
- Focused on DS/DE tools and patterns.
- Enabled rules for libraries like NumPy, Pandas, etc. (e.g.,
NPY,PD). - Specific settings for jupyter notebooks, if applicable.
Goal
These examples should be actually useful for their respective domains and will serve as high-quality snippets to pull into our documentation. Users will be able to sync using: ruff-sync https://github.com/Kilo59/ruff-sync --path configs/fastapi