Skip to content

Stabilize packaging CI and add conda-feedstock compatibility smoke matrix#52

Draft
AmberLee2427 wants to merge 22 commits intovalboz:mainfrom
AmberLee2427:main
Draft

Stabilize packaging CI and add conda-feedstock compatibility smoke matrix#52
AmberLee2427 wants to merge 22 commits intovalboz:mainfrom
AmberLee2427:main

Conversation

@AmberLee2427
Copy link

This PR includes packaging and release workflow update for VBMicrolensing.

It adds and stabilizes a cross-platform conda recipe smoke test matrix, improves wheel/sdist build reliability, and adds a publish workflow that is safe for forks. It also adds maintainer documentation for conda-forge maintenance.

The conda smoke workflow (.github/workflows/test_conda_recipe.yml) is intended to guard against divergence from feedstock recipe compatibility. It is not a replacement for conda-forge feedstock CI, but it provides an upstream preflight check that the recipe still renders and builds across OS/Python targets.

The workflow dynamically syncs recipe source metadata before building. It reads the target version from pyproject.toml (or release/tag input), fetches the matching PyPI sdist metadata, and patches conda/meta.yaml version and SHA256 at runtime. Because of this, the committed version and SHA in the repository recipe are not authoritative for CI validation.

The publish workflow (.github/workflows/publish_pypi_release.yml) now supports both tag-based and manual paths, and it skips publish jobs on forks by design.

How to use Publish PyPI And Release

  1. For a real release on the upstream repo, push a tag like vX.Y.Z.
  2. The workflow builds wheels and sdist on the matrix, then publishes to PyPI if running in valboz/VBMicrolensing.
  3. For manual testing, run workflow_dispatch and choose publish_target=testpypi (upstream repo only).
  4. On forks, publish jobs are intentionally skipped to avoid token/project ownership failures.

How to use Test Conda Recipe

  1. Run it manually (workflow_dispatch) or on release.published.
  2. It validates recipe compatibility via matrix builds and import checks.
  3. It updates recipe version/SHA at runtime to match pyproject.toml + PyPI sdist metadata before build.
  4. Treat this as an upstream guardrail for feedstock compatibility drift, not as feedstock CI itself.

- Created meta.yaml file for packaging vbmicrolensing.
- Defined package metadata including name, version, source URL, and SHA256 checksum.
- Specified build requirements and installation script.
- Included test imports and additional package information such as home, summary, and license details.
- Added input option for publish target in the GitHub Actions workflow.
- Updated the publish to PyPI step to use API token for authentication.
- Introduced a new job for publishing to TestPyPI.
- Modified the conda build script to set the CMAKE_GENERATOR environment variable.
- Changed license specification in meta.yaml to 'LGPL-3.0-only'.
- Created MAINTAINING_PACKAGES.md to outline the maintenance workflow for the VBM conda package, detailing the roles of local recipes and the conda-forge feedstock.
- Added README.md to provide an overview of the conda packaging structure and important notes regarding the local recipe and its purpose.
@AmberLee2427
Copy link
Author

AmberLee2427 commented Feb 27, 2026

  • Undo changes to build wheel and check it still works
  • Write publish instructions for Valerio

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