Skip to content

Comments

Switched to uv#32

Open
clstaudt wants to merge 1 commit intomainfrom
hello-uv
Open

Switched to uv#32
clstaudt wants to merge 1 commit intomainfrom
hello-uv

Conversation

@clstaudt
Copy link
Collaborator

After all the pain and suffering with pip, conda, poetry and so on, I just love switching projects to uv. One project after another.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.toml format to PEP 621 standard format with explicit version ranges
  • Updated minimum Python version from 3.9 to 3.11
  • Replaced library/setup.py with a modern library/pyproject.toml configuration
  • 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.

Comment on lines +1 to +7
[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"
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

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"

Copilot uses AI. Check for mistakes.
"tweepy>=4.12.1,<5",
"networkx>=2.8.8,<4",
"sktime>=0.14.0,<1",
"tensorflow>2",
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
"tensorflow>2",
"tensorflow>=2.13.0,<3",

Copilot uses AI. Check for mistakes.
build-backend = "hatchling.build"

[tool.hatch.build.targets.wheel]
packages = []
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
packages = []
packages = ["data_science_learning_paths"]

Copilot uses AI. Check for mistakes.
{ include = "data_science_learning_paths", from = "library" },
readme = "README.md"
license = "CC-BY-NC-SA-4.0"
requires-python = ">=3.11,<3.14"
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
requires-python = ">=3.11,<3.14"
requires-python = ">=3.9,<3.14"

Copilot uses AI. Check for mistakes.
"jupyter>=1.0.0,<2",
"jupyterlab>=3.5.0,<5",
"jupyterthemes>=0.20.0,<1",
"LunarCalendar>=0.0.9,<1",
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
"LunarCalendar>=0.0.9,<1",
"LunarCalendar>=0.0.9,<0.0.10",

Copilot uses AI. Check for mistakes.
name = "data-science-learning-paths-library"
version = "0.2.0"
description = "Helper library for Data Science Learning Paths"
requires-python = ">=3.11"
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
requires-python = ">=3.11"
requires-python = ">=3.11,<3.14"

Copilot uses AI. Check for mistakes.
@@ -1 +1 @@
3.9.12
3.11
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
3.11
3.11.0

Copilot uses AI. Check for mistakes.
license = "CC-BY-NC-SA-4.0"
requires-python = ">=3.11,<3.14"
dependencies = [
"bs4>=0.0.1,<1",
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
"bs4>=0.0.1,<1",
"bs4>=0.0.1,<0.0.2",

Copilot uses AI. Check for mistakes.
Comment on lines +39 to 43
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"
```
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
@ccauet
Copy link
Member

ccauet commented Feb 18, 2026

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.

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.

3 participants