aio-libs / aiodocker

Python Docker API client based on asyncio and aiohttp
Other
427 stars 97 forks source link

Package with hatch #856

Closed eevelweezel closed 2 months ago

eevelweezel commented 3 months ago

What do these changes do?

This updates pyproject.toml to support new-style packaging with hatch, instead of setuptools / setup.py.

The existing requirements files have been combined into "dependencies" (always installed), "dev" (anything dev, lint, or testing), and "doc" (needed to build the docs). With the optional dependencies, I was trying to follow convention I've seen elsewhere. Feedback would be welcome.

Are there changes in behavior for the user?

Instead of using pip install -r requirements/..., the package can now be installed with pip install -e .[dev,doc] (where "dev" and "doc" are optional dependency groups).

Related issue number

848

Checklist

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 81.34%. Comparing base (167301f) to head (16c4ff1).

:exclamation: Current head 16c4ff1 differs from pull request most recent head f5763c0

Please upload reports for the commit f5763c0 to get more accurate results.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #856 +/- ## ========================================== - Coverage 81.36% 81.34% -0.03% ========================================== Files 24 24 Lines 1374 1372 -2 Branches 245 245 ========================================== - Hits 1118 1116 -2 Misses 170 170 Partials 86 86 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

eevelweezel commented 3 months ago

Pre-commit only supports Python 3.9+ as of v3.6.0, so I changed the requirement to pre-commit>=3.5.0 in order to support Python 3.8.

eevelweezel commented 3 months ago

Could we also adopt setuptools_scm to automate the version mangling based on the latest git tags?

Since we're using hatchling, I used hatch-vcs, which delivers the same functionality. I've also rebased against master.