Repository navigation
[mpxpy] Automate PyPI releases; add convert_to_xlsx and include_hyperlinks - #21
Merged
mattmathpix merged 6 commits intoSep 22, 2026
Merged
Conversation
…links Add .github/workflows/release.yml: pushing a vX.Y.Z tag from master builds the sdist/wheel, runs the offline unit tests, publishes to PyPI via trusted publishing, and creates a published (non-draft) GitHub release. Guards reject a tag that is not semver, not on master, out of sync with the pyproject version, or not newer than the last release. Add convert_to_xlsx to pdf_new and conversion_new (and to_xlsx_file/ to_xlsx_bytes on Pdf and Conversion), and include_hyperlinks to pdf_new. Bump version to 0.0.23. Triggered by user request to automate mpxpy PyPI releases via GH Actions and add missing API options.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Automate mpxpy's PyPI releases and add two missing API options.
Release automation
New
.github/workflows/release.yml, modeled on the mathpix-cli release workflow:setuptools-scm(pyproject.tomlusesdynamic = ["version"]), so there is no version to bump by hand. The tag is the single source of truth.vX.Y.Ztag.python -m build→twine check→ publish to PyPI → create a published (non-draft) GitHub release with generated notes.PYPI_API_TOKENrepo secret (same__token__credentialdeploy.shuses today).Cutting a release is just:
New API options (all verified against
ocr-api)convert_to_mmd_overlay_pdfonpdf_newfor the newmmd.overlay.pdfformat from the accessible-PDF release: your submitted PDF returned with an invisible, screen-reader-ready text layer (PDF/UA tagged by default; PDF input only). Addsto_mmd_overlay_pdf_file/to_mmd_overlay_pdf_bytesonPdfandFile; the format's options pass through the existingconversion_options["mmd.overlay.pdf"]dict.convert_to_xlsxonpdf_newandconversion_new, plusto_xlsx_file/to_xlsx_bytesonPdfandConversion. xlsx was the only supported conversion format without a convenience flag.include_hyperlinksonpdf_new(extracts PDF link annotations into per-linelinksdata); added to_PDF_REQUEST_OPTION_KEYS.Changelog updated. The first tag must be
v0.0.23or higher, since0.0.22is already on PyPI.One-time setup required before the first tagged release
Add the existing PyPI token as a repo secret named
PYPI_API_TOKEN(Settings → Secrets and variables → Actions). Until it exists the publish step fails.
Testing
v0.0.23tag,python -m buildstamps the version0.0.23intompxpy-0.0.23.tar.gz/.whl;twine checkpasses.Triggered by user request to automate mpxpy PyPI releases via GH Actions and add missing API options.