Skip to content

Commit 4cdaee6

Browse files
authored
Merge pull request #85 from gbouras13/migrate-poetry-to-pixi
Migrate poetry to pixi
2 parents 8f78420 + 0dcd367 commit 4cdaee6

31 files changed

Lines changed: 11366 additions & 525 deletions

.flake8

Lines changed: 0 additions & 6 deletions
This file was deleted.

.github/workflows/ci.yaml

Lines changed: 20 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,37 @@
11
name: CI
22

3-
on: [push,pull_request]
3+
on: [push, pull_request]
44

55
jobs:
66
tests:
7-
name: "Python ${{ matrix.python-version }}"
7+
name: "Tests (${{ matrix.os }})"
88
runs-on: ${{ matrix.os }}
99

10-
defaults:
11-
run:
12-
shell: bash -el {0}
13-
1410
strategy:
1511
matrix:
16-
os: [macos-latest, ubuntu-latest] #macos-latest/macos-14 is M1 - some deps fail it due to not having M1 build (MMSeqs2)
17-
python-version: ["3.12"]
12+
os: [macos-latest, ubuntu-latest]
1813

1914
steps:
20-
- uses: "actions/checkout@v3"
15+
- uses: actions/checkout@v4
2116
with:
2217
fetch-depth: 0
2318

24-
# Setup env
25-
- uses: "conda-incubator/setup-miniconda@v3"
19+
- name: Setup Pixi
20+
uses: prefix-dev/setup-pixi@v0.8.1
2621
with:
27-
activate-environment: plassembler
28-
environment-file: build/environment.yaml
29-
python-version: ${{ matrix.python-version }}
30-
auto-activate-base: false
31-
channels: conda-forge,bioconda,defaults
32-
channel-priority: strict
33-
auto-update-conda: true
34-
35-
- name: Install plassembler
36-
shell: bash -l {0}
37-
run: |
38-
conda install python=${{ matrix.python-version }}
39-
python -m pip install --upgrade pip
40-
pip install -e .
41-
pip install black
42-
pip install isort
43-
pip install pytest
44-
pip install pytest-cov
45-
pip install git+https://github.com/rrwick/Unicycler.git
46-
unicycler --help
47-
- name: Check formatting
48-
shell: bash -l {0}
49-
run: just check-fmt
50-
- name: Test and generate coverage report with pytest
51-
shell: bash -l {0}
52-
# need to set TERM to linux for some reason,kept getting a nasty error that was breaking unicycler
22+
pixi-version: v0.71.2
23+
cache: true
24+
environments: dev
25+
26+
- name: Check formatting and lint
27+
run: pixi run check-fmt
28+
29+
- name: Run unit tests
30+
# TERM is set to avoid tput/terminal noise breaking Unicycler
5331
# https://github.com/cypress-io/cypress/issues/15679
54-
run: |
55-
export TERM=linux
56-
unicycler --version
57-
just test-ci
32+
env:
33+
TERM: linux
34+
run: pixi run test-ci
5835

36+
- name: Upload coverage reports to Codecov
37+
uses: codecov/codecov-action@v4

.github/workflows/release.yaml

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,20 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v3
15-
- uses: conda-incubator/setup-miniconda@v3
14+
- uses: actions/checkout@v4
15+
16+
- name: Setup Pixi
17+
uses: prefix-dev/setup-pixi@v0.8.1
1618
with:
17-
python-version: 3.12
18-
activate-environment: plassembler
19-
environment-file: build/environment.yaml
20-
auto-activate-base: false
21-
channels: conda-forge,bioconda,defaults
22-
channel-priority: strict
23-
auto-update-conda: true
19+
pixi-version: v0.71.2
20+
cache: true
21+
environments: dev
2422

25-
- name: Install plassembler
26-
shell: bash -l {0}
27-
run: |
28-
python -m pip install -U pip
29-
pip install -e .
30-
pip install black
31-
pip install isort
32-
pip install pytest
33-
pip install pytest-cov
34-
pip install git+https://github.com/rrwick/Unicycler.git
3523
- name: Build a binary wheel and a source tarball
36-
shell: bash -l {0}
37-
run: just build
24+
run: pixi run build
25+
3826
- name: Publish to PyPI
39-
uses: pypa/gh-action-pypi-publish@master
27+
uses: pypa/gh-action-pypi-publish@release/v1
4028
with:
4129
user: __token__
4230
password: ${{ secrets.PYPI_TOKEN }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ __pycache__/
33
*.py[cod]
44
*$py.class
55

6+
# Pixi
7+
.pixi/
8+
69
# C extensions
710
*.so
811

HISTORY.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# History
22

3+
1.8.3 (2026-07-05)
4+
------------------
5+
6+
* Migrates the build and development tooling from Poetry to Pixi
7+
* Switches the build backend to hatchling and linting/formatting to ruff
8+
* Single-sources the package version via `importlib.metadata`
9+
310
1.8.1 (2025-09-27)
411
------------------
512

build/environment.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,5 @@ dependencies:
1414
- samtools >=0.15.0
1515
- canu >=2.2
1616
- dnaapler >=0.4.0
17-
- just
18-
- poetry
17+
- pip
1918
- python >=3.8,<3.14
20-
- ripgrep

docs/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ You can install the Python components of `plassembler` using pip.
2626
pip install plassembler
2727
```
2828

29-
You will then need to install the external dependencies separately, which can be found in `build/environment.yml`
29+
You will then need to install the external dependencies separately, which can be found in `build/environment.yaml`
3030

3131
* [Flye](https://github.com/fenderglass/Flye) >=2.9
3232
* [Unicycler](https://github.com/rrwick/Unicycler) >=0.4.8

justfile

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,31 @@
11
PROJECT := "plassembler"
22
OPEN := if os() == "macos" { "open" } else { "xdg-open" }
3-
VERSION := `poetry version | rg -o '\d+\.\d+\.\d+'`
3+
VERSION := `pixi workspace version get`
44

5-
# format code with black and isort
5+
# format code with ruff
66
fmt:
7-
poetry run black .
8-
poetry run isort .
7+
pixi run fmt
98

10-
# check format of code with black and isort
9+
# check formatting and lint with ruff
1110
check-fmt:
12-
poetry run black --check .
13-
poetry run isort --check .
11+
pixi run check-fmt
1412

15-
16-
# install latest version with poetry
13+
# install environment with pixi
1714
install:
18-
poetry install --no-interaction
15+
pixi install
1916

2017
# run all tests
2118
test opts="":
22-
poetry run pytest -vv {{opts}} tests/
19+
pixi run test {{opts}}
2320

2421
# run tests with coverage report
2522
coverage:
26-
poetry run pytest --cov-report term --cov-report html --cov={{ PROJECT }} --cov-branch tests/
23+
pixi run coverage
2724
{{ OPEN }} htmlcov/index.html
2825

2926
# run tests on the CI
3027
test-ci:
31-
poetry run pytest --cov={{ PROJECT }} --cov-report=xml --cov-branch tests/
28+
pixi run test-ci
3229

3330
# prints out the commands to run to tag the release and push it
3431
tag:
@@ -37,4 +34,4 @@ tag:
3734

3835
# build a python release
3936
build:
40-
poetry build --no-interaction
37+
pixi run build

0 commit comments

Comments
 (0)