Skip to content

Use conda-forge release flow for conda packages#368

Open
isVoid wants to merge 2 commits into
NVIDIA:mainfrom
isVoid:wangm/conda-forge-release-flow
Open

Use conda-forge release flow for conda packages#368
isVoid wants to merge 2 commits into
NVIDIA:mainfrom
isVoid:wangm/conda-forge-release-flow

Conversation

@isVoid
Copy link
Copy Markdown
Collaborator

@isVoid isVoid commented May 22, 2026

Summary

  • Replace the old in-repo NVIDIA-channel conda recipes with a conda-forge-style split recipe for ast_canopy and numbast.
  • Keep conda CI building/testing local packages from that recipe, without the retired numbast-extensions conda package.
  • Remove direct NVIDIA Anaconda upload from the release workflow.
  • Add a tag-release job that opens a @conda-forge-admin, please update version request on conda-forge/numbast-feedstock.
  • Document the conda-forge release follow-up and the required CONDA_FORGE_FEEDSTOCK_TOKEN secret.

Validation

  • bash -n ci/build_conda_python.sh ci/test_conda_python.sh conda/recipe/build-astcanopy.sh conda/recipe/build-numbast.sh
  • YAML parse check for .github/workflows/conda-python-build.yaml, .github/workflows/publish.yaml, and conda/recipe/conda_build_config.yaml
  • git diff --check
  • PROJECT_VERSION=0.10.0.dev7 GIT_DESCRIBE_NUMBER=7 conda render --output conda/recipe

Summary by CodeRabbit

  • Chores

    • Consolidated conda recipe structure and simplified the build process by unifying recipe directories into a single recipe configuration
    • Updated CI/CD workflows to streamline conda package builds and add conda-forge integration for automated release notifications
    • Refined build scripts to simplify version handling and remove legacy dependencies
  • Documentation

    • Added verification steps for the publish workflow and conda-forge update prerequisites in contribution guidelines

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 22, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 687354dd-e86d-4528-a0fd-6adfa0047531

📥 Commits

Reviewing files that changed from the base of the PR and between be7db03 and 1548298.

📒 Files selected for processing (2)
  • .pre-commit-config.yaml
  • conda/recipe/conda_build_config.yaml

📝 Walkthrough

Walkthrough

This PR consolidates three separate conda recipes (ast_canopy, numbast, numbast_extensions) into a single unified recipe with two outputs. It updates CI workflows to build the new structure, removes direct Anaconda uploads, and replaces them with conda-forge feedstock update requests. Versioning logic is adjusted to use commit-distance-based development versions instead of git hashes.

Changes

Conda Recipe Consolidation and Release Flow

Layer / File(s) Summary
Unified conda recipe with multiple outputs
conda/recipe/meta.yaml, conda/recipe/conda_build_config.yaml
New meta.yaml recipe with two outputs (ast_canopy and numbast), using PROJECT_VERSION and GIT_DESCRIBE_NUMBER for templating, CUDA-only builds, and shared about/feedstock metadata.
Build scripts for recipe outputs
conda/recipe/build-astcanopy.sh, conda/recipe/build-numbast.sh
build-astcanopy.sh builds the C++ library first with CMake/Ninja, then installs Python bindings; build-numbast.sh installs the Python package with version overrides and strict error handling.
CI build orchestration
ci/build_conda_python.sh
Conda build invocation changed from multiple subdirectories (conda/recipes/ast_canopy, etc.) to single unified path (conda/recipe); GIT_DESCRIBE_HASH export removed.
Test environment and version management
ci/test_conda_python.sh
PROJECT_VERSION now computed with .dev<N> commit-distance suffix; test packages use plain version strings instead of git-hash patterns; --cccl flag removed from test runner call.
Publish workflow and conda-forge integration
.github/workflows/publish.yaml
Removes build-conda job; adds trigger-conda-forge job that creates feedstock update issues on version tags using GitHub API and CONDA_FORGE_FEEDSTOCK_TOKEN.
Conda build workflow simplification
.github/workflows/conda-python-build.yaml
Removes upload_to_conda workflow input and the conditional "Publish Conda Package" step that previously uploaded to Anaconda.
Release documentation and token requirements
CONTRIBUTING.md
Updates release process docs with publish workflow verification steps and documents CONDA_FORGE_FEEDSTOCK_TOKEN as a required secret for conda-forge update requests.
Cleanup and pre-commit configuration
conda/recipes/numbast/build.sh, .pre-commit-config.yaml
Removes deprecated build script; adds conda/recipe/meta.yaml to YAML linting exclusions in check-yaml and yamlfmt hooks.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • NVIDIA/numbast#363: Overlaps on ci/test_conda_python.sh modifications, particularly around ci/run_tests.py flag handling and MLIR routing logic.

Poem

🐰 Whiskers twitch with recipe glee,
Three become one, now unified be!
Conda-forge calls with GitHub appeal,
No more uploads, just issues sealed!
Versions bloom with distance sweet,
A cleaner build from root to neat! 🌾

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main change: migrating from in-repo NVIDIA-channel conda recipes to a conda-forge release flow for conda packages.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/publish.yaml:
- Around line 53-66: The current dedup logic builds ISSUE_TITLE as a constant
and queries gh issue list into EXISTING_ISSUE, which causes new releases to be
blocked if any prior "please update version" issue remains open; update the
script to include the release-specific identifier (e.g. the tag or version
variable such as GITHUB_REF_NAME or a RELEASE_TAG you compute) in ISSUE_TITLE
and in the gh issue list --search so the search is scoped to issues for this
exact release; modify the variables around ISSUE_TITLE and the gh command that
sets EXISTING_ISSUE (and any echo output) to reference that tag/version
identifier so only an open issue for the same release will prevent creating a
new one.

In `@conda/recipe/build-astcanopy.sh`:
- Line 15: The debug line echo "cmake: $(ls \"${PREFIX}/lib/cmake/clang\")" can
abort the script under strict mode if the directory/package is missing; change
it to a guarded check: test for the directory or glob first (using the PREFIX
variable and the "${PREFIX}/lib/cmake/clang" path) and only run ls or print its
contents when present, otherwise print a safe "not found" message or omit the ls
entirely so the build won't fail prematurely.

In `@conda/recipe/meta.yaml`:
- Around line 53-55: The test currently uses test.files to copy
lib/libastcanopy.so from the recipe instead of verifying the installed artifact;
replace the test.files entry with a test section that runs a command asserting
the installed shared library exists at ${PREFIX}/lib/libastcanopy.so (e.g., a
test command that checks for the file's presence or size). Update the meta.yaml
test block (replace test.files and its value) so the test invokes a
shell/command target that checks ${PREFIX}/lib/libastcanopy.so is present at
runtime.

In `@CONTRIBUTING.md`:
- Around line 94-95: Renumber the ordered sub-list items currently starting with
"7. Verify the publish workflow uploads PyPI wheels..." and "8. Verify docs
deployment publishes..." to start at "1." and "2." respectively so the nested
list resets after the block boundary and satisfies markdownlint MD029; edit the
two list markers in CONTRIBUTING.md to 1. and 2. while leaving the rest of the
bullet text unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: d7005d22-7797-4a6e-957d-c38171bcddca

📥 Commits

Reviewing files that changed from the base of the PR and between b395822 and be7db03.

📒 Files selected for processing (18)
  • .github/workflows/conda-python-build.yaml
  • .github/workflows/publish.yaml
  • CONTRIBUTING.md
  • ci/build_conda_python.sh
  • ci/test_conda_python.sh
  • ci/upload_conda.sh
  • conda/recipe/build-astcanopy.sh
  • conda/recipe/build-numbast.sh
  • conda/recipe/conda_build_config.yaml
  • conda/recipe/meta.yaml
  • conda/recipes/ast_canopy/build.sh
  • conda/recipes/ast_canopy/conda_build_config.yaml
  • conda/recipes/ast_canopy/meta.yaml
  • conda/recipes/numbast/build.sh
  • conda/recipes/numbast/conda_build_config.yaml
  • conda/recipes/numbast/meta.yaml
  • conda/recipes/numbast_extensions/build.sh
  • conda/recipes/numbast_extensions/meta.yaml
💤 Files with no reviewable changes (10)
  • conda/recipes/numbast/build.sh
  • conda/recipes/ast_canopy/conda_build_config.yaml
  • ci/upload_conda.sh
  • conda/recipes/numbast_extensions/meta.yaml
  • conda/recipes/numbast/meta.yaml
  • conda/recipes/ast_canopy/build.sh
  • conda/recipes/ast_canopy/meta.yaml
  • conda/recipes/numbast_extensions/build.sh
  • conda/recipes/numbast/conda_build_config.yaml
  • .github/workflows/conda-python-build.yaml

Comment on lines +53 to +66
ISSUE_TITLE="@conda-forge-admin, please update version"
EXISTING_ISSUE="$(
gh issue list \
--repo conda-forge/numbast-feedstock \
--state open \
--search "${ISSUE_TITLE} in:title" \
--json number \
--jq '.[0].number // ""'
)"

if [[ -n "${EXISTING_ISSUE}" ]]; then
echo "conda-forge update request already open: conda-forge/numbast-feedstock#${EXISTING_ISSUE}"
exit 0
fi
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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Dedup check can block future release requests

Lines 53–60 search only by a constant title. If an older update issue is still open, a new tag release won’t create a new request, so the new release can be skipped unintentionally.

Proposed fix
-          ISSUE_TITLE="`@conda-forge-admin`, please update version"
+          ISSUE_TITLE="`@conda-forge-admin`, please update version ${RELEASE_VERSION}"
           EXISTING_ISSUE="$(
             gh issue list \
               --repo conda-forge/numbast-feedstock \
               --state open \
               --search "${ISSUE_TITLE} in:title" \
               --json number \
               --jq '.[0].number // ""'
           )"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/publish.yaml around lines 53 - 66, The current dedup logic
builds ISSUE_TITLE as a constant and queries gh issue list into EXISTING_ISSUE,
which causes new releases to be blocked if any prior "please update version"
issue remains open; update the script to include the release-specific identifier
(e.g. the tag or version variable such as GITHUB_REF_NAME or a RELEASE_TAG you
compute) in ISSUE_TITLE and in the gh issue list --search so the search is
scoped to issues for this exact release; modify the variables around ISSUE_TITLE
and the gh command that sets EXISTING_ISSUE (and any echo output) to reference
that tag/version identifier so only an open issue for the same release will
prevent creating a new one.

Comment thread conda/recipe/build-astcanopy.sh
Comment thread conda/recipe/meta.yaml
Comment thread CONTRIBUTING.md
@github-actions
Copy link
Copy Markdown

Doc Preview CI
🚀 View pre-built docs at
https://NVIDIA.github.io/numbast/pr-preview/pr-368/

Preview will be ready when GitHub Pages deployment finishes.

@isVoid
Copy link
Copy Markdown
Collaborator Author

isVoid commented May 22, 2026

@cryos I think the new conda build is about 20% faster than the old recipe.

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.

1 participant