Conversation
There was a problem hiding this comment.
Pull request overview
This pull request migrates the project's dependency management from Poetry to uv, a modern and fast Python package manager. The migration includes converting the Poetry-specific configuration to the standard PEP 621 pyproject.toml format, updating development documentation, and bumping the minimum Python version from 3.9 to 3.11.
Changes:
- Migrated from Poetry to uv for dependency management with hatchling as the build backend
- Converted Poetry's
pyproject.tomlformat to PEP 621 standard format with explicit version ranges - Updated minimum Python version from 3.9 to 3.11
- Replaced
library/setup.pywith a modernlibrary/pyproject.tomlconfiguration - Updated README.md with uv-specific installation and usage instructions
- Removed legacy files:
requirements.txt,poetry.lock
Reviewed changes
Copilot reviewed 5 out of 8 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Converted from Poetry format to PEP 621 standard, using hatchling build backend and explicit dependency version ranges |
| library/pyproject.toml | New PEP 621 compliant configuration for the helper library package |
| library/setup.py | Removed deprecated distutils-based setup in favor of modern pyproject.toml |
| requirements.txt | Removed legacy requirements file, now managed through pyproject.toml |
| poetry.lock | Removed Poetry lock file, replaced by uv.lock |
| README.md | Updated development setup instructions to use uv commands |
| .python-version | Updated from 3.9.12 to 3.11 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| [project] | ||
| name = "data-science-learning-paths" | ||
| version = "0.2.0" | ||
| description = "Basic and advanced data science course material" | ||
| repository = "https://github.com/point8/data-science-learning-paths" | ||
| authors = [] | ||
| license = "Attribution-NonCommercial-ShareAlike 4.0 International" | ||
|
|
||
| packages = [ | ||
| { include = "data_science_learning_paths", from = "library" }, | ||
| readme = "README.md" | ||
| license = "CC-BY-NC-SA-4.0" | ||
| requires-python = ">=3.11,<3.14" |
There was a problem hiding this comment.
The old Poetry configuration included a repository field pointing to "https://github.com/point8/data-science-learning-paths", but this has been removed in the migration. Consider adding this as the urls field in the new format for better project discoverability:
[project.urls]
repository = "https://github.com/point8/data-science-learning-paths"| "tweepy>=4.12.1,<5", | ||
| "networkx>=2.8.8,<4", | ||
| "sktime>=0.14.0,<1", | ||
| "tensorflow>2", |
There was a problem hiding this comment.
The tensorflow dependency has an unusual version specifier >2 without an upper bound, while all other dependencies have explicit upper bounds. This could lead to unexpected breaking changes in the future. Consider adding an upper bound for consistency, such as tensorflow>=2.10.0,<3 to match the pattern used by other dependencies.
| "tensorflow>2", | |
| "tensorflow>=2.13.0,<3", |
| build-backend = "hatchling.build" | ||
|
|
||
| [tool.hatch.build.targets.wheel] | ||
| packages = [] |
There was a problem hiding this comment.
The [tool.hatch.build.targets.wheel] has packages = [], which means no packages will be built from the root project. This appears intentional since this is a course material project rather than a distributable package. However, if the project needs to be installed as a package, this should be updated to include the appropriate package directories.
| packages = [] | |
| packages = ["data_science_learning_paths"] |
| { include = "data_science_learning_paths", from = "library" }, | ||
| readme = "README.md" | ||
| license = "CC-BY-NC-SA-4.0" | ||
| requires-python = ">=3.11,<3.14" |
There was a problem hiding this comment.
The minimum Python version has been increased from 3.9 to 3.11. This is a breaking change that should be clearly documented in the PR description or changelog. Ensure that all users are aware of this requirement change and that any CI/CD systems or deployment environments are updated accordingly.
| requires-python = ">=3.11,<3.14" | |
| requires-python = ">=3.9,<3.14" |
| "jupyter>=1.0.0,<2", | ||
| "jupyterlab>=3.5.0,<5", | ||
| "jupyterthemes>=0.20.0,<1", | ||
| "LunarCalendar>=0.0.9,<1", |
There was a problem hiding this comment.
The version constraint for LunarCalendar has been incorrectly converted from Poetry's caret syntax. Poetry's ^0.0.9 means >=0.0.9,<0.0.10 (only patch version updates allowed for 0.0.x packages), but it's been converted to >=0.0.9,<1, which allows any minor version up to 1.0.0. This could introduce breaking changes. The correct conversion should be >=0.0.9,<0.1 or more conservatively >=0.0.9,<0.0.10 to match Poetry's original intent.
| "LunarCalendar>=0.0.9,<1", | |
| "LunarCalendar>=0.0.9,<0.0.10", |
| name = "data-science-learning-paths-library" | ||
| version = "0.2.0" | ||
| description = "Helper library for Data Science Learning Paths" | ||
| requires-python = ">=3.11" |
There was a problem hiding this comment.
The Python version requirement in the main pyproject.toml is >=3.11,<3.14, but the library's pyproject.toml only specifies >=3.11 without an upper bound. These should be consistent to avoid potential compatibility issues. Consider updating the library's requires-python to match the main project: >=3.11,<3.14.
| requires-python = ">=3.11" | |
| requires-python = ">=3.11,<3.14" |
| @@ -1 +1 @@ | |||
| 3.9.12 | |||
| 3.11 | |||
There was a problem hiding this comment.
The Python version has been updated from 3.9.12 to 3.11. Consider specifying a more precise version (e.g., 3.11.0 or a specific patch version) to ensure consistency across development environments, especially if you're using features or fixes from a particular Python 3.11 release.
| 3.11 | |
| 3.11.0 |
| license = "CC-BY-NC-SA-4.0" | ||
| requires-python = ">=3.11,<3.14" | ||
| dependencies = [ | ||
| "bs4>=0.0.1,<1", |
There was a problem hiding this comment.
The version constraint for bs4 has been incorrectly converted from Poetry's caret syntax. Poetry's ^0.0.1 means >=0.0.1,<0.0.2 (only patch version updates allowed for 0.0.x packages), but it's been converted to >=0.0.1,<1, which allows any minor version up to 1.0.0. This could introduce breaking changes. The correct conversion should be >=0.0.1,<0.1 or more conservatively >=0.0.1,<0.0.2 to match Poetry's original intent.
| "bs4>=0.0.1,<1", | |
| "bs4>=0.0.1,<0.0.2", |
| To make the environment available as a Jupyter kernel, run: | ||
|
|
||
| ``` | ||
| poetry run jupyter-lab | ||
| uv run python -m ipykernel install --user --name data-science-learning-paths --display-name "Data Science Learning Paths" | ||
| ``` |
There was a problem hiding this comment.
The ipykernel package is not explicitly listed in the project dependencies, but the README instructs users to run uv run python -m ipykernel install. While ipykernel is likely installed as a transitive dependency of jupyter or jupyterlab, it would be more explicit and clear to add it as a direct dependency to ensure it's available and to make the dependency on this feature explicit.
|
Before approving this, I need to check my deployment scripts and how much they still depend on the poetry setup. I will try to do this next week and then get back. |
After all the pain and suffering with pip, conda, poetry and so on, I just love switching projects to uv. One project after another.