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
18 changes: 9 additions & 9 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,31 @@ on:
pull_request:

jobs:
check-poetry:
check-uv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Set up Python 3.12
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: '3.12'
cache: 'poetry'
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install liblzo2-dev
poetry install
- name: Install the project
run: uv sync --locked --all-extras --dev
- name: Test with pytest
run: |
poetry run pytest
uv run pytest

check-nix:
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v3
uses: actions/checkout@v6
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: check flake
Expand Down
3 changes: 3 additions & 0 deletions changelog.d/20260402_110101_leona_uv.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.. A new scriv changelog fragment.

- Migrate from poetry to uv (PL-134240)
141 changes: 49 additions & 92 deletions flake.lock

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

46 changes: 32 additions & 14 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,43 @@
flake = false;
};
flake-utils.url = "github:numtide/flake-utils";
poetry2nix = {
url = "github:nix-community/poetry2nix";
pyproject-nix = {
url = "github:pyproject-nix/pyproject.nix";
inputs.nixpkgs.follows = "nixpkgs";
};

uv2nix = {
url = "github:pyproject-nix/uv2nix";
inputs.pyproject-nix.follows = "pyproject-nix";
inputs.nixpkgs.follows = "nixpkgs";
};

pyproject-build-systems = {
url = "github:pyproject-nix/build-system-pkgs";
inputs.pyproject-nix.follows = "pyproject-nix";
inputs.uv2nix.follows = "uv2nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs = { self, nixpkgs, flake-utils, poetry2nix, ... }:
flake-utils.lib.eachDefaultSystem (system:
outputs =
{
self,
nixpkgs,
flake-utils,
pyproject-nix,
uv2nix,
pyproject-build-systems,
...
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs {
inherit system;
config = {
permittedInsecurePackages = [
];
};
};
lib = pkgs.callPackage "${self}/lib.nix" { poetry2nix = import poetry2nix { inherit pkgs; }; };
pkgs = nixpkgs.legacyPackages.${system};
lib = pkgs.callPackage "${self}/lib.nix" { inherit uv2nix pyproject-nix pyproject-build-systems; };
in
{
inherit (lib) packages devShells checks;
});
}
}
);
}
Loading
Loading