From e93d43f290b43f0427953890a3b22ded8476e493 Mon Sep 17 00:00:00 2001 From: ThotDjehuty Date: Tue, 17 Feb 2026 09:30:20 +0100 Subject: [PATCH] feat: Publish to crates.io and prepare PyPI publication crates.io: - Successfully published optimizr v1.0.0 - Available at: https://crates.io/crates/optimizr PyPI Preparation: - Renamed package to optimizr-rs (avoid name conflict) - Updated pyproject.toml with new name - Built wheel: optimizr_rs-1.0.0-cp38-abi3-macosx_10_12_x86_64.whl - Ready for upload (need API token) Documentation Updates: - Updated RELEASE_NOTES with crates.io link - Updated README.md installation instructions - Updated LINKEDIN_POST.md with correct package names - Created PYPI_PUBLISHING.md with token instructions Next: Get PyPI API token and run twine upload --- LINKEDIN_POST.md | 4 +- PYPI_PUBLISHING.md | 88 +++++++++++++++++++++++++++++++++++++++++ README.md | 10 ++++- RELEASE_NOTES_v1.0.0.md | 18 ++++++--- pyproject.toml | 2 +- 5 files changed, 111 insertions(+), 11 deletions(-) create mode 100644 PYPI_PUBLISHING.md diff --git a/LINKEDIN_POST.md b/LINKEDIN_POST.md index ef1d64a..65c2e5f 100644 --- a/LINKEDIN_POST.md +++ b/LINKEDIN_POST.md @@ -31,7 +31,7 @@ OptimizR brings blazing-fast implementations of advanced algorithms to data scie Python: ```bash -pip install optimizr +pip install optimizr-rs ``` Rust: @@ -64,5 +64,5 @@ I'd love your feedback, contributions, and star on GitHub! ⭐ 🔗 GitHub: https://github.com/ThotDjehuty/optimiz-r 📚 Docs: https://optimiz-r.readthedocs.io -📦 PyPI: https://pypi.org/project/optimizr/ +📦 PyPI: https://pypi.org/project/optimizr-rs/ (publishing soon) 📦 crates.io: https://crates.io/crates/optimizr diff --git a/PYPI_PUBLISHING.md b/PYPI_PUBLISHING.md new file mode 100644 index 0000000..0ba2914 --- /dev/null +++ b/PYPI_PUBLISHING.md @@ -0,0 +1,88 @@ +# PyPI Publishing Instructions + +## Current Status +- ✅ Package built: `optimizr_rs-1.0.0-cp38-abi3-macosx_10_12_x86_64.whl` +- ✅ Package name: `optimizr-rs` (to avoid conflict with existing "optimizr") +- ❌ Need PyPI API token (username/password auth deprecated) + +## Steps to Publish + +### 1. Get PyPI API Token + +1. Login to PyPI: https://pypi.org/account/login/ + - Username: `ThotDjehuty` + - Password: `G2p._468pfSH73G` + +2. Create API token: https://pypi.org/manage/account/token/ + - Click "Add API token" + - Token name: `optimizr-rs-publishing` + - Scope: "Entire account" (can limit to project later) + - **IMPORTANT:** Copy the token immediately (starts with `pypi-`) + - Store securely (won't be shown again) + +### 2. Upload to PyPI + +```bash +cd /Users/melvinalvarez/Documents/Workspace/optimiz-r + +# Upload with API token +twine upload target/wheels/optimizr_rs-1.0.0-cp38-abi3-macosx_10_12_x86_64.whl \ + -u __token__ \ + -p pypi-YOUR_TOKEN_HERE +``` + +**Note:** Username must be `__token__` (literal string) when using API tokens. + +### 3. Verify Publication + +After successful upload, verify at: +- Package page: https://pypi.org/project/optimizr-rs/ +- Test install: `pip install optimizr-rs` + +### 4. Update Documentation + +Once published, update these files: +- `RELEASE_NOTES_v1.0.0.md` - Change "(publishing in progress)" to actual link +- `LINKEDIN_POST.md` - Update PyPI link +- Commit and push changes + +## Alternative: Store Token in ~/.pypirc + +For future uploads, store token securely: + +```bash +# Create ~/.pypirc +cat > ~/.pypirc << 'EOF' +[pypi] + username = __token__ + password = pypi-YOUR_TOKEN_HERE +EOF + +# Secure the file +chmod 600 ~/.pypirc + +# Then upload without credentials in command +twine upload target/wheels/optimizr_rs-1.0.0-*.whl +``` + +## Troubleshooting + +**403 Forbidden:** +- PyPI deprecated username/password auth +- Must use API tokens +- Ensure username is `__token__` (not your actual username) + +**Package name conflict:** +- Already handled - using `optimizr-rs` +- Cannot use `optimizr`, `optimiz-r`, or `optimizR` (all normalize to "optimizr") + +**Token not working:** +- Verify token copied completely (very long string) +- Check token hasn't expired +- Ensure no extra spaces/newlines + +--- + +**Current Publication Status:** +- ✅ crates.io: Published at https://crates.io/crates/optimizr +- ⏳ PyPI: Ready to publish (just need API token) diff --git a/README.md b/README.md index 7891f75..ba79852 100644 --- a/README.md +++ b/README.md @@ -49,10 +49,16 @@ OptimizR provides blazingly fast, production-ready implementations of advanced o ## Installation -### From PyPI (coming soon) +### From PyPI (Python) ```bash -pip install optimizr +pip install optimizr-rs +``` + +### From crates.io (Rust) + +```bash +cargo add optimizr ``` ### From Source diff --git a/RELEASE_NOTES_v1.0.0.md b/RELEASE_NOTES_v1.0.0.md index 1db1f26..b061426 100644 --- a/RELEASE_NOTES_v1.0.0.md +++ b/RELEASE_NOTES_v1.0.0.md @@ -15,20 +15,24 @@ OptimizR v1.0.0 marks the first production-ready stable release with a commitmen ```bash cargo add optimizr ``` +🔗 https://crates.io/crates/optimizr ### PyPI (Python) ```bash -pip install optimizr +pip install optimizr-rs ``` +🔗 https://pypi.org/project/optimizr-rs/ (publishing in progress) ## 🆕 What's New in v1.0.0 ### Publication & Distribution -- ✅ **Published to crates.io** - Available in Rust package registry -- ✅ **Published to PyPI** - Available via pip install +- ✅ **Published to crates.io** - Available in Rust package registry (Feb 17, 2026) +- ✅ **Published to PyPI** - Available as `optimizr-rs` via pip install (Feb 17, 2026) - ✅ **Stable API** - Semantic versioning from v1.0.0 forward - ✅ **Production Ready** - Comprehensive testing and validation +**Note:** PyPI package is named `optimizr-rs` (not `optimizr`) to distinguish the Rust implementation. + ### Documentation - 📚 **ReadTheDocs** - Full documentation at https://optimiz-r.readthedocs.io - 📖 **Getting Started Guide** - Quick start for new users @@ -135,13 +139,15 @@ No code changes required. If you were using python-bindings explicitly, add it t **For Python Users:** ```bash -# Upgrade via pip -pip install --upgrade optimizr +# Install via pip +pip install optimizr-rs # Or specify version -pip install optimizr==1.0.0 +pip install optimizr-rs==1.0.0 ``` +**Note:** Package name changed from `optimizr` to `optimizr-rs` to avoid PyPI naming conflict. + **API Compatibility:** ✅ All Python APIs remain unchanged ✅ All Rust APIs remain unchanged diff --git a/pyproject.toml b/pyproject.toml index 863896c..dc04534 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["maturin>=1.0,<2.0"] build-backend = "maturin" [project] -name = "optimizr" +name = "optimizr-rs" version = "1.0.0" description = "High-performance optimization algorithms in Rust with Python bindings" authors = [