eliben / pss

pss is a power-tool for searching inside source code files.
Other
327 stars 46 forks source link

Support for pyproject.toml #73

Open aaltat opened 1 year ago

aaltat commented 1 year ago

Currently the pyproject.toml is the new way of configuring Python projects. Also tools like black, ruff and many other tools offer possibility to configure tools behavior by using pyproject.toml. Would it possible to offer similar support for pss? Example -A, -B, -C, --color, --ignore-dir and many others would be nice to have defaults from the toml file.

eliben commented 1 year ago

It seems like this is related to #1 -- supporting a configuration file for pss, except this talks about a project/location specific configuration file. Correct?

So if you invoke pss from $DIR it looks for pyproject.toml in $DIR (and its parent dirs?) and ingests the pss-specific configuration from there?

While I'm open to configuration files for pss in general, I'm not so sure about the idea of pyproject.toml. Even though pss is implemented in Python, it's generally and widely applicable - for example I mostly use it for non-Python projects these days.

aaltat commented 1 year ago

Yes, it is similar to #1, but it is project specific. I think most tools looks from execution folder and if config file is somewhere else, most tools offer --config path/to/pyproject.toml option.

In practice toml format can be used in any project: https://toml.io/en/ but I agree that pyproject.toml is Python specific. Also I agree that pyproject.toml might not be good idea for projects outside of Python land, but using toml format might be useful in any project.