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
14 changes: 0 additions & 14 deletions .deepsource.toml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @igboyes
* @igboyes @reecehoffmann
57 changes: 47 additions & 10 deletions .github/workflows/ci.yml → .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,59 @@
name: ci
name: CI

permissions:
contents: read

on:
push:
branches:
- "main"
pull_request:
branches:
- "main"

workflow_dispatch:

env:
REGISTRY: ghcr.io
RUNS_ON: ubuntu-24.04

jobs:
ruff-format:
name: Ruff / Format
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Install dependencies
run: uv sync --dev
- name: Check formatting
run: uv run ruff format --check .

ruff-lint:
name: Ruff / Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Install dependencies
run: uv sync --dev
- name: Run linting
run: uv run ruff check .

build:
name: build
runs-on: ubuntu-24.04
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
push: false
Expand All @@ -29,10 +62,11 @@ jobs:
cache-to: type=gha,mode=max
release:
needs: [build]
name: release
name: Publish / Release
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
outputs:
git-tag: ${{ steps.semantic.outputs.git-tag }}
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -48,22 +82,25 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release
ghcr:
runs-on: ubuntu-24.04
name: Publish / GHCR
runs-on: ubuntu-latest
if: |
github.repository_owner == 'Virtool' &&
(github.event_name == 'push' || github.event_name == 'workflow_dispatch') &&
github.event_name == 'push' &&
github.ref == 'refs/heads/main' &&
needs.release.outputs.git-tag != ''
needs: [release]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ needs.release.outputs.git-tag }}
- uses: snok/install-poetry@v1
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Write VERSION file
run: echo ${{ needs.release.outputs.git-tag }} > VERSION
- name: Update Version
run: poetry version ${{ needs.release.outputs.git-tag }}
run: uv version ${{ needs.release.outputs.git-tag }}
- uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
Expand Down
20 changes: 9 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
FROM python:3.12.3-bookworm AS build
FROM python:3.13-bookworm AS build
WORKDIR /app
RUN curl -sSL https://install.python-poetry.org | python -
ENV PATH="/root/.local/bin:${PATH}" \
POETRY_CACHE_DIR='/tmp/poetry_cache' \
POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_IN_PROJECT=1 \
POETRY_VIRTUALENVS_CREATE=1
COPY pyproject.toml poetry.lock ./
RUN poetry install --without dev --no-root
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
ENV UV_COMPILE_BYTECODE=1 \
UV_LINK_MODE=copy
COPY pyproject.toml uv.lock ./
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --locked --no-install-project --no-dev

FROM python:3.12.3-bookworm AS base
FROM python:3.13-bookworm AS base
WORKDIR /app
RUN apt-get update && \
apt-get install -y --no-install-recommends default-jre && \
rm -rf /var/lib/apt/lists/* && \
apt-get clean
COPY --from=ghcr.io/virtool/workflow-tools:2.0.1 /opt/fastqc /opt/fastqc
COPY --from=ghcr.io/virtool/tools:1.1.0 /tools/fastqc/0.11.9/ /opt/fastqc
ENV VIRTUAL_ENV=/app/.venv \
PATH="/app/.venv/bin/:/opt/fastqc:${PATH}"
RUN chmod ugo+x /opt/fastqc/fastqc
Expand Down
25 changes: 12 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
[project]
name = "workflow-create-sample"
version = "0.0.0"
version = "0.1.0"
description = "A workflow for creating new samples in Virtool."
readme = "README.md"
requires-python = ">=3.13.7,<3.14"
authors = [
{name = "Ian Boyes"},
{name = "Jake Alexander"},
{name = "Blake Smith"},
]
license = "MIT"
readme = "README.md"
requires-python = ">=3.12.3,<3.13"

[tool.poetry]
package-mode = false

[tool.poetry.dependencies]
pyfixtures = "^1.1.0"
virtool-workflow = "7.2.3"
dependencies = [
"virtool",
]

[tool.poetry.group.dev.dependencies]
ruff = "^0.12.10"
[dependency-groups]
dev = [
"ruff>=0.12.11",
]

[build-system]
requires = ["poetry-core>=1.0.0"]
[tool.uv.sources]
virtool = { git = "https://github.com/virtool/virtool", tag = "31.11.1" }
Loading