Skip to content

Migrate to uv and pyproject.toml, drop u8darts#2993

Merged
dennisbader merged 44 commits intounit8co:masterfrom
authierj:uv
Feb 6, 2026
Merged

Migrate to uv and pyproject.toml, drop u8darts#2993
dennisbader merged 44 commits intounit8co:masterfrom
authierj:uv

Conversation

@authierj
Copy link
Contributor

@authierj authierj commented Jan 22, 2026

Checklist before merging this PR:

  • Mentioned all issues that this PR fixes or addresses.
  • Summarized the updates of this PR under Summary.
  • Added an entry under Unreleased in the Changelog.

Fixes #2990

Summary

Migrates Darts from pip to uv, a modern, fast Python package manager. Consolidates all dependency management into pyproject.toml, deprecates the u8darts package, and modernizes CI/CD infrastructure.

⚠️ Breaking Change

The u8darts package is deprecated and will no longer be maintained. Users should migrate to darts with optional extras.

Migration Guide

Before (u8darts) After (darts)
pip install u8darts pip install darts
pip install u8darts[torch] pip install "darts[torch]"
pip install u8darts[all] pip install "darts[all]"

Key Changes

1. Dependency Management

  • Removed requirements/* folder - all dependencies now managed in pyproject.toml
  • Updated all GitHub Actions workflows to use uv commands
  • Configured setup-uv@v7 action with automatic caching in CI

2. Package Simplification

  • The darts package now uses a modular installation system with optional extras:
    • pip install darts - Core only (minimal dependencies)
    • pip install "darts[torch]" - Core + PyTorch models
    • pip install "darts[notorch]" - Core + Prophet, LightGBM, CatBoost, XGBoost, StatsForecast
    • pip install "darts[all]" - All available models

3. Build System Modernization

  • Removed setup.py, setup_u8darts.py, MANIFEST.in - consolidated to PEP 621 compliant pyproject.toml
  • Removed .bumpversion.cfg - migrated configuration to [tool.bumpversion] in pyproject.toml
  • Updated make_dists.sh to use uv build
  • Fixed license format to use SPDX identifier (Apache-2.0)

4. CI/CD Improvements

  • Removed redundant .github/workflows/update-cache.yml (cache now managed automatically by setup-uv)
  • Added uv cache prune --ci to all workflow jobs for optimal cache management (ref)
  • Updated all workflows: develop.yml, merge.yml, release.yml, doc.yml
  • Modernized version bumping workflow:
    • Replaced unmaintained bump2version with bump-my-version>=1.2.5
    • Replaced third-party GitHub Actions with official maintained action (callowayproject/bump-my-version@v0.27.0)
    • Added user-friendly dropdown menu for version selection (patch/minor/major)

5. Docker & Conda Updates

  • Rewrote Dockerfile to use uv instead of pip
    • Now uses official ghcr.io/astral-sh/uv:0.9.26 image
    • Uses uv sync --group dev-all --frozen for reproducible builds
  • Updated conda_recipe/darts/meta.yaml to read from pyproject.toml using modern load_file_data()

6. Documentation Updates

  • Updated INSTALL.md with new modular installation instructions
  • Updated CLAUDE.md with uv development workflow
  • Updated CONTRIBUTING.md with uv commands

Testing

  • Tested local installation with uv sync
  • Verified CI passes on all workflows
  • Tested Docker build
  • Tested conda recipe

@authierj authierj requested a review from dennisbader as a code owner January 22, 2026 09:16
@codecov
Copy link

codecov bot commented Jan 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.58%. Comparing base (6fa51fa) to head (4d89685).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2993      +/-   ##
==========================================
- Coverage   95.64%   95.58%   -0.07%     
==========================================
  Files         156      156              
  Lines       16946    16946              
==========================================
- Hits        16208    16197      -11     
- Misses        738      749      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@authierj authierj marked this pull request as draft January 22, 2026 17:06
Copy link
Collaborator

@brunnedu brunnedu left a comment

Choose a reason for hiding this comment

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

Overall looks really good and it's great to see you pushing to update our environment management! I tested as much as I could on my side (installation of different flavors, building the package, running tests, building docs, conda build, docker build etc.) and it mostly worked flawlessly. Left some minor suggestions throughout. Thanks for the great work on this migration! 🚀

@authierj authierj changed the title Uv test github action Migrate to uv and pyproject.toml, drop u8darts Jan 29, 2026
authierj and others added 2 commits January 29, 2026 15:25
Co-authored-by: Dustin Brunner <92083143+brunnedu@users.noreply.github.com>
Co-authored-by: Dustin Brunner <92083143+brunnedu@users.noreply.github.com>
@authierj authierj marked this pull request as ready for review January 29, 2026 14:27
authierj and others added 7 commits January 29, 2026 15:47
Add python-version parameter to setup-uv actions and update UV to 0.9.
Fixes onnxruntime installation failures caused by UV using Python 3.14.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link
Collaborator

@dennisbader dennisbader left a comment

Choose a reason for hiding this comment

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

Thanks a lot @authierj, this is a great PR and will make the package management much easier and faster in the future 🚀

I added a couple of suggestions.

authierj and others added 8 commits February 2, 2026 17:33
Co-authored-by: Dustin Brunner <92083143+brunnedu@users.noreply.github.com>
Co-authored-by: Dennis Bader <dennis.bader@gmx.ch>
Co-authored-by: Dennis Bader <dennis.bader@gmx.ch>
Co-authored-by: Dennis Bader <dennis.bader@gmx.ch>
@authierj authierj requested a review from dennisbader February 5, 2026 09:29
Copy link
Collaborator

@dennisbader dennisbader left a comment

Choose a reason for hiding this comment

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

Thanks a lot @authierj, it looks great now 🚀

This is a really nice PR and I'm already in love with the new uv capabilities and package management 😍

I pushed some minor changes. Ready to be merged now! 💯

@dennisbader dennisbader merged commit 6c9a917 into unit8co:master Feb 6, 2026
9 checks passed
@daidahao
Copy link
Contributor

daidahao commented Feb 6, 2026

@authierj @brunnedu @dennisbader

Great efforts! Thank you making development onboarding a lot easier.

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.

Adopting uv for faster dependency management

4 participants