mlco2 / codecarbon

Track emissions from Compute and recommend ways to reduce their impact on the environment.
https://mlco2.github.io/codecarbon
MIT License
1.11k stars 173 forks source link

Switching to Hatch for package management #535

Closed benoit-cty closed 5 months ago

benoit-cty commented 5 months ago

I suggest to use Hatch because it will provide a better dependencies management for CodeCarbon.

It also a way to move from setup.py to more modern pyproject.toml

It will also replace tox, venv, and make.

It will simplify the management of the project. For example to run the dashboard locally you just have to do :

hatch run dashboard:run

And Hatch will handle the installation of the needed Python version, the creation of the environment and the package dependencies.

All the requirements are defined id pyproject.toml and a lock is generated for different part of the project in a requirements folder.

TODO:

benoit-cty commented 5 months ago

-As I have to modify the config of checks, no other PR could be merge before rebasing on this one !-

NO : I put back Matrix test in Github Actions to allow them running in parallel.