SDAP-543: Migrate to uv for environment and dependency management#119
Open
MarcCruzs wants to merge 7 commits into
Open
SDAP-543: Migrate to uv for environment and dependency management#119MarcCruzs wants to merge 7 commits into
MarcCruzs wants to merge 7 commits into
Conversation
…perator, and granule ingester components
….2.3 as granule_ingester uses 8.2.3.
…ect.toml. dependencies are kept in uv.lock
- Add .dockerignore; add .gitattributes (eol=lf) — CRLF broke the
granule install_python shebang on Linux.
- config_operator: kopf 0.26->1.42.5 + HandlerFatalError->PermanentError,
bump kubernetes, install git for GitPython (3.11 compat).
- granule_ingester: point UV_PYTHON at the venv so nexusproto installs
there; override protobuf 3.2.0->3.20.3 for 3.11.
- Re-lock uv.lock.
uv.lock, collection_manager, common, config_operator, and granule_ingester components. Then updated README to reflect the uv implementations.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Caveat: Built and tested locally only. Two surfaces remain unverified:
config_operatorDocker image build (onlycollection_managerandgranule_ingesterimages were built and tested locally)Summary
Migrates the ingester repo from its mixed legacy packaging (setuptools +
requirements.txtforcollection_manager/config_operator/common, and Poetry forgranule_ingester) to a single uv workspace with one shared lockfile. All component Docker images are rebuilt on uv.Supersedes the packaging approach from SDAP-511 (Poetry) and builds on SDAP-542 (Python 3.11).
What changed
Packaging & dependencies
pyproject.tomldefining a[tool.uv.workspace]with four members:common,collection_manager,config_operator,granule_ingester.pyproject.tomlfor each membersetup.py/requirements.txtfiles andgranule_ingester/poetry.lock.uv.lockat the repo root is now the source of truth for all resolved dependencies (replaces the per-component requirement files and the Poetry lock). Chose this route to reduce the maintenance needed to maintain dependencies..python-versionandrequires-python = ">=3.11,<3.12"across all components.Docker
collection_manager,config_operator,granule_ingester) rebuilt on uv using a two-phaseuv sync(deps first for layer caching, then workspace packages). All are built from the repo root so uv can resolve the workspace./app/.venv.Package names (aligned with the previous published names)
commonis published assdap_ingester_commonandcollection_managerassdap_collection_manager, matching thePACKAGE_NAMEvalues from the priorsetup.pyfiles.config_operatorandgranule_ingesterkeep their names. Import module names are unchanged(
import common,import collection_manager).config_operator
main.pyupdated for kopf 1.x on Python 3.11 (HandlerFatalError→PermanentError)>=1.36,<2.Documentation & housekeeping
uv sync --package …,uv run --package …, repo-rootdocker build)..gitattributesand a root.dockerignore.[Unreleased].Verification
uv lock --checkpasses (75 packages, no drift).sdap-ingester-commoninstallsimport commonworksmain.py -hruns.sdap-ingester-common,nexusprotoinstall,import common,import nexusproto, andmain.py -hall succeed.Notes
config_operator'sRepositoryURL is carried over verbatim from the prior repo metadata..github/workflows/are intentionally left unchanged in this PR.uvx migrate-to-uv(https://github.com/osprey-oss/migrate-to-uv)