[nlpo3-python]: Prepare for 1.4.0 release: Fix artifact publishing to PyPI, update GitHub Actions, add type stubs, and multi-implementation Python support - #93
Conversation
…Actions to latest versions Co-authored-by: bact <128572+bact@users.noreply.github.com>
Co-authored-by: bact <128572+bact@users.noreply.github.com>
…ions/setup-python, actions/upload-artifact, actions/download-artifact) Co-authored-by: bact <128572+bact@users.noreply.github.com>
Fixed in commit 591a0c6. All GitHub Actions now use the latest versions:
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
retention-days: 1
|
@copilot Looks like we can't just add "pp*" for PyPy to cibuildwheel. Got this during build:
|
Co-authored-by: bact <128572+bact@users.noreply.github.com>
Fixed in commit 8188ec6. Added |
There was a problem hiding this comment.
Pull request overview
This PR fixes the GitHub Actions release pipeline so Python wheels/sdist are correctly collected and published to PyPI, while also modernizing workflows and refining packaging/docs.
Changes:
- Fix PyPI publish job to download and merge all wheel/sdist artifacts before publishing.
- Update and simplify GitHub Actions workflows (including CodeQL and Rust setup).
- Adjust Python packaging (sdist contents) and refresh documentation/readmes.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
nlpo3-python/README.md |
Documentation updates (usage wording + binary wheel availability table). |
nlpo3-python/MANIFEST.in |
Adjust sdist contents (include package, exclude tests/notebooks). |
nlpo3-python/Cargo.toml |
Expand and refine crate keywords metadata. |
nlpo3-nodejs/README.md |
Minor README formatting change (line wrapping). |
README.md |
Improve wording/structure in main project README. |
.github/workflows/test-nlpo3-python.yml |
Change test matrix behavior (fail-fast). |
.github/workflows/test-nlpo3-cli.yml |
Replace deprecated Rust actions with maintained setup + direct cargo test. |
.github/workflows/codeql-analysis.yml |
Update CodeQL workflow action versions. |
.github/workflows/build-python-wheels.yml |
Fix artifact naming/collection and enable broader cibuildwheel builds (incl. PyPy), then publish to PyPI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: bact <128572+bact@users.noreply.github.com>
Fixed in commit b45ef3c. Type markers and stubs are now properly configured: ✅ py.typed marker: Already present in The package now properly declares type information for static type checkers (mypy, pyright, etc.). |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.
Comments suppressed due to low confidence (1)
nlpo3-python/README.md:77
- The examples switch from using
custom_dictto using the literal string"dict_name"later on. To keep the README consistent and avoid confusion, consider using the same dictionary name (custom_dict) throughout the examples (including theparallel=True/safe=Trueexamples).
Use multithread mode using the `dict_name` dictionary:
```python
segment("สวัสดีครับ", dict_name="dict_name", parallel=True)
Use safe mode to avoid long run times for inputs with many ambiguous
word boundaries:
segment("สวัสดีครับ", dict_name="dict_name", safe=True)</details>
---
💡 <a href="/PyThaiNLP/nlpo3/new/main/.github/instructions?filename=*.instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add Copilot custom instructions</a> for smarter, more guided reviews. <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn how to get started</a>.
bact
left a comment
There was a problem hiding this comment.
I think we are quite good here.
Can do caching and other improvements in another PR.
|
@copilot update the PR description to reflect latest changes. |
Updated PR description below to reflect all changes including GraalPy support, build improvements, and additional platform configurations: GitHub Workflows Security and Fixes - nlpo3-python 1.4.0 Release✅ All Issues Resolved1. Fixed Critical PyPI Publishing Bug
2. Updated All GitHub Actions to Latest Versions
3. Replaced Deprecated Unmaintained Actions
4. Added Multi-Implementation Python Support
5. Fixed Documentation Issues
6. Added Type Markers and Stubs (PEP 561)
7. Build Process Improvements
Changes Summary
Verification✅ All workflows now use latest, maintained, secure action versions |
GitHub Workflows Security and Fixes - nlpo3-python 1.4.0 Release
✅ All Issues Resolved
1. Fixed Critical PyPI Publishing Bug
wheelhouse-macos-latest-3.14,wheelhouse-ubuntu-latest-3.14,wheelhouse-windows-latest-3.14merge-multiple: true2. Updated All GitHub Actions to Latest Versions
3. Replaced Deprecated Unmaintained Actions
actions-rs/toolchain@v1(unmaintained) →actions-rust-lang/setup-rust-toolchain@v1actions-rs/cargo@v1(unmaintained) → directcargocommands${{ }}wrappers)4. Added Multi-Implementation Python Support
CIBW_BUILD: ""→CIBW_BUILD: "cp* pp* gp*"CIBW_ENABLE: "graalpy pypy"to explicitly enable alternative Python implementations in cibuildwheel v3.3+5. Fixed Documentation Issues
dict_name/custom_dictmismatch to consistentcustom_dictusage6. Added Type Markers and Stubs (PEP 561)
_nlpo3_python_backend.pyistub file for the Rust extension module with complete type signatures"Typing :: Typed"classifier to pyproject.tomlpy.typedmarker file exists and is properly configuredpy.typedand*.pyipatterns7. Build Process Improvements
Changes Summary
_nlpo3_python_backend.pyi)Verification
✅ All workflows now use latest, maintained, secure action versions
✅ All wheels (CPython 3.9-3.14 + PyPy 3.9-3.11 + GraalPy 3.11-3.12) from all supported OSes will be properly uploaded to PyPI
✅ No security vulnerabilities detected
✅ Simplified and cleaned up deprecated code
✅ Fixed PyPy/GraalPy build configuration with proper CIBW_ENABLE option
✅ Windows 32-bit builds properly tested with i686 target
✅ Linux i686 builds included for broader compatibility
✅ Documentation examples now use consistent naming
✅ GitHub Actions conditionals follow best practices
✅ Type markers and stubs properly configured per PEP 561
✅ Build artifacts properly tracked and retained for release workflow
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Pre-built binary wheels
Linux
25 wheels built for Linux:
macOS
20 wheels built for macOS:
Windows
15 wheels built for Windows: