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
69 changes: 69 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.12']

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Upgrade pip, setuptools, and packaging
run: |
python -m pip install --upgrade pip setuptools packaging

- name: Install package with tests
run: |
pip install matplotlib
pip install .[tests]

- name: Run plot example
run: |
python3 sigProfilerPlotting/examples/plot_example.py

- name: Run unit tests
run: |
pytest -s -rw tests

- name: Build and push Docker image
if: github.ref == 'refs/heads/master' && github.event_name == 'push' && matrix.python-version == '3.12'
env:
GHCR_USERNAME: ${{ secrets.GHCR_USERNAME }}
GHCR_PASSWORD: ${{ secrets.GHCR_PASSWORD }}
run: |
echo "Starting Docker deployment to GHCR for sigprofilersuite..."

VERSION_TAG=$(grep "VERSION = " setup.py | cut -d'"' -f2)

# Get the repository name and convert it to lowercase
REPO_NAME=$(basename ${{ github.repository }} | tr '[:upper:]' '[:lower:]')
IMAGE_NAME="ghcr.io/sigprofilersuite/$REPO_NAME"

echo "Building version: $VERSION_TAG for image: $IMAGE_NAME"

echo "$GHCR_PASSWORD" | docker login ghcr.io -u "$GHCR_USERNAME" --password-stdin

docker build \
--build-arg COMMIT_SHA=${{ github.sha }} \
-t $IMAGE_NAME:$VERSION_TAG \
-t $IMAGE_NAME:latest .

docker push $IMAGE_NAME:$VERSION_TAG
docker push $IMAGE_NAME:latest

echo "Docker deployment to GHCR successful"
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ARG COMMIT_SHA=master
WORKDIR /usr/src/app

# Install the package directly from the specific commit on GitHub
RUN pip3 install 'git+https://github.com/AlexandrovLab/SigProfilerPlotting.git@'${COMMIT_SHA}
RUN pip3 install 'git+https://github.com/sigprofilersuite/SigProfilerPlotting.git@'${COMMIT_SHA}

# Create a non-root user
RUN useradd -m -s /bin/bash spm_user
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Docs](https://img.shields.io/badge/docs-latest-blue.svg)](https://osf.io/2aj6t/wiki/home/) [![License](https://img.shields.io/badge/License-BSD\%202--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause) [![Build Status](https://app.travis-ci.com/AlexandrovLab/SigProfilerPlotting.svg?branch=master)](https://app.travis-ci.com/AlexandrovLab/SigProfilerPlotting)
[![Docs](https://img.shields.io/badge/docs-latest-blue.svg)](https://osf.io/2aj6t/wiki/home/) [![License](https://img.shields.io/badge/License-BSD\%202--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause) [![CI](https://github.com/sigprofilersuite/SigProfilerPlotting/actions/workflows/ci.yml/badge.svg)](https://github.com/sigprofilersuite/SigProfilerPlotting/actions/workflows/ci.yml)

# SigProfilerPlotting
SigProfilerPlotting provides a standard tool for displaying all types of mutational signatures as well as all types of mutational patterns in cancer genomes. The tool seamlessly integrates with other SigProfiler tools.
Expand Down