Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: migrate first OC Python projects to uv (SMR-2) #2984

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

tschaffter
Copy link
Member

@tschaffter tschaffter commented Jan 28, 2025

Contributes to https://sagebionetworks.jira.com/browse/SMR-2

Description

This PR migrates two OC Python project to the package manager uv.

The projects are:

  • openchallenges-data-lambda
  • openchallenges-etl-data

Changelog

  • Update the Nx plugin for Python and set uv as its preferred package manager.
  • Set Python version of openchallenges-data-lambda to 3.13.1.
  • Set Python version of openchallenges-edam-etl to 3.12.8.
  • Implement openchallenges-data-lambda:serve.
  • Update the Dockerfile of openchallenges-data-lambda to use uv.
  • Update the Dockerfile of openchallenges-edam-etl to use uv and multi-stage build.
  • Add .pdm-build to workspace-level .gitignore.
  • Remove more folders with workspace-nuke.

Notes

The Dockerfile of the lambda project was adapted from this example provided by uv.

How to test

  1. Checkout this feature branch.
  2. Remove .venv and other untracked folders from apps/openchallenges/data-lambda.
  3. Run nx prepare openchallenges-data-lambda from the workspace directory.
  4. Run the command listed in the apps/openchallenges/data-lambda/README.md to verify that the lambda function works properly.

@tschaffter tschaffter self-assigned this Jan 28, 2025
@tschaffter tschaffter changed the title chore: migrate from Pyenv, pipenv and Poetry to uv chore: migrate from Pyenv, pipenv and Poetry to uv (SMR-2) Jan 28, 2025
@tschaffter tschaffter changed the title chore: migrate from Pyenv, pipenv and Poetry to uv (SMR-2) chore: migrate first OC Python projects to uv (SMR-2) Jan 31, 2025
@tschaffter tschaffter marked this pull request as ready for review January 31, 2025 23:08
@tschaffter tschaffter requested a review from rrchai as a code owner January 31, 2025 23:08
@tschaffter tschaffter marked this pull request as draft January 31, 2025 23:20
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