Skip to content

Prepare PyeScan for PyPI releases - #12

Merged
IsmailM merged 2 commits into
mainfrom
pypi-distribution-options
Aug 14, 2026
Merged

IsmailM merged 2 commits into
mainfrom
pypi-distribution-options

Conversation

@IsmailM

@IsmailM IsmailM commented Aug 14, 2026 •

Copy link
Copy Markdown
Member

Summary

PyeScan's package metadata, dependency boundaries, build checks, and release automation were not yet ready for a reliable public PyPI release. In particular, optional notebook and imaging dependencies were imported by the base package, distribution artifacts were not tested in isolated environments, and the existing release workflow ran from the main branch instead of an explicit version tag.

This change prepares PyeScan for distribution through PyPI. It completes the project metadata and MIT licence ownership, documents installation extras and the release process, moves optional imports behind the features that need them, and adds a projection extra. It also replaces the shared CI workflow with repository-owned quality, test, and build jobs and introduces a tag-driven release workflow using PyPI trusted publishing.

The result is a smaller, usable base installation with clearer errors when an optional feature is requested, reproducible wheel and source distributions, and a release process that validates the tag against the package version before publishing. GitHub Actions are pinned to immutable revisions, while the release job uses narrowly scoped permissions.

Validation

  • Ruff formatting and lint checks
  • Dependency vulnerability audit
  • 116 tests on Python 3.12
  • Coverage threshold check (42.51% total; 40% required)
  • Wheel and source distribution builds
  • Twine metadata validation for both artifacts
  • Isolated installation and CLI smoke tests for both artifacts

@IsmailM
IsmailM marked this pull request as ready for review August 14, 2026 21:43
Copilot AI lite review requested due to automatic review settings August 14, 2026 21:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This pull request prepares PyeScan for reliable PyPI distribution by tightening project metadata and optional dependency boundaries, adding isolated build/smoke validation, and switching release automation to a tag-driven trusted-publishing workflow.

Changes:

  • Completed packaging metadata (name/license files/URLs/keywords), added new projection extra, and refined dependency groups/extras.
  • Moved notebook/imaging imports behind feature usage with clearer optional-dependency behavior and updated docs.
  • Reworked CI and release workflows to run repository-owned checks, build validated artifacts, and publish from version tags.

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
uv.lock Updates locked dependencies/extras (incl. new projection extra) and adds per-package exclude-newer override.
tests/smoke_test.py Adds distribution smoke-check script for installed artifacts and CLI help output.
src/pyescan/visualise.py Defers SciPy import behind smoothing feature with actionable error messaging.
src/pyescan/tools/image_registration.py Defers Jupyter-only imports to runtime for optional notebook visualization.
src/pyescan/core/visualisation.py Centralizes lazy ipywidgets import with user-friendly guidance for missing extras.
src/pyescan/core/scan_oct.py Defers IPython and scikit-image imports to runtime; adds projection-extra guidance.
src/pyescan/core/scan_enface.py Defers IPython import to runtime for notebook display.
README.md Documents installation extras and the new tag-driven release process.
pyproject.toml Finalizes project metadata, extras/groups, coverage baseline, and uv constraints.
LICENSE Updates MIT license copyright holder.
justfile Adds artifact validation (twine) and isolated smoke testing for wheel/sdist builds.
.github/workflows/release.yml Switches release trigger to version tags, validates tag/version match, and uses trusted publishing.
.github/workflows/ci.yml Replaces shared workflow with repo-owned quality/test/build jobs and artifact upload.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tests/smoke_test.py Outdated
Comment thread src/pyescan/tools/image_registration.py Outdated
Comment thread src/pyescan/core/scan_oct.py
Comment thread src/pyescan/core/scan_enface.py
@IsmailM
IsmailM merged commit 84cb893 into main Aug 14, 2026
10 checks passed
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.

2 participants