-
Notifications
You must be signed in to change notification settings - Fork 980
Migrate to uv and pyproject.toml, drop u8darts
#2993
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2993 +/- ##
==========================================
- Coverage 95.69% 95.63% -0.07%
==========================================
Files 154 154
Lines 16604 16623 +19
==========================================
+ Hits 15890 15898 +8
- Misses 714 725 +11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
brunnedu
left a comment
There was a problem hiding this 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! 🚀
pyproject.toml
Outdated
| zip-safe = false | ||
|
|
||
| [tool.setuptools.packages.find] | ||
| exclude = ["examples*", "static*", "datasets*", "darts_logs*", "conda_recipe*", "from_df_times*"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of these exclusions are probably not required (e.g. from_df_times*) while tests* should probably be excluded. Long-term, would it make sense to move from a darts/darts/ to a darts/src/darts layout? It’s the modern 'gold standard' because it implicitly handles these exclusions and ensures we only ship what's in the source folder. What do you think @dennisbader?
| 6. Create a new branch: | ||
| 4. Install [uv](https://docs.astral.sh/uv/getting-started/installation/) if you haven't already: `curl -LsSf https://astral.sh/uv/install.sh | sh` | ||
| 5. Install all development dependencies: `uv sync --group dev-all` | ||
| 6. Set up [automatic code formatting and linting](#code-formatting-and-linting) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it's a bit unrelated but would it make sense to include the uv run pre-commit install command right here without having to follow the link and potentially missing it? @dennisbader
| 6. Set up [automatic code formatting and linting](#code-formatting-and-linting) | |
| 6. Set up [automatic code formatting and linting](#code-formatting-and-linting): `uv run pre-commit install` |
uv and pyproject.toml, drop u8darts
Co-authored-by: Dustin Brunner <92083143+brunnedu@users.noreply.github.com>
Co-authored-by: Dustin Brunner <92083143+brunnedu@users.noreply.github.com>
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>
Checklist before merging this PR:
Fixes #2990
Summary
Migrates Darts from pip to uv, a modern, fast Python package manager. Consolidates all dependency management into
pyproject.toml, deprecates theu8dartspackage, and modernizes CI/CD infrastructure.The
u8dartspackage is deprecated and will no longer be maintained. Users should migrate todartswith optional extras.Migration Guide
pip install u8dartspip install dartspip install u8darts[torch]pip install "darts[torch]"pip install u8darts[all]pip install "darts[all]"Key Changes
1. Dependency Management
requirements/*folder - all dependencies now managed inpyproject.tomlsetup-uv@v7action with automatic caching in CI2. Package Simplification
dartspackage now uses a modular installation system with optional extras:pip install darts- Core only (minimal dependencies)pip install "darts[torch]"- Core + PyTorch modelspip install "darts[notorch]"- Core + Prophet, LightGBM, CatBoost, XGBoost, StatsForecastpip install "darts[all]"- All available models3. Build System Modernization
setup.py,setup_u8darts.py,MANIFEST.in- consolidated to PEP 621 compliantpyproject.toml.bumpversion.cfg- migrated configuration to[tool.bumpversion]inpyproject.tomlmake_dists.shto useuv buildApache-2.0)4. CI/CD Improvements
.github/workflows/update-cache.yml(cache now managed automatically bysetup-uv)uv cache prune --cito all workflow jobs for optimal cache management (ref)develop.yml,merge.yml,release.yml,doc.ymlbump2versionwithbump-my-version>=1.2.5callowayproject/bump-my-version@v0.27.0)5. Docker & Conda Updates
Dockerfileto use uv instead of pipghcr.io/astral-sh/uv:0.9.26imageuv sync --group dev-all --frozenfor reproducible buildsconda_recipe/darts/meta.yamlto read frompyproject.tomlusing modernload_file_data()6. Documentation Updates
INSTALL.mdwith new modular installation instructionsCLAUDE.mdwith uv development workflowCONTRIBUTING.mdwith uv commandsTesting
uv sync