-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
41 changed files
with
655,547 additions
and
1,443 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/poetry-publish@v1.11 | ||
with: | ||
pypi_token: ${{ secrets.PYPI_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,4 +90,7 @@ ENV/ | |
|
||
# IDE settings | ||
.vscode/ | ||
.idea/ | ||
.idea/ | ||
.DS_Store | ||
iAnnotateSV/.DS_Store | ||
iAnnotateSV/data/.DS_Store |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 (shahr2@mskcc.org)" | ||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.