tox-dev / platformdirs

A small Python module for determining appropriate platform-specific dirs, e.g. a "user data dir".
https://platformdirs.readthedocs.io
MIT License
568 stars 49 forks source link

Improve developer experience using Hatch #231

Closed singingwolfboy closed 1 year ago

singingwolfboy commented 1 year ago

This sets up the default Hatch environment to also install the "docs" and "test" dependencies (see "features"). It also adds some Hatch scripts to those environments. This allows the following functionality:

$ hatch shell  # creates & activates a virtualenv for this project, with all dev dependencies
$ hatch run test  # runs pytest in that virtualenv
$ hatch run check-types  # run mypy in that virtualenv
$ hatch run build-docs  # builds HTML documentation
gaborbernat commented 1 year ago

We're using tox instead of hatch and I don't plan to change that.

singingwolfboy commented 1 year ago

I don't understand. I'm not suggesting that the maintainers stop using tox, I simply noticed that this project is already using hatch, and I wanted to contribute some hatch enhancements that other developers (and potential contributors) might appreciate. These enhancements do not interfere with tox at all, and are completely optional to use.

I recognize that every feature comes with a corresponding maintenance burden, and if the answer was "we don't want to maintain and support this use-case", I would be happy to add some comments in the pyproject.toml file to ensure that developers know that this is unsupported -- and even point them to the recommended, supported configuration. But that's not the feedback I received. I'm not trying to remove tox from this project, I'm trying to make it more accessible for developers who prefer other options.

Could the maintainers please re-evaluate this pull request from this perspective?

gaborbernat commented 1 year ago

is already using hatch,

Is using hatchling (as build backend), witch is very different from hatch (which is a build frontend). I invite you to learn more about the difference between them at https://peps.python.org/pep-0517/. The only maintained and recommended build frontend is tox, and we don't plan to support/add hatch in parallel. We recommend you to use tox instead of hatch, because the CI also uses tox so it's guaranteed to work.