Skip to content

ci: Enable pypi publishing#243

Open
chtruong814 wants to merge 2 commits into
NVIDIA-NeMo:mainfrom
chtruong814:chtruong/initial-pypi
Open

ci: Enable pypi publishing#243
chtruong814 wants to merge 2 commits into
NVIDIA-NeMo:mainfrom
chtruong814:chtruong/initial-pypi

Conversation

@chtruong814

Copy link
Copy Markdown
Contributor

ci: Enable pypi publishing

We're going to publish 0.3.0 (already released) to pypi

Signed-off-by: Charlie Truong <chtruong@nvidia.com>
@greptile-apps

greptile-apps Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR enables PyPI publishing for the emerging-optimizers 0.3.0 release by flipping skip-wheel-build from true to false in the release workflow. It also pins the project to Python 3.12 via a committed .python-version file and adjusts fallback defaults to be more conservative.

  • Wheel building enabled: skip-wheel-build: false allows the reusable _release_library.yml workflow to build and publish a wheel to PyPI; push-triggered runs remain gated by validate-only: true so accidental publishing is not a risk.
  • Default fallbacks tightened: create-gh-release and publish-docs fallbacks changed from hardcoded true to false, meaning push events (which already run in validate-only mode) will no longer request GH-release or doc sync steps — those remain controlled via workflow_dispatch inputs whose UI defaults are still true.
  • Python 3.12 pinned: .python-version is committed (and removed from .gitignore) to make the intended runtime explicit for pyenv and uv.

Confidence Score: 5/5

Safe to merge — the only substantive change is enabling wheel builds; actual PyPI publishing requires an explicit workflow_dispatch with dry-run=false, so no accidental publish can occur from normal CI runs.

All three changes are small and clearly scoped: the wheel-build flag is the intended PyPI enablement, the fallback-default changes make push-event behavior more conservative rather than less, and committing .python-version is a straightforward tooling pin. No logic errors or unintended side-effects are present.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/release.yaml Enables PyPI publishing by setting skip-wheel-build: false; changes create-gh-release and publish-docs fallbacks to false for push events, which is safer since push events already use validate-only mode.
.gitignore Removes the pyenv .python-version ignore entry in tandem with committing the .python-version file to the repo.
.python-version New file pinning the project Python version to 3.12 for pyenv and compatible tooling.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    actor Dev as Developer
    participant GH as GitHub Actions
    participant Pre as pre-flight job
    participant Rel as _release_library.yml
    participant PyPI as PyPI

    Dev->>GH: "workflow_dispatch (dry-run=false)"
    GH->>Pre: (skipped for workflow_dispatch)
    GH->>Rel: "validate-only=false, skip-wheel-build=false, dry-run=false"
    Rel->>Rel: Build wheel (uv)
    Rel->>PyPI: Publish wheel
    Rel->>GH: "Create GH release (if create-gh-release=true)"
    Rel->>GH: "Publish docs (if publish-docs=true)"

    Note over GH,Rel: Push to main (CI validation only)
    GH->>Pre: Run pre-flight checks
    Pre-->>GH: ok
    GH->>Rel: "validate-only=true, skip-wheel-build=false, dry-run=false"
    Rel->>Rel: Build wheel (validate packaging)
    Note over Rel,PyPI: No publish — validate-only=true
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    actor Dev as Developer
    participant GH as GitHub Actions
    participant Pre as pre-flight job
    participant Rel as _release_library.yml
    participant PyPI as PyPI

    Dev->>GH: "workflow_dispatch (dry-run=false)"
    GH->>Pre: (skipped for workflow_dispatch)
    GH->>Rel: "validate-only=false, skip-wheel-build=false, dry-run=false"
    Rel->>Rel: Build wheel (uv)
    Rel->>PyPI: Publish wheel
    Rel->>GH: "Create GH release (if create-gh-release=true)"
    Rel->>GH: "Publish docs (if publish-docs=true)"

    Note over GH,Rel: Push to main (CI validation only)
    GH->>Pre: Run pre-flight checks
    Pre-->>GH: ok
    GH->>Rel: "validate-only=true, skip-wheel-build=false, dry-run=false"
    Rel->>Rel: Build wheel (validate packaging)
    Note over Rel,PyPI: No publish — validate-only=true
Loading

Reviews (2): Last reviewed commit: "Add .python-version" | Re-trigger Greptile

Comment thread .gitignore
Comment on lines 103 to 105
profile_default/
ipython_config.py

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Unrelated .python-version removal may surprise pyenv users

Removing .python-version from .gitignore means any developer using pyenv who has a local .python-version file will now see it as an untracked file in git status. If the intent is to commit a .python-version to pin the project Python version, that file should be added to the repo in this same PR. If this line was removed unintentionally, it should be restored.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Signed-off-by: Charlie Truong <chtruong@nvidia.com>
kajalj22
kajalj22 previously approved these changes Jul 8, 2026
balasaajay
balasaajay previously approved these changes Jul 8, 2026
@greptile-apps

greptile-apps Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Want your agent to iterate on Greptile's feedback? Try greploops.

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.

3 participants