Skip to content

Migrate tooling from Poetry + Docker to uv - #44

Merged
lgrcia merged 12 commits into
lgrcia:mainfrom
dgegen:move-to-uv
Jul 14, 2026
Merged

lgrcia merged 12 commits into
lgrcia:mainfrom
dgegen:move-to-uv

Conversation

@dgegen

@dgegen dgegen commented May 6, 2026 •

Copy link
Copy Markdown
Collaborator

This addresses the CI aspect requested in PR #37. Docker is no longer required to run the test matrix, meaning that containerised CI has been entirely replaced with native GitHub Actions steps. If this is accepted, it will also render my previous PR #43 unnecessary, as this branch already has relaxed version constraints.

A timely resolution of the tight version constraints would be appreciated, as photutils>=3.0.0 requires numpy>=2.0.0, and astra depends on both.

Summary

  • Rewrite ci.yml to use astral-sh/setup-uv with the Python version matrix, uv sync, and uv run pytest; replace poetry build + poetry publish in publish.yml with uv build + uv publish.
  • Upgrade actions/checkout to v6 and opt into Node.js 24 runners ahead of the June 2026 forced migration
  • Move dev dependencies into a [dependency-groups] table in pyproject.toml
  • Remove Dockerfile and docker-compose.yml — CI no longer needs Docker for environment isolation

Test plan

  • Verify CI matrix passes for Python 3.11 / 3.12 / 3.13 × astropy 6.1.7 / 7.0

Copilot AI review requested due to automatic review settings May 6, 2026 14:39

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 PR migrates the project’s CI/publishing tooling from Poetry + Docker-based test execution to uv, simplifying the GitHub Actions setup and removing containerized CI dependencies.

Changes:

  • Replace Docker Compose-based CI with native GitHub Actions using astral-sh/setup-uv, uv sync, and uv run pytest.
  • Update the release workflow to build/publish with uv build and uv publish.
  • Move dev dependencies from a Poetry-style optional extra into a dependency-groups.dev table and remove Docker artifacts.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pyproject.toml Moves dev tooling deps into [dependency-groups] and removes the dev optional-dependency extra.
Dockerfile Removes the Poetry-based container build previously used for CI/testing.
docker-compose.yml Removes the container orchestration previously used to run the test suite in CI.
.github/workflows/ci.yml Rewrites CI to use uv instead of Docker Compose/Poetry; adds Python × Astropy matrix with an Astropy override step.
.github/workflows/publish.yml Replaces Poetry build/publish steps with uv build and uv publish.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pyproject.toml
Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml Outdated
@dgegen

dgegen commented May 6, 2026

Copy link
Copy Markdown
Collaborator Author

We may also want to replace [numpy.cross](numpy.org/doc/stable/reference/generated/numpy.cross.html, which raises deprecation warnings in newer NumPy versions, with the following:

def cross2d(x, y):
    return x[..., 0] * y[..., 1] - x[..., 1] * y[..., 0]

@lgrcia

lgrcia commented May 31, 2026

Copy link
Copy Markdown
Owner

Sorry for the delay and thanks for this PR. In the ci.yml is FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 required and why?

@dgegen

dgegen commented May 31, 2026 •

Copy link
Copy Markdown
Collaborator Author

No worries!

It's intentional but not required. Node 20 is being deprecated on GitHub Actions runners, with Node 24 becoming the default on June 16th, 2026. FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true opts into Node 24 ahead of that date.

More info is given here: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/

lgrcia and others added 11 commits June 23, 2026 10:16
Remove Dockerfile and docker-compose.yml. Update ci.yml to use
astral-sh/setup-uv for matrix Python installs and uv sync/run for
tests. Update publish.yml to build and publish via uv, dropping
the Poetry and unnecessary strategy matrix.
Write the matrix astropy version to an override file and pass it to
uv sync --override so dependencies are solved once, avoiding a
redundant reinstall after the initial environment resolution.
np.cross no longer supports 2D vectors as of NumPy 2.0, raising a
DeprecationWarning (and eventually an error). Use a local cross2d
helper that computes the same scalar z-component directly.
@dgegen
dgegen changed the base branch from move-to-uv to main June 23, 2026 08:42
Node24 is now the default runner version
@dgegen

dgegen commented Jun 23, 2026 •

Copy link
Copy Markdown
Collaborator Author

I've cleaned up a few loose ends on this branch:

  • Removed the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 flag from .github/workflows/ci.yml. Node 24 became the default runner version as of June 16, 2026, so the flag is now obsolete.
  • Replaced np.cross with a local cross2d helper in twirl/quads.py, since NumPy 2.0 dropped support for 2D vector inputs to np.cross.
  • Rebased onto upstream/main and retargeted this PR's base branch accordingly.
  • All tests triggered by this PR's version of .github/workflows/ci.yml pass on my fork.

Note: wcs.ipynb and principle.ipynb were carried over from lgrcia's move-to-uv branch via the rebase. I haven't reviewed their content as they don't seem directly related to this PR's main theme.

@ppp-one

ppp-one commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Bump

@lgrcia
lgrcia merged commit cfa0a4c into lgrcia:main Jul 14, 2026
7 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.

4 participants