Skip to content

Conversation

@conbrad
Copy link
Collaborator

@conbrad conbrad commented Nov 24, 2025

This PR migrates the backend Python project from Poetry to UV and restructures the codebase into a monorepo with separate packages. Uses a single virtual env, backend/.venv/. Setup to install and run has been updated and instructions found in backend/packages/wps-api/README.md.

Package Management

  • Migrated from Poetry to UV for faster dependency resolution and installation
  • Created workspace configuration with 4 Python packages: wps-api, wps-shared, wps-jobs, wps-tools
  • In a follow up PR I'll move the sfms package (code for SFMS windows box).

Code Restructure

CI/CD Updates

  • Updated all GitHub Actions workflows to use UV instead of Poetry
  • Added test-wps-jobs job to integration and post-merge workflows
  • Updated all Docker builds to use UV
  • Updated OpenShift deployment templates

Changes

  • Adjusted test tolerances (this seems to flip/flop a lot so I increase the tolerance):
    • uv vs poetry dependency resolution leading to slightly different package versions
  • Adjusted README documentation to account for setup, including brew install uv for mac.sh.
  • Local Dockerfile for local dev uses simpler app startup command

Testing

  • All existing tests pass with the new structure
  • Coverage reporting now works for all packages separately
  • CI pipeline validates all packages independently
  • Manually kicked off ecmwf job with oc create job -n e1e498-dev "ecmwf-1" --from=cronjob/ecmwf-wps-pr-4912 to verify herbie works, let other jobs run overnight.
  • Manually kicked off SFMS nats consumer processing with tif_pusher script (in new package with uv run --package wps-tools python -m wps_tools.tif_pusher 2025-06-24 2025-06-25) to verify SFMS tifs are processed

Closes #4903

Test Links:

Landing Page
MoreCast
Percentile Calculator
C-Haines
FireCalc
FireCalc bookmark
Auto Spatial Advisory (ASA)
HFI Calculator
SFMS Insights
Fire Watch

@conbrad conbrad requested review from brettedw and dgboss November 25, 2025 22:34
@conbrad conbrad requested a review from dgboss November 27, 2025 18:25
Copy link
Collaborator

@dgboss dgboss left a comment

Choose a reason for hiding this comment

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

Thanks for taking this on. It looks great!

@sonarqubecloud
Copy link

members = ["packages/*"]

[dependency-groups]
dev = []
Copy link
Collaborator

@brettedw brettedw Nov 28, 2025

Choose a reason for hiding this comment

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

Could shared dependencies like pytest, ruff, coverage, etc be installed here in a central location?

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.

Dev: Migrate from poetry to uv

4 participants