Conversation
9bb8d35 to
2929daa
Compare
81c9b12 to
e824a5b
Compare
restore CI as in main
…eepLabCut into arash_and_jaap/uv_packaging
There was a problem hiding this comment.
Pull request overview
This PR migrates DeepLabCut's packaging system from the traditional setup.py to a modern pyproject.toml-based configuration using uv as the package manager. The migration streamlines dependency management and follows current Python packaging best practices.
Changes:
- Migrated package configuration from
setup.pytopyproject.tomlwith support for multiple Python versions and platforms - Removed obsolete development tools and scripts that are no longer needed with the new packaging approach
- Updated documentation to reflect the new installation methods using both
uvandpip
Reviewed changes
Copilot reviewed 10 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Complete package configuration with dependencies, optional extras, and platform-specific requirements |
| setup.py | Simplified to a compatibility shim that delegates to pyproject.toml |
| README.md | Updated installation instructions for both PyPI and source installations |
| .pre-commit-config.yaml | Replaced black with ruff for code formatting |
| .github/workflows/python-package.yml | Updated CI to install package directly instead of using requirements.txt |
| tools/update_license_headers.py | Removed obsolete developer tool |
| tools/README.md | Removed documentation for obsolete developer tools |
| testscript_cli.py | Removed obsolete test script |
| reinstall.sh | Removed obsolete installation script |
| dlc.py | Removed obsolete CLI entry point file |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
f906c5d to
a1e370b
Compare
- Edit pyproject.toml - Keep setup.py for backward compatibility
5763d4b to
eb04efa
Compare
There was a problem hiding this comment.
NOTE This is definitely for a later PR. We are not using importlib.resources in the code but relying on os.realpath which is not really the best way to do this. Still, feel free to have a look
Lots of fairly low-level details that may be worth checking, if not in this PR at least in a subsequent one. Let me know what you think @deruyter92
Co-authored-by: Cyril Achard <cyril.achard@alumni.epfl.ch>
Co-authored-by: Cyril Achard <cyril.achard@alumni.epfl.ch>
Co-authored-by: Cyril Achard <cyril.achard@alumni.epfl.ch>
Co-authored-by: Cyril Achard <cyril.achard@alumni.epfl.ch>
|
@MMathisLab, I have removed all unrelated changes. Let me know what you think. NB, the package can be installed exactly as before, so I left the README unchanged for now. We can always decide to add uv installation instructions in a separate PR. |
Co-authored-by: Cyril Achard <cyril.achard@alumni.epfl.ch>
Update .pre-commit-config.yaml to add TOML support and pyproject checks: include the check-toml hook and add pyproject-fmt (rev v2.15.2) and validate-pyproject (rev v0.25) repositories. These hooks enforce formatting and validation for pyproject.toml files as part of pre-commit.
|
See deruyter92#1 for pyproject validation hooks |
Add automated pyproject.toml
Replacement PR for #3134 by @arashsm79
(cannot push changes to the original branch)
Summary
This PR performs an overhaul on how DLC is packaged.
uv is an extremely fast Python package and project manager that has seen incredible adoption from the Python community.
Here, the first steps are taken to package DLC with uv for different platforms and Python version.
The CI has also been updated accordingly to use uv.The CI will be updated accordingly in a separate PR
How to use this PR
Checkout this PR on a local copy of DLC.
Install uv
If you are not familiar with uv, you can take a look at their Getting Started page.
Run uv sync with the extra dependencies you may want (you can take a look at the ci.yml file in this PR for example usage of uv.
Like: uv sync --extra gui --python 3.11
uv run deeplabcut
(Solves issue #3111 and similar)