Skip to content

TIMX 600 - Migrate to uv and other 2026-03 devops conventions#184

Open
ghukill wants to merge 1 commit intomainfrom
TIMX-600-uv-and-updated-devops
Open

TIMX 600 - Migrate to uv and other 2026-03 devops conventions#184
ghukill wants to merge 1 commit intomainfrom
TIMX-600-uv-and-updated-devops

Conversation

@ghukill
Copy link
Contributor

@ghukill ghukill commented Mar 6, 2026

Purpose and background context

This PR updates the TDA library to use uv instead of pipenv.

Additionally, it applies python project conventions as outlined in this document: https://mitlibraries.atlassian.net/wiki/spaces/IN/pages/5205491713/2026-03-05+-+Python+Projects+DevOps+Updates.

Major Updates

  • Use uv instead of pipenv
  • Use importlib.metadata for dynamic __version__ instead of hardcoded string
  • Bump project version to v4.0.0

One of the significant changes is how versioning is handled.

Previously, it was defined in timdex_dataset_api.__init__ and dynamically loaded during setuptools usage. Now, it's defined in the pyproject.toml file and dynamically retrieved in code.

How can a reviewer manually see the effects of these changes?

Running of make test and make lint is sufficient for confirming that the library works as before.

I did perform a make update for a local instance of Transmogrifier, pointing to this branch, and confirmed that the v4.0 version is picked up and used.

Includes new or updated dependencies?

YES

Changes expectations for external applications?

YES

  • Pre-commit hooks now fire on push instead of commit
  • Linting hooks no longer auto-fix code; run make lint-fix manually

What are the relevant tickets?

Code review

  • Code review best practices are documented here and you are encouraged to have a constructive dialogue with your reviewers about their preferences and expectations.

Why these changes are being introduced:

This repository required an updated from pipenv to uv and/or a handful of python project
updated conventions.

How this addresses that need:
* Migrate dependencies from Pipfile/Pipfile.lock to pyproject.toml with uv
* Delete Pipfile and Pipfile.lock
* Remove black, replace with ruff format
* Update Makefile: pipenv run to uv run, consolidated lint/lint-fix/security targets, pre-push hooks
* Replace .pre-commit-config.yaml: default_stages pre-push, ruff-format with --diff, ruff-check without --fix, mypy with broader exclude
* Update CI workflow: on push to on pull_request with paths-ignore, add permissions read-all, use python-uv-shared-* workflows
* Update README: pipenv references replaced with uv
* Use importlib.metadata for dynamic __version__ instead of hardcoded string
* Bump project version to 4.0.0

Side effects of this change:
* Pre-commit hooks now fire on push instead of commit
* Linting hooks no longer auto-fix code; run make lint-fix manually

Relevant ticket(s):
* https://mitlibraries.atlassian.net/browse/TIMX-600
@ghukill ghukill marked this pull request as ready for review March 6, 2026 21:28
@ghukill ghukill requested a review from a team as a code owner March 6, 2026 21:28
@ehanson8 ehanson8 self-assigned this Mar 9, 2026
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.

2 participants