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
6 changes: 0 additions & 6 deletions .flake8

This file was deleted.

61 changes: 20 additions & 41 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,58 +1,37 @@
name: CI

on: [push,pull_request]
on: [push, pull_request]

jobs:
tests:
name: "Python ${{ matrix.python-version }}"
name: "Tests (${{ matrix.os }})"
runs-on: ${{ matrix.os }}

defaults:
run:
shell: bash -el {0}

strategy:
matrix:
os: [macos-latest, ubuntu-latest] #macos-latest/macos-14 is M1 - some deps fail it due to not having M1 build (MMSeqs2)
python-version: ["3.12"]
os: [macos-latest, ubuntu-latest]

steps:
- uses: "actions/checkout@v3"
- uses: actions/checkout@v4
with:
fetch-depth: 0

# Setup env
- uses: "conda-incubator/setup-miniconda@v3"
- name: Setup Pixi
uses: prefix-dev/setup-pixi@v0.8.1
with:
activate-environment: plassembler
environment-file: build/environment.yaml
python-version: ${{ matrix.python-version }}
auto-activate-base: false
channels: conda-forge,bioconda,defaults
channel-priority: strict
auto-update-conda: true

- name: Install plassembler
shell: bash -l {0}
run: |
conda install python=${{ matrix.python-version }}
python -m pip install --upgrade pip
pip install -e .
pip install black
pip install isort
pip install pytest
pip install pytest-cov
pip install git+https://github.com/rrwick/Unicycler.git
unicycler --help
- name: Check formatting
shell: bash -l {0}
run: just check-fmt
- name: Test and generate coverage report with pytest
shell: bash -l {0}
# need to set TERM to linux for some reason,kept getting a nasty error that was breaking unicycler
pixi-version: v0.71.2
cache: true
environments: dev

- name: Check formatting and lint
run: pixi run check-fmt

- name: Run unit tests
# TERM is set to avoid tput/terminal noise breaking Unicycler
# https://github.com/cypress-io/cypress/issues/15679
run: |
export TERM=linux
unicycler --version
just test-ci
env:
TERM: linux
run: pixi run test-ci

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
32 changes: 10 additions & 22 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,20 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v3
- uses: actions/checkout@v4

- name: Setup Pixi
uses: prefix-dev/setup-pixi@v0.8.1
with:
python-version: 3.12
activate-environment: plassembler
environment-file: build/environment.yaml
auto-activate-base: false
channels: conda-forge,bioconda,defaults
channel-priority: strict
auto-update-conda: true
pixi-version: v0.71.2
cache: true
environments: dev

- name: Install plassembler
shell: bash -l {0}
run: |
python -m pip install -U pip
pip install -e .
pip install black
pip install isort
pip install pytest
pip install pytest-cov
pip install git+https://github.com/rrwick/Unicycler.git
- name: Build a binary wheel and a source tarball
shell: bash -l {0}
run: just build
run: pixi run build

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ __pycache__/
*.py[cod]
*$py.class

# Pixi
.pixi/

# C extensions
*.so

Expand Down
7 changes: 7 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# History

1.8.3 (2026-07-05)
------------------

* Migrates the build and development tooling from Poetry to Pixi
* Switches the build backend to hatchling and linting/formatting to ruff
* Single-sources the package version via `importlib.metadata`

1.8.1 (2025-09-27)
------------------

Expand Down
4 changes: 1 addition & 3 deletions build/environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,5 @@ dependencies:
- samtools >=0.15.0
- canu >=2.2
- dnaapler >=0.4.0
- just
- poetry
- pip
- python >=3.8,<3.14
- ripgrep
2 changes: 1 addition & 1 deletion docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ You can install the Python components of `plassembler` using pip.
pip install plassembler
```

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

* [Flye](https://github.com/fenderglass/Flye) >=2.9
* [Unicycler](https://github.com/rrwick/Unicycler) >=0.4.8
Expand Down
25 changes: 11 additions & 14 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,31 @@
PROJECT := "plassembler"
OPEN := if os() == "macos" { "open" } else { "xdg-open" }
VERSION := `poetry version | rg -o '\d+\.\d+\.\d+'`
VERSION := `pixi workspace version get`

# format code with black and isort
# format code with ruff
fmt:
poetry run black .
poetry run isort .
pixi run fmt

# check format of code with black and isort
# check formatting and lint with ruff
check-fmt:
poetry run black --check .
poetry run isort --check .
pixi run check-fmt


# install latest version with poetry
# install environment with pixi
install:
poetry install --no-interaction
pixi install

# run all tests
test opts="":
poetry run pytest -vv {{opts}} tests/
pixi run test {{opts}}

# run tests with coverage report
coverage:
poetry run pytest --cov-report term --cov-report html --cov={{ PROJECT }} --cov-branch tests/
pixi run coverage
{{ OPEN }} htmlcov/index.html

# run tests on the CI
test-ci:
poetry run pytest --cov={{ PROJECT }} --cov-report=xml --cov-branch tests/
pixi run test-ci

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

# build a python release
build:
poetry build --no-interaction
pixi run build
Loading
Loading