Skip to content

Switch to uv projects #42

@stefanofusai

Description

@stefanofusai

.pre-commit-config.yaml

  • Replace skip: - pip-compile with skip: - uv-lock
  • Remove file-contents-sorter on requirements.in
  • Replace pip-compile hook with uv-lock
  • Bump uv to 0.5.6

README.md

  • Add introduction section:
This package uses [uv](https://docs.astral.sh/uv/) for project management. To get started, ensure that **uv** is installed on your machine and updated to the `0.5.6` version. Detailed installation instructions for **uv** can be found [here](https://docs.astral.sh/uv/getting-started/installation/).
  • Add relevant sections:
## Installation

\```bash
uv add <package>
\```

## Development

\```bash
uv sync
uv run pre-commit install --install-hooks
uv run pre-commit install --hook-type=commit-msg
\```

pyproject.toml

  • Add project entry at the top with the following keys: name, version, description, readme = "README.md", authors, maintainers, requires-python>=3.12
[project]
name = "..."
version = "..."
description = "..."
readme = "README.md"
authors = [
    { name = "Stefano Fusai", email = "[email protected]" }
]
maintainers = [
    { name = "Stefano Fusai", email = "[email protected]" }
]
requires-python = ">=3.12"
  • Move build-system section after project.urls. Change it to:
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
  • Bump minor version (x.1.y -> x.2.0)
  • Run uv add --requirements=requirements.in
  • Make sure that `project.dependencies' dependencies are alphabetically sorted
  • Manually pin project.dependencies versions (replace >= with ==)

misc

  • Delete requirements.in / requirements.txt files
  • Bump ruff to 0.8.2

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions