Skip to content

Use pyproject.toml over setup.{py,cfg}#10055

Closed
douglasdavis wants to merge 4 commits intodask:mainfrom
douglasdavis:use-pyproject-dot-toml
Closed

Use pyproject.toml over setup.{py,cfg}#10055
douglasdavis wants to merge 4 commits intodask:mainfrom
douglasdavis:use-pyproject-dot-toml

Conversation

@douglasdavis
Copy link
Copy Markdown
Member

This is a stab at transitioning Dask to use pyproject.toml. Everything that could be pushed into pyproject.toml has been put there. This PR uses the PEP621 compatible hatchling build backend.

Files removed

  • /setup.py (unnecessary)
  • /setup.cfg (unncessary, all tool configuration except flake8 moved to pyproject)
  • /.coveragerc (moved to a table in pyproject)
  • /versioneer.py (use hatch-vcs in pyproject)
  • /dask/_version.py(now auto generated by hatch-vcs)

Files added

  • /pyproject.toml
  • /.flake8 (must be added because flake8 doesn't support pyproject.toml usage

The version is autogenerated by hatch-vcs; a new _version.py is created at installation time (or sdist/wheel building time), so we need to add dask/_version.py to .gitignore.

I reread the contributing docs to see if anything would need to be updated, and it was pretty satisfying to see that I don't think anything needs to be changed. Everything that is documented relies on just pip or pytest, and this PR doesn't change the way either need to be used.

@douglasdavis
Copy link
Copy Markdown
Member Author

douglasdavis commented Mar 13, 2023

First trip up exposed by CI: looks like the coverage configuration isn't translated properly from .coveragerc to pyproject.toml

Copy link
Copy Markdown
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

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

Thanks for handling this @douglasdavis! I've not taken a close look (yet), but did want to point you to the corresponding PR on the distributed side dask/distributed#7629. It'd be good to take the same approach both in dask/dask and dask/distributed

@graingert graingert mentioned this pull request Mar 22, 2023
3 tasks
@douglasdavis
Copy link
Copy Markdown
Member Author

Closing since #10102 is pushing forward

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.

Move from setup.py to pyproject.toml

2 participants