Skip to content

Migrate to PEP 517 build frontend for packaging#278

Merged
codingjoe merged 29 commits intocodingjoe:mainfrom
takis:fix_build
May 1, 2025
Merged

Migrate to PEP 517 build frontend for packaging#278
codingjoe merged 29 commits intocodingjoe:mainfrom
takis:fix_build

Conversation

@takis
Copy link
Copy Markdown
Collaborator

@takis takis commented Apr 24, 2025

No description provided.

takis added 26 commits April 24, 2025 16:06
- 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.
Copy link
Copy Markdown
Owner

@codingjoe codingjoe left a comment

Choose a reason for hiding this comment

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

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

@codingjoe codingjoe self-assigned this May 1, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented May 1, 2025

Codecov Report

Attention: Patch coverage is 95.45455% with 1 line in your changes missing coverage. Please review.

Please upload report for BASE (main@297501b). Learn more about missing BASE report.

Files with missing lines Patch % Lines
vies/forms/widgets.py 85.71% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #278   +/-   ##
=======================================
  Coverage        ?   98.21%           
=======================================
  Files           ?        7           
  Lines           ?      168           
  Branches        ?        0           
=======================================
  Hits            ?      165           
  Misses          ?        3           
  Partials        ?        0           
Flag Coverage Δ
py3.10-dj4.2 98.21% <95.45%> (?)
py3.10-dj5.1 98.21% <95.45%> (?)
py3.10-dj5.2 98.21% <95.45%> (?)
py3.11-dj4.2 98.21% <95.45%> (?)
py3.11-dj5.1 98.21% <95.45%> (?)
py3.11-dj5.2 98.21% <95.45%> (?)
py3.12-dj4.2 98.21% <95.45%> (?)
py3.12-dj5.1 98.21% <95.45%> (?)
py3.12-dj5.2 98.21% <95.45%> (?)
py3.13-dj4.2 98.21% <95.45%> (?)
py3.13-dj5.1 98.21% <95.45%> (?)
py3.13-dj5.2 98.21% <95.45%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Owner

@codingjoe codingjoe left a comment

Choose a reason for hiding this comment

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

All right! That should do it. I added authorization on PyPi for the release workflow to publish the package.

@codingjoe codingjoe merged commit 5a65e76 into codingjoe:main May 1, 2025
18 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.

2 participants