Migrate to PEP 517 build frontend for packaging#278
Migrate to PEP 517 build frontend for packaging#278codingjoe merged 29 commits intocodingjoe:mainfrom
Conversation
- Replace `twine check` and `python -m build` with `uv build` and `uv pip install` - Use `readme_renderer` to validate README.rst rendering for PyPI - Compile translations via CLI script before build - Clean up misleading job name (`readme` → `build-and-validate`) - Remove unnecessary dependencies: twine, build, wheel, setuptools upgrade
- Replace pip install with uv installation - Use compile-translations script instead of setup.py - Use uv build instead of manual setup.py commands - Replace twine upload with uv publish command - Simplify authentication using uv's token parameter
Patch zeep.Client in tests that call VATIN.is_valid() or access .data, replacing real network requests with mocked responses. This fixes failures caused by `zeep.exceptions.Fault: MS_MAX_CONCURRENT_REQ` when hitting the public VIES SOAP service too frequently. Affected tests: - TestVATIN.test_result - ModelFormTestCase.test_is_valid_and_has_vatin_data Mocked responses use SimpleNamespace to support attribute access.
codingjoe
left a comment
There was a problem hiding this comment.
Hi there,
Wow, you put great effort into this!
I see you switched to a building approach, that requires calling an additional script. Sadly, this will break installing the package from source.
But, fear not, someone wrote https://github.com/codingjoe/flit-gettext for this purpose ;)
Since you are not using any UV related build tools, I don't see the need to use it for building. Especially, since its API is identical.
UV is a good package manager for a large project, but a bit overkill for distribution in this case.
If you don't mind, I would like to use my current release script. I like to keep all my packages are released the same way to ensure consistency. I will update the PR accordingly, to give this a push.
Thanks!
Joe
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #278 +/- ##
=======================================
Coverage ? 98.21%
=======================================
Files ? 7
Lines ? 168
Branches ? 0
=======================================
Hits ? 165
Misses ? 3
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
codingjoe
left a comment
There was a problem hiding this comment.
All right! That should do it. I added authorization on PyPi for the release workflow to publish the package.
No description provided.