Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switching to Hatch for package management #535

Merged
merged 23 commits into from
May 1, 2024

Conversation

benoit-cty
Copy link
Contributor

@benoit-cty benoit-cty commented Apr 28, 2024

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:

  • Migrate from setup.py
  • Migrate from Tox
  • Update contributing
  • Update readme
  • Update documentation
  • Migrate CI to use Hatch instead of Tox
  • Remove tox
  • Remove setup.py

Copy link
Collaborator

@SaboniAmine SaboniAmine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small comments

.github/workflows/build.yml Outdated Show resolved Hide resolved
.github/workflows/build.yml Outdated Show resolved Hide resolved
docker-compose.yml Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
@benoit-cty
Copy link
Contributor Author

benoit-cty commented Apr 30, 2024

-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.

@benoit-cty benoit-cty changed the title WIP : Switching to Hatch for package management Switching to Hatch for package management May 1, 2024
@benoit-cty benoit-cty marked this pull request as ready for review May 1, 2024 07:12
@benoit-cty benoit-cty merged commit 26edad1 into master May 1, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants