From 6996e7f4cd7cab01a6a4b42b45e81ea6c016cb9e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 16 Mar 2026 14:01:00 +0000 Subject: [PATCH 1/5] Initial plan From 5f4fc5141d86976de793191da1e02f656de1cbc1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 16 Mar 2026 14:05:24 +0000 Subject: [PATCH 2/5] chore: migrate from Poetry to uv Co-authored-by: dannywillems <6018454+dannywillems@users.noreply.github.com> --- .github/dependabot.yml | 2 +- .github/workflows/action.yml | 24 +++++++---------- .gitignore | 2 +- Makefile | 30 ++++++++++----------- pyproject.toml | 52 +++++++++++++++++++----------------- 5 files changed, 54 insertions(+), 56 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 551c1f2..40f5e5a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -3,7 +3,7 @@ version: 2 updates: - # Monitor pip dependencies (Poetry uses pip under the hood) + # Monitor pip dependencies (uv uses pip under the hood) - package-ecosystem: "pip" directory: "/" schedule: diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 8b399b3..3110b2a 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -7,30 +7,26 @@ jobs: fail-fast: false matrix: python-version: ["3.11", "3.12", "3.13"] - poetry-version: ["2.3.1"] os: ["ubuntu-latest", "macos-latest", "windows-latest"] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v6 - - uses: actions/setup-python@v6 + - name: Install uv + uses: astral-sh/setup-uv@v6 with: python-version: ${{ matrix.python-version }} - - name: Install poetry - run: pip install poetry==${{ matrix.poetry-version }} - - name: View poetry --help - run: poetry --help - - name: Run poetry install - run: poetry install + - name: Install dependencies + run: uv sync - name: lint - run: poetry run ruff check . + run: uv run ruff check . - name: format check - run: poetry run black --check . + run: uv run black --check . - name: sort-check - run: poetry run isort --check-only . + run: uv run isort --check-only . - name: typecheck - run: poetry run mypy l9format + run: uv run mypy l9format - name: test - run: poetry run pytest + run: uv run pytest - name: security-audit - run: poetry run pip-audit + run: uv run pip-audit diff --git a/.gitignore b/.gitignore index eb2ac10..d6fce37 100644 --- a/.gitignore +++ b/.gitignore @@ -129,4 +129,4 @@ dmypy.json .pyre/ .idea -poetry.lock \ No newline at end of file +uv.lock \ No newline at end of file diff --git a/Makefile b/Makefile index 9206603..67263c1 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # Makefile for l9format-python project -VERSION := $(shell poetry version -s) +VERSION := $(shell python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])") UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Darwin) @@ -24,31 +24,31 @@ all: format sort lint typecheck test security-check ## Run all quality checks .PHONY: test test: ## Run tests using pytest - poetry run pytest + uv run pytest .PHONY: format format: ## Format code using black - poetry run black . + uv run black . .PHONY: check-format check-format: ## Check code formatting with black - poetry run black --check . + uv run black --check . .PHONY: sort sort: ## Sort imports using isort - poetry run isort . + uv run isort . .PHONY: check-sort check-sort: ## Check import sorting with isort - poetry run isort --check-only . + uv run isort --check-only . .PHONY: lint lint: ## Lint code using ruff - poetry run ruff check . + uv run ruff check . .PHONY: lint-fix lint-fix: ## Lint and fix code using ruff - poetry run ruff check --fix . + uv run ruff check --fix . .PHONY: lint-shell lint-shell: ## Lint shell scripts using shellcheck @@ -56,11 +56,11 @@ lint-shell: ## Lint shell scripts using shellcheck .PHONY: typecheck typecheck: ## Run mypy type checker - poetry run mypy l9format + uv run mypy l9format .PHONY: security-check security-check: ## Check for vulnerable dependencies using pip-audit - poetry run pip-audit + uv run pip-audit .PHONY: fix-trailing-whitespace fix-trailing-whitespace: ## Remove trailing whitespaces from all files @@ -97,12 +97,12 @@ check-trailing-whitespace: ## Check for trailing whitespaces in source files fi .PHONY: install -install: ## Install dependencies with Poetry - poetry install +install: ## Install dependencies with uv + uv sync .PHONY: build build: clean-dist ## Build package for distribution - poetry build + uv build .PHONY: publish-dry-run publish-dry-run: build ## Dry-run: show what would be published @@ -111,11 +111,11 @@ publish-dry-run: build ## Dry-run: show what would be published @echo "Would create GitHub release: v$(VERSION)" @echo "Package contents:" @ls -lh dist/ - poetry publish --dry-run + uv publish --dry-run .PHONY: publish publish: build ## Publish to PyPI, tag and create GitHub release - poetry publish + uv publish git tag -a "v$(VERSION)" -m "Release v$(VERSION)" git push origin "v$(VERSION)" gh release create "v$(VERSION)" dist/* \ diff --git a/pyproject.toml b/pyproject.toml index a6810f2..b96c9d6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,34 +1,36 @@ -[tool.poetry] +[project] name = "l9format" version = "1.4.0" -license = "MIT" +license = {text = "MIT"} description = "l9format is a schema declaration targeted at interoperability between network recon tools used at LeakIX" -authors = ["Danny Willems "] -maintainers = ["Danny Willems "] +authors = [{name = "Danny Willems", email = "danny@leakix.net"}] +maintainers = [{name = "Danny Willems", email = "danny@leakix.net"}] readme = "README.md" -homepage = "https://github.com/leakix/l9format-python" -repository = "https://github.com/leakix/l9format-python" -documentation = "https://github.com/leakix/l9format-python" - -[tool.poetry.dependencies] -python = "^3.11" -serde = "^0.9.0" - -[tool.poetry.group.dev.dependencies] -black = "^26.1.0" -fire = "^0.7.1" -isort = "^7.0.0" -mypy = "^1.19.0" -pip-audit = "^2.10.0" -pytest = "^9.0.2" -ruff = "^0.14.14" +requires-python = ">=3.11" +dependencies = [ + "serde>=0.9.0", +] + +[project.urls] +Homepage = "https://github.com/leakix/l9format-python" +Repository = "https://github.com/leakix/l9format-python" +Documentation = "https://github.com/leakix/l9format-python" +"Bug Tracker" = "https://github.com/leakix/l9format-python/issues" -[build-system] -requires = ["poetry-core>=1.0.0"] -build-backend = "poetry.core.masonry.api" +[dependency-groups] +dev = [ + "black>=26.1.0", + "fire>=0.7.1", + "isort>=7.0.0", + "mypy>=1.19.0", + "pip-audit>=2.10.0", + "pytest>=9.0.2", + "ruff>=0.14.14", +] -[tool.poetry.urls] -"Bug Tracker" = "https://github.com/leakix/l9format-python/issues" +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" [tool.ruff] line-length = 80 From ac6141943bc56b85f883a0510327b1193cae179b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 16 Mar 2026 14:08:42 +0000 Subject: [PATCH 3/5] docs: add CHANGELOG entry for Poetry to uv migration Co-authored-by: dannywillems <6018454+dannywillems@users.noreply.github.com> --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8dae078..96f26d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ and this project adheres to ### Infrastructure - CI: bump actions/checkout from 4 to 6 ([6c9eecd], [#49]) +- Migrate from Poetry to uv: update `pyproject.toml` to PEP 621 format with + `hatchling` build backend, replace `poetry run` with `uv run` in Makefile, + and switch CI to `astral-sh/setup-uv` ([5f4fc51], [#56]) ## [1.4.0] - 2026-02-09 @@ -158,6 +161,7 @@ and this project adheres to [6c9eecd]: https://github.com/LeakIX/l9format-python/commit/6c9eecd +[5f4fc51]: https://github.com/LeakIX/l9format-python/commit/5f4fc51 [ac4744e]: https://github.com/LeakIX/l9format-python/commit/ac4744e [d554f1e]: https://github.com/LeakIX/l9format-python/commit/d554f1e [7f49ff5]: https://github.com/LeakIX/l9format-python/commit/7f49ff5 @@ -242,4 +246,5 @@ and this project adheres to [#31]: https://github.com/LeakIX/l9format-python/issues/31 [#32]: https://github.com/LeakIX/l9format-python/issues/32 [#49]: https://github.com/LeakIX/l9format-python/pull/49 +[#56]: https://github.com/LeakIX/l9format-python/pull/56 [#43]: https://github.com/LeakIX/l9format-python/issues/43 From 92723dc2116218365a94f7e8570c7dc37c554448 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 16 Mar 2026 15:33:36 +0000 Subject: [PATCH 4/5] fix: resolve conflicts with main branch (ruff/isort dependency updates) Co-authored-by: dannywillems <6018454+dannywillems@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ pyproject.toml | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96f26d6..57bc309 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ and this project adheres to ### Infrastructure - CI: bump actions/checkout from 4 to 6 ([6c9eecd], [#49]) +- Bump ruff dev dependency from `^0.14.14` to `>=0.14.14,<0.16.0` ([ac8a1db], [#50]) +- Bump isort dev dependency from `^7.0.0` to `>=7,<9` to allow isort 8.x + ([4464bfd], [#51]) - Migrate from Poetry to uv: update `pyproject.toml` to PEP 621 format with `hatchling` build backend, replace `poetry run` with `uv run` in Makefile, and switch CI to `astral-sh/setup-uv` ([5f4fc51], [#56]) @@ -162,6 +165,8 @@ and this project adheres to [6c9eecd]: https://github.com/LeakIX/l9format-python/commit/6c9eecd [5f4fc51]: https://github.com/LeakIX/l9format-python/commit/5f4fc51 +[ac8a1db]: https://github.com/LeakIX/l9format-python/commit/ac8a1db +[4464bfd]: https://github.com/LeakIX/l9format-python/commit/4464bfd [ac4744e]: https://github.com/LeakIX/l9format-python/commit/ac4744e [d554f1e]: https://github.com/LeakIX/l9format-python/commit/d554f1e [7f49ff5]: https://github.com/LeakIX/l9format-python/commit/7f49ff5 @@ -246,5 +251,7 @@ and this project adheres to [#31]: https://github.com/LeakIX/l9format-python/issues/31 [#32]: https://github.com/LeakIX/l9format-python/issues/32 [#49]: https://github.com/LeakIX/l9format-python/pull/49 +[#50]: https://github.com/LeakIX/l9format-python/pull/50 +[#51]: https://github.com/LeakIX/l9format-python/pull/51 [#56]: https://github.com/LeakIX/l9format-python/pull/56 [#43]: https://github.com/LeakIX/l9format-python/issues/43 diff --git a/pyproject.toml b/pyproject.toml index b96c9d6..85f3cb6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,11 +21,11 @@ Documentation = "https://github.com/leakix/l9format-python" dev = [ "black>=26.1.0", "fire>=0.7.1", - "isort>=7.0.0", + "isort>=7,<9", "mypy>=1.19.0", "pip-audit>=2.10.0", "pytest>=9.0.2", - "ruff>=0.14.14", + "ruff>=0.14.14,<0.16.0", ] [build-system] From ac9c887d825008a6542cd0558f040c28384d4dec Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 16 Mar 2026 15:43:36 +0000 Subject: [PATCH 5/5] fix: remove duplicate [#51] link reference in CHANGELOG.md Co-authored-by: dannywillems <6018454+dannywillems@users.noreply.github.com> --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6eb2fae..57bc309 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -255,4 +255,3 @@ and this project adheres to [#51]: https://github.com/LeakIX/l9format-python/pull/51 [#56]: https://github.com/LeakIX/l9format-python/pull/56 [#43]: https://github.com/LeakIX/l9format-python/issues/43 -[#51]: https://github.com/LeakIX/l9format-python/pull/51