opensafely-core / opensafely-core/opencodelists

Use `uv run` in local development and Docker

Open
#3,088 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

deck-scrubbing dx
Dominant language
Python
Stars
60
Forks
16
Avg merge
4d 12h
Merged PRs (30d)
17

Description

Why are we doing this?

Whilst switching dependency management tooling over to uv, a some potential updates to justfile recipes were noted in a (PR review comment). These would be nice improvements to simplify the recipes we have and be more consistent across projects.

How will we know when it's done?

  • Local developer commands (e.g. tests, linting, formatting) are run via uv run.
  • Production and CI commands use uv run.
  • we've removed $BIN and $VIRTUAL_ENV from the justfile.

What are we doing?

Justfile updates:

  • diff with the latest repo template justfile and include any improvements from there
  • use uv run … instead of $BIN/python …,
  • Investigate whether VIRTUAL_ENV and $BIN can be removed from recipes/configuration; remove it if possible.
  • Investigate alternatives to hard-coding the python version in the bump-cut-off recipe (see discussion here)
  • Review the justfile for any further improvements or simplifications related to the move to uv

Dockerfile updates:

  • diff with the latest repo template Dockerfile and include any improvements from there
  • Update Dockerfile to run commands via uv run
  • Verify local, CI, and production workflows continue to behave as expected

Defining delivery tasks guidance

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by diffing the Justfile and Dockerfile against the linked repo-template versions, then review the existing recipes, especially bump-cut-off. Update the local, CI, and production command paths to use uv run where appropriate, investigate removing $BIN and VIRTUAL_ENV, and verify the workflows continue to behave as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
build-system, ci-cd, devops
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.