Repository navigation
GitHub Actions refactor - #291
Conversation
Review Summary by QodoRefactor GitHub Actions for rattler-build and gitflow development workflow
WalkthroughsDescription• Migrate from conda-mambabuild to rattler-build for package building • Consolidate separate pcgr/pcgrr build jobs using matrix strategy • Switch environment setup from micromamba to miniconda/miniforge • Rename conda recipe format from meta.yaml to recipe.yaml (rattler-build compatible) • Rename conda environment files from .yml to .yaml extension • Update conda-lock to target linux-64 only, drop osx-64 support • Enable pkgdown auto development mode for dev version documentation • Switch Docker registry from Docker Hub to GitHub Container Registry (ghcr.io) • Update GitHub Actions to latest versions (v4, v6, v7, v8) • Add dev label channel support for dev branch conda deployments Diagramflowchart LR
A["conda-mambabuild"] -->|"migrate to"| B["rattler-build"]
C["separate build jobs"] -->|"consolidate with"| D["matrix strategy"]
E["micromamba"] -->|"switch to"| F["miniconda/miniforge"]
G["meta.yaml"] -->|"rename to"| H["recipe.yaml"]
I["yml files"] -->|"rename to"| J["yaml files"]
K["osx-64 + linux-64"] -->|"drop to"| L["linux-64 only"]
M["Docker Hub"] -->|"migrate to"| N["ghcr.io"]
O["main branch only"] -->|"add support"| P["dev branch with labels"]
File Changes1. .github/workflows/build_conda_recipes.yaml
|
Code Review by Qodo
1. Bumpversion search mismatch
|
There was a problem hiding this comment.
Pull request overview
Refactors the CI/CD and packaging pipeline to support a gitflow-style main/dev branching model, migrate conda builds to rattler-build, update conda lock generation, adjust pkgdown development publishing behavior, and move Docker publishing to GHCR.
Changes:
- Refactor GitHub Actions workflow to build/upload conda packages via
rattler-build, generate linux-only lockfiles, and handledevlabel channels on thedevbranch. - Migrate conda recipes from
meta.yaml/build.shtorecipe.yamlformat and update conda env YAMLs accordingly. - Update pkgdown config for
development: mode: autoand switch Docker login/push from Docker Hub toghcr.io.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/build_conda_recipes.yaml |
Reworked conda build/upload, lockfile generation, pkgdown deploy, and Docker deploy flow for main/dev and GHCR. |
conda/recipe/pcgr/recipe.yaml |
New rattler-build recipe for the Python package. |
conda/recipe/pcgr/meta.yaml |
Removed legacy conda-build recipe. |
conda/recipe/pcgr/build.sh |
Removed legacy build script. |
conda/recipe/pcgrr/recipe.yaml |
Converted R recipe to rattler-build format and updated metadata/tests. |
conda/recipe/pcgrr/build.sh |
Removed legacy build script. |
conda/env/yaml/condabuild.yaml |
New build environment for rattler-build + conda-lock. |
conda/env/yml/condabuild.yml |
Removed legacy build environment. |
conda/env/yaml/pcgr.yaml |
Updated package pinning/channel usage and dependency adjustment. |
conda/env/yaml/pcgrr.yaml |
Updated package naming/channel usage. |
conda/env/yaml/pkgdown.yaml |
Updated pcgrr dependency naming for pkgdown env. |
.bumpversion.toml |
Updated version bump targets for renamed/moved conda recipe/env files. |
pyproject.toml |
Version metadata comment update. |
pcgr/_version.py |
Version metadata comment update. |
pcgrr/DESCRIPTION |
Updated RoxygenNote. |
pcgrr/pkgdown/_pkgdown.yml |
Enabled pkgdown auto development mode. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| search = "pcgrr =={current_version}" | ||
| replace = "pcgrr =={new_version}" |
| environment-file: ${{ env.conda_env_yaml }}/pkgdown.yaml | ||
| activate-environment: pkgdown_env | ||
| miniforge-version: latest | ||
| - name: 🌐 Website publish |
| search = "pcgrr =={current_version}" | ||
| replace = "pcgrr =={new_version}" |
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| # use the outputs=docker with dest to directly save to tar for apptainer | ||
| - name: 🐳 Docker img build, tar and push to Docker Hub |
| [[tool.bumpversion.files]] | ||
| filename = "conda/env/yml/pcgrr.yml" | ||
| filename = "conda/env/yaml/pcgrr.yaml" | ||
| search = "pcgrr =={current_version}" | ||
| replace = "pcgrr =={new_version}" | ||
|
|
||
| [[tool.bumpversion.files]] | ||
| filename = "conda/env/yml/pkgdown.yml" | ||
| filename = "conda/env/yaml/pkgdown.yaml" | ||
| search = "pcgrr =={current_version}" | ||
| replace = "pcgrr =={new_version}" |
There was a problem hiding this comment.
1. Bumpversion search mismatch 🐞 Bug ✓ Correctness
.bumpversion.toml searches for "pcgrr =={current_version}" in conda env YAMLs, but those files now
pin "r-pcgrr ==…", so bumpversion will fail (or leave pins stale) on the next version bump. This
breaks the automated release workflow and can produce lockfiles/envs pinned to the wrong package
version.
Agent Prompt
## Issue description
`.bumpversion.toml` is configured to update conda env pins using a search string that no longer exists after the refactor (`pcgrr ==...`), while the env files now pin `r-pcgrr ==...`. With `ignore_missing_version = false`, bumpversion will fail (or it will not update the intended files), breaking release automation.
## Issue Context
The conda env YAML files were updated to use `r-pcgrr` as the dependency name. The bumpversion config needs to match that exact string.
## Fix Focus Areas
- .bumpversion.toml[57-65]
- conda/env/yaml/pcgrr.yaml[8-14]
- conda/env/yaml/pkgdown.yaml[6-11]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Making changes in prep for moving to gitflow development (i.e. main for stable releases, dev for merging and testing all feature branches).
devbranch handling:conda_buildjobs and theconda_lockjob now conditionally add a dev label channel when running on the dev branch:--channel pcgr/label/dev--channel devSwitch to
rattler-buildfromconda mambabuild:rattler-build publishthat does both)Conda environment setup: mamba-org/setup-micromamba => conda-incubator/setup-miniconda
conda_lock job changes
pkgdown:
x.y.z.patchwill automatically get copied into thedocs/devfolder, which means e.g.v2.2.5.9000will be viewed underhttps://sigven.github.io/pcgr/devinstead ofhttps://sigven.github.io/pcgr.docker: