Skip to content

Commit

Permalink
Merge branch 'release/1.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhshah committed Sep 2, 2024
2 parents a2f8654 + 90a56c1 commit ee63cc2
Show file tree
Hide file tree
Showing 41 changed files with 655,547 additions and 1,443 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Publish Docker image to ghcr.io
on:
push:
tags:
- "*"
jobs:
push_to_registries:
name: Build and publish Docker image
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Prepare
# In this preparation step, a few configurations are made
# according to tags that will be used to export the image
# for Docker Hub, as well as the name of the image itself
id: prep
run: |
DOCKER_IMAGE=ghcr.io/rhshah/iAnnotateSV
VERSION=noop
if [ "${{ github.event_name }}" = "schedule" ]; then
VERSION=nightly
elif [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
elif [[ $GITHUB_REF == refs/heads/* ]]; then
VERSION=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g')
fi
TAGS="${DOCKER_IMAGE}:${VERSION}"
if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
MINOR=${VERSION%.*}
MAJOR=${MINOR%.*}
TAGS="$TAGS,${DOCKER_IMAGE}:latest"
elif [[ $VERSION =~ ^v[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
VERSION=$(echo ${VERSION#v})
TAGS="${DOCKER_IMAGE}:${VERSION}"
elif [ "${{ github.event_name }}" = "push" ]; then
TAGS="$TAGS,${DOCKER_IMAGE}:sha-${GITHUB_SHA::8}"
fi
echo ::set-output name=version::${VERSION}
echo ::set-output name=tags::${TAGS}
- name: Login to GitHub Container Registry
#if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.RS_PAT }}
- name: Push to GitHub Packages
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.prep.outputs.tags }}
build-args: |
iAnnotateSV_VERSION=${{ steps.prep.outputs.version }}
labels: |
org.opencontainers.image.title=${{ github.event.repository.name }}
org.opencontainers.image.description=${{ github.event.repository.description }}
org.opencontainers.image.version=${{ steps.prep.outputs.version }}
6 changes: 3 additions & 3 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [2.7.18]
python-version: [3.10.14]

steps:
- name: Checkout github repo (+ download lfs dependencies)
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
lfs: true
- name: Checkout LFS objects
run: git lfs checkout
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Publish package to PyPI

on:
push:
tags:
- "*.*.*"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build and publish to pypi
uses: JRubics/[email protected]
with:
pypi_token: ${{ secrets.PYPI_API_TOKEN }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,7 @@ ENV/

# IDE settings
.vscode/
.idea/
.idea/
.DS_Store
iAnnotateSV/.DS_Store
iAnnotateSV/data/.DS_Store
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

39 changes: 39 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
################## Base Image ##########
ARG PYTHON_VERSION="3.10.14"
FROM --platform=linux/amd64 python:${PYTHON_VERSION}

################## ARGUMENTS/Environments ##########
ARG BUILD_DATE
ARG BUILD_VERSION
ARG LICENSE="Apache-2.0"
ARG iAnnotateSV_VERSION
ARG VCS_REF

################## METADATA ########################
LABEL org.opencontainers.image.vendor="MSKCC"
LABEL org.opencontainers.image.authors="Ronak Shah ([email protected])"

LABEL org.opencontainers.image.created=${BUILD_DATE} \
org.opencontainers.image.version=${BUILD_VERSION} \
org.opencontainers.image.licenses=${LICENSE} \
org.opencontainers.image.version.pvs=${iAnnotateSV_VERSION} \
org.opencontainers.image.source.pv="https://pypi.org/project/iAnnotateSV" \
org.opencontainers.image.vcs-url="https://github.com/rhshah/iAnnotateSV.git" \
org.opencontainers.image.vcs-ref=${VCS_REF}

LABEL org.opencontainers.image.description="This container uses python 3.10.14 as the base image to build \
iAnnotateSV version ${iAnnotateSV_VERSION}"

################## INSTALL ##########################

WORKDIR /app
ADD . /app

# install iAnnotateSV

RUN apt-get update && apt-get install --no-install-recommends -y gcc g++ zlib1g-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& make deps-install \
&& poetry build \
&& pip install dist/iAnnotateSV-*-py3-none-any.whl
17 changes: 13 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
init:
pip install -r requirements.txt
# options
.ONESHELL:

test:
nosetests -v --with-coverage --cover-tests tests

.PHONY: deps-install
deps-install: ## install dependencies
pip install poetry
poetry install

requirements.txt: poetry.lock
poetry export --format requirements.txt --output requirements.txt --without-hashes

requirements-dev.txt: poetry.lock
poetry export --with dev --format requirements.txt --output requirements-dev.txt --without-hashes
33 changes: 12 additions & 21 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,9 @@ iAnnotateSV: Annotation of structural variants detected from NGS
.. image:: https://img.shields.io/pypi/v/iAnnotateSV.svg
:target: https://pypi.python.org/pypi/iAnnotateSV

.. image:: https://landscape.io/github/rhshah/iAnnotateSV/master/landscape.svg?style=flat
:target: https://landscape.io/github/rhshah/iAnnotateSV/master
:alt: Code Health


.. image:: https://zenodo.org/badge/18929/rhshah/iAnnotateSV.svg
:target: https://zenodo.org/badge/latestdoi/18929/rhshah/iAnnotateSV


.. image:: https://travis-ci.org/rhshah/iAnnotateSV.svg?branch=master
:target: https://travis-ci.org/rhshah/iAnnotateSV


.. image:: https://codecov.io/gh/rhshah/iAnnotateSV/branch/master/graph/badge.svg
:target: https://codecov.io/gh/rhshah/iAnnotateSV


iAnnotateSV is a Python library and command-line software toolkit to annotate and
visualize structural variants detected from Next Generation DNA sequencing data. This works for majority is just re-writing of a tool called dRanger_annotate written in matlab by Mike Lawrence at Broad Institue.
But it also has some additional functionality and control over the annotation w.r.t the what transcripts to be used for annotation.
Expand All @@ -48,13 +34,18 @@ Required Packages
=================
We require that you install:

:python: `v2.7.15 <https://www.python.org/downloads/release/python-2715/>`_
:pandas: `v0.24.2 <http://pandas.pydata.org/>`_
:biopython: `v1.76 <http://biopython.org/wiki/Main_Page>`_
:Pillow: `v6.2.1 <https://pypi.python.org/pypi/Pillow/3.4.2>`_
:openpyxl: `v2.6.4 <https://pypi.python.org/pypi/openpyxl/2.6.4>`_
:reportlab: `v3.5.2 <https://pypi.python.org/pypi/reportlab/3.5.2>`_
:coloredlogs: `v14.0 <https://pypi.python.org/pypi/coloredlogs>`_
:python: `v3.10.14 <https://www.python.org/downloads/release/>`_
:pandas: `v2.2.2 <http://pandas.pydata.org/>`_
:biopython: `v1.84 <http://biopython.org/wiki/Main_Page>`_
:Pillow: `v10.4.0 <https://pypi.python.org/pypi/Pillow/>`_
:openpyxl: `v3.1.5 <https://pypi.python.org/pypi/openpyxl/>`_
:reportlab: `v3.6.13 <https://pypi.python.org/pypi/reportlab/>`_
:coloredlogs: `v15.0.1 <https://pypi.python.org/pypi/coloredlogs>`_

Utilities
=========

`Generate Fusion Peptides <./generate_fusion_peptides/README.md>`_ - Helen Xie

Quick Usage
===========
Expand Down
Binary file modified docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/_build/doctrees/iAnnotateSV.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/index.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/modules.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/_build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 9f362582164ff56ce148b5cb1ccd33fe
config: 2053fac6e0c6125adcfdafa8b47c0de3
tags: 645f666f9bcd5a90fca523b33c5a78b7
Loading

0 comments on commit ee63cc2

Please sign in to comment.