Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ Use "GIVEN/WHEN/THEN/AND <DESCRIPTION>" comments to annotate setup, test and che
```

# Making a release
1. Update the "Unreleased" section in CHANGELOG.md
2. Based on the changes, run `poetry version major/minor/patch` to update the version in pyproject.toml based on the changes (breaking changes = major, features = minor, fixes = patch).
3. Update the "Unreleased" section in CHANGELOG.md to the new version with today's date.
4. Commit the changes in a new branch called "release/$(uv version --short)" with a message "Release X.Y.Z".
5. Push the branch to the remote repository.
1. Based on the changes in the "Unreleased" section of CHANGELOG.md, run `uv version --bump major/minor/patch` to update the version in pyproject.toml (breaking changes = major, features = minor, fixes = patch).
2. Update the "Unreleased" section in CHANGELOG.md to the new version with today's date.
3. Commit the changes in a new branch called "release/$(uv version --short)" with a message "Release X.Y.Z".
4. Push the branch to the remote repository.
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ Types of changes are:

## [Unreleased]

## [5.1.0] - 2025-09-13

### Features

- Detect `uv_build` as UV package manager.

### Fixes

- Change the build backend from `hatchling` to `uv_build`.

## [5.0.0] - 2025-09-13

### Breaking changes
Expand Down Expand Up @@ -531,7 +541,8 @@ Commands can raise `AssertionError` exceptions to tell `delfino` some pre-condit

- Initial copy of source codes.

[Unreleased]: https://github.com/radeklat/delfino/compare/5.0.0...HEAD
[Unreleased]: https://github.com/radeklat/delfino/compare/5.1.0...HEAD
[5.1.0]: https://github.com/radeklat/delfino/compare/5.0.0...5.1.0
[5.0.0]: https://github.com/radeklat/delfino/compare/4.0.0...5.0.0
[4.0.0]: https://github.com/radeklat/delfino/compare/3.1.2...4.0.0
[3.1.2]: https://github.com/radeklat/delfino/compare/3.1.1...3.1.2
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "delfino"
version = "5.0.0"
version = "5.1.0"
description = "A collection of command line helper scripts wrapping tools used during Python development."
authors = [
{name = "Radek Lát", email = "[email protected]"}
Expand Down Expand Up @@ -39,8 +39,8 @@ delfino = "delfino.main:main"
mike = "delfino.main:main"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
requires = ["uv_build>=0.8.17,<0.9.0"]
build-backend = "uv_build"

[dependency-groups]
dev = [
Expand Down
2 changes: 1 addition & 1 deletion src/delfino/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def get_package_manager(project_root: Path, pyproject_toml: PyprojectToml) -> Pa
requires = pyproject_toml.build_system.requires
if any("poetry" in req for req in requires):
return PackageManager.POETRY
if any("hatchling" in req for req in requires):
if any("hatchling" in req for req in requires) or any("uv_build" in req for req in requires):
return PackageManager.UV

if (project_root / "Pipfile").exists() or (project_root / "Pipfile.lock").exists():
Expand Down
11 changes: 3 additions & 8 deletions tests/integration/test_entry_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@
class TestEntrypointConstant:
@staticmethod
def test_should_match_entrypoint_in_pyproject_toml():
file_path = PROJECT_ROOT / PYPROJECT_TOML_FILENAME
pyproject_toml = PyprojectToml(**toml.load(file_path))
pyproject_toml = PyprojectToml(**toml.load(PROJECT_ROOT / PYPROJECT_TOML_FILENAME))

# Check that we have either Poetry or uv format
assert pyproject_toml.tool.poetry is not None or pyproject_toml.tool.uv is not None

# Check that the entry point exists in scripts
scripts = pyproject_toml.project_scripts
assert ENTRY_POINT in scripts
assert pyproject_toml.project
assert ENTRY_POINT in pyproject_toml.project.scripts
6 changes: 4 additions & 2 deletions tests/unit/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ class TestGetPackageManager:
pytest.param(["poetry-core>=1.0.0"], PackageManager.POETRY, id="Poetry with version constraint"),
pytest.param(["poetry-core>=1.0.0,<2.0"], PackageManager.POETRY, id="Poetry with version range"),
pytest.param(["poetry-core"], PackageManager.POETRY, id="Poetry without version"),
pytest.param(["hatchling"], PackageManager.UV, id="UV"),
pytest.param(["hatchling"], PackageManager.UV, id="UV, hatchling"),
pytest.param(["uv_build"], PackageManager.UV, id="UV, uv_build"),
],
)
def test_should_identify_package_manager_from_build_system(self, tmp_path, build_system_requires, expected_manager):
Expand All @@ -22,7 +23,8 @@ def test_should_identify_package_manager_from_build_system(self, tmp_path, build
@pytest.mark.parametrize(
"file_name,expected_manager",
[
pytest.param("poetry.lock", PackageManager.POETRY, id="poetry_lock_file"),
pytest.param("poetry.lock", PackageManager.POETRY, id="poetry lock file"),
pytest.param("uv.lock", PackageManager.UV, id="uv lock file"),
pytest.param("Pipfile", PackageManager.PIPENV, id="pipfile"),
],
)
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.