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

Modernize packaging and plugin discovery #12

Merged
merged 12 commits into from
Nov 29, 2023
Merged

Conversation

dexter2206
Copy link
Member

This PR updates several details about our setup that modernize how we handle packaging and plugin discovery. The changes are:

  • Switch to Poetry from setuptools, for its support of lockfiles. The dynamic versioning is done via poetry-dynamic-versioning plugin
  • Using importlib.metadata for plugin discovery.
    • This allows us for dropping dependency on pluggy
    • Possible because importlib.metadata is no longer provisional as of Python 3.10 (and its backport importlib_metadata is stable)
  • Change from flat to src layout, which seems to be recommended layout in modern Python.
  • Using importlib.resources instead of pkg_resources, which is now deprecated

Copy link

codecov bot commented Nov 29, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (fa7c037) 100.00% compared to head (a252582) 100.00%.
Report is 10 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master       #12   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         5    +1     
  Lines           81       103   +22     
=========================================
+ Hits            81       103   +22     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

use poetry to install package for quality checks purpose

Use dedicated poetry action for quality checks job

Restore mypy configuration

Add -p switch to mypy invocation

Try running mypy only in src directory

explicitly set mypy path in pyproject.toml
@dexter2206 dexter2206 requested a review from lpawela November 29, 2023 01:27
@dexter2206 dexter2206 merged commit 66562c0 into master Nov 29, 2023
4 checks passed
@dexter2206 dexter2206 deleted the kj/packaging-changes branch November 29, 2023 15:39
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.

2 participants