Open erickguan opened 4 days ago
I would normally expect an "init" command for a tool to help new users onboard themselves by stubbing out boilerplate and setting good defaults for greenfield development. It's not obvious to me how this ties into the specific use case of:
intended for advanced users and teams who require more tailored settings
I agree with you. I have a few alternatives:
ruff init-config
ruff init-setup
ruff scaffold
ruff advanced-setup
ruff advanced-config
I know Ruff doesn't use subsub-commands. But these might be interesting:
ruff configure setup
ruff generate config
I could imagine you want to have a plan to organize command hierarchy before comming to a design. In that case, you can freely make changes to this proposal.
I can see how this would be very useful to set up a new project.
Hey,
I am proposing a new command,
ruff init
, to facilitate configuration setup for Python projects. This command aims to simplify the configuration process for both beginners and new projects, without replacing Ruff's default settings. Ruff will continue to function without any configurations, but this feature is intended for advanced users and teams who require more tailored settings.Proposal
The ruff init command will create or update the
pyproject.toml
file with a default configuration block. This block can be customized further, but will build on Ruff's defaults. The command should:Command Functionality
When running
ruff init [--path <pyproject.toml>]
, the command should:Future Enhancements
ruff init
suggests a necessary step before using Ruff, alternatives likeruff config
might also be considered, although this feels somewhat ambiguous. I expect Ruff 1.0 could make subcommands more harmorized.