Skip to content

Commit e7fe853

Browse files
committed
Initial import.
0 parents  commit e7fe853

26 files changed

Lines changed: 2032 additions & 0 deletions

.dockerignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
*.pyc
2+
__pycache__
3+
4+
default.cfg.template
5+
.env
6+
example.env
7+
example.cfg
8+
.github

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
updates:
3+
# Maintain dependencies for GitHub Actions
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "daily"
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Publish docker images
2+
on:
3+
push:
4+
branches:
5+
- main
6+
release:
7+
types: [published]
8+
jobs:
9+
publish-pypi:
10+
name: Publish script-runner to pypi
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Publish a Python distribution to PyPI
14+
uses: pypa/gh-action-pypi-publish@release/v1
15+
with:
16+
user: __token__
17+
password: ${{ secrets.PYPI_API_TOKEN }}
18+
19+
publish-docker:
20+
name: Publish script-runner to dockerhub
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Check out the repo
24+
uses: actions/checkout@v2
25+
- name: Prepare
26+
id: prep
27+
run: |
28+
PYTHON_IMAGE_TAG=alpine
29+
DOCKER_IMAGE=labflow/swabseq-analysis-server
30+
VERSION=latest
31+
if [[ $GITHUB_REF == refs/tags/* ]]; then
32+
VERSION=${GITHUB_REF#refs/tags/}
33+
elif [[ $GITHUB_REF == refs/heads/* ]]; then
34+
VERSION=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g')
35+
elif [[ $GITHUB_REF == refs/pull/* ]]; then
36+
VERSION=pr-${{ github.event.number }}
37+
fi
38+
TAGS="${DOCKER_IMAGE}:${PYTHON_IMAGE_TAG}-latest,${DOCKER_IMAGE}:${PYTHON_IMAGE_TAG}-${VERSION}"
39+
if [ "${{ github.event_name }}" = "push" ]; then
40+
TAGS="$TAGS,${DOCKER_IMAGE}:${PYTHON_IMAGE_TAG}-sha-${GITHUB_SHA::8}"
41+
fi
42+
echo ::set-output name=version::${VERSION}
43+
echo ::set-output name=tags::${TAGS}
44+
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
45+
echo ::set-output name=hashtag::"sha-${GITHUB_SHA::8}"
46+
echo ::set-output name=pyversion::"${PYTHON_IMAGE_TAG}"
47+
- name: Set up Docker Buildx
48+
id: buildx
49+
uses: docker/setup-buildx-action@v1
50+
- name: Cache Docker layers
51+
uses: actions/cache@v2.1.4
52+
with:
53+
path: /tmp/.buildx-cache
54+
key: ${{ runner.os }}-buildx-${{ github.sha }}
55+
restore-keys: |
56+
${{ runner.os }}-buildx-
57+
- name: Login to DockerHub
58+
if: github.event_name != 'pull_request'
59+
uses: docker/login-action@v1
60+
with:
61+
username: ${{ secrets.DOCKER_USERNAME }}
62+
password: ${{ secrets.DOCKER_PASSWORD }}
63+
- name: Push to Docker Hub
64+
uses: docker/build-push-action@v2
65+
with:
66+
context: ./docker
67+
file: ./Dockerfile
68+
builder: ${{ steps.buildx.outputs.name }}
69+
push: ${{ github.event_name != 'pull_request' }}
70+
tags: ${{ steps.prep.outputs.tags }}
71+
cache-from: type=local,src=/tmp/.buildx-cache
72+
cache-to: type=local,dest=/tmp/.buildx-cache
73+
labels: |
74+
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
75+
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
76+
org.opencontainers.image.revision=${{ github.sha }}
77+
build-args: |
78+
SCRIPT_RUNNER_VERSION=${{ steps.prep.outputs.version }}
79+
PYTHON_IMAGE_TAG=${{ steps.prep.outputs.pyversion }}

.gitignore

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
# C extensions
6+
*.so
7+
# Distribution / packaging
8+
.Python
9+
build/
10+
develop-eggs/
11+
dist/
12+
downloads/
13+
eggs/
14+
.eggs/
15+
lib/
16+
lib64/
17+
parts/
18+
sdist/
19+
var/
20+
wheels/
21+
share/python-wheels/
22+
*.egg-info/
23+
.installed.cfg
24+
*.egg
25+
MANIFEST
26+
# PyInstaller
27+
# Usually these files are written by a python script from a template
28+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
29+
*.manifest
30+
*.spec
31+
# Installer logs
32+
pip-log.txt
33+
pip-delete-this-directory.txt
34+
# Unit test / coverage reports
35+
htmlcov/
36+
.tox/
37+
.nox/
38+
.coverage
39+
.coverage.*
40+
.cache
41+
nosetests.xml
42+
coverage.xml
43+
*.cover
44+
*.py,cover
45+
.hypothesis/
46+
.pytest_cache/
47+
cover/
48+
# Translations
49+
*.mo
50+
*.pot
51+
# Django stuff:
52+
*.log
53+
local_settings.py
54+
db.sqlite3
55+
db.sqlite3-journal
56+
# Flask stuff:
57+
instance/
58+
.webassets-cache
59+
# Scrapy stuff:
60+
.scrapy
61+
# Sphinx documentation
62+
docs/_build/
63+
# PyBuilder
64+
.pybuilder/
65+
target/
66+
# Jupyter Notebook
67+
.ipynb_checkpoints
68+
# IPython
69+
profile_default/
70+
ipython_config.py
71+
# pyenv
72+
# For a library or package, you might want to ignore these files since the code is
73+
# intended to run in multiple environments; otherwise, check them in:
74+
# .python-version
75+
# pipenv
76+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
77+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
78+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
79+
# install all needed dependencies.
80+
#Pipfile.lock
81+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
82+
__pypackages__/
83+
# Celery stuff
84+
celerybeat-schedule
85+
celerybeat.pid
86+
# SageMath parsed files
87+
*.sage.py
88+
# Environments
89+
.env
90+
.venv
91+
env/
92+
venv/
93+
ENV/
94+
env.bak/
95+
venv.bak/
96+
# Spyder project settings
97+
.spyderproject
98+
.spyproject
99+
# Rope project settings
100+
.ropeproject
101+
# mkdocs documentation
102+
/site
103+
# mypy
104+
.mypy_cache/
105+
.dmypy.json
106+
dmypy.json
107+
# Pyre type checker
108+
.pyre/
109+
# pytype static type analyzer
110+
.pytype/
111+
# Cython debug symbols
112+
cython_debug/
113+
# Don't commit secrets!
114+
*.env
115+
!example.env
116+
.basespace/*
117+
!.basespace/.gitkeep
118+
.Rproj.user
119+
swabseq-analysis.Rproj
120+
# VSCode
121+
.vscode/
122+
123+
# This is autogenerated during CD
124+
VERSION

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 LabGrid and Octant Bio and Kyle Kovary and Joshua Bloom and Nate Lubock and Scott Simpkins and Aaron Cooper
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Pipfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[[source]]
2+
url = "https://pypi.python.org/simple"
3+
verify_ssl = true
4+
name = "pypi"
5+
6+
[packages]
7+
celery = "*"
8+
flask = "*"
9+
flask-cors = "*"
10+
flask-restx = "*"
11+
jsonpath-ng = "*"
12+
python-jose = "*"
13+
pydantic = "*"
14+
redis = "*"
15+
typing_extensions = "*"
16+
Werkzeug = "*"
17+
gunicorn = "*"
18+
19+
[dev-packages]
20+
pylint = "*"
21+
pylint-flask = "*"
22+
pydocstyle = "*"
23+
pipenv-setup = "*"

0 commit comments

Comments
 (0)