Skip to content

Commit

Permalink
Feat/binf 769 gitlab (#5) (#6)
Browse files Browse the repository at this point in the history
* Python3.8 Upgrade
  • Loading branch information
czyszCTDS authored Feb 27, 2023
1 parent ea2405f commit 5e8449d
Show file tree
Hide file tree
Showing 37 changed files with 1,862 additions and 673 deletions.
20 changes: 20 additions & 0 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"template": "[email protected]:NCI-GDC/bio-python-template.git",
"commit": "a73c331723b3083eb17bcfe6d9ec13e9bb892bdd",
"context": {
"cookiecutter": {
"full_name": "Charles Czysz",
"email": "[email protected]",
"github_username": "czyszCTDS",
"project_name": "gdc-tosvc-tools",
"package_name": "gdc_tosvc_tools",
"project_short_description": "Tools for GDC Tumor-only Somatic Variant Calling Workflow",
"min_python_version": "3.8",
"github_repo": "https://github.com/NCI-GDC/gdc-tosvc-tools",
"commit": "a73c331723b3083eb17bcfe6d9ec13e9bb892bdd",
"_template": "[email protected]:NCI-GDC/bio-python-template.git"
}
},
"directory": null,
"checkout": null
}
110 changes: 110 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
_version.py

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# dotenv
.env

# virtualenv
.venv
venv/
ENV/

# direnv
.envrc
.direnv/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/

# VSCode
.vscode/
test-reports/
155 changes: 105 additions & 50 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,59 +1,114 @@
.vagrant
.DS_Store

#bioinformatics stuff
*.bam
*.bai
*.fa
*.fastq
*.fasta
*.gtf
*.tbi
*.vcf
*.fai
*.bed
*.bedGraph
*.bw
*.bigWig
*.amb
*.ann
*.pac
*.refmap

#archives
*.bz2
*.gz
*.zip
*.tar
*.Z

# Logs
logs
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
_version.py

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# dotenv
.env

# Runtime data
pids
*.pid
*.seed
# virtualenv
.venv
venv/
ENV/

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# direnv
.envrc
.direnv/

# Coverage directory used by tools like istanbul
coverage
# Spyder project settings
.spyderproject
.spyproject

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Rope project settings
.ropeproject

# node-waf configuration
.lock-wscript
# mkdocs documentation
/site

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# mypy
.mypy_cache/

# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
node_modules
# VSCode
.vscode/
test-reports/

# Debug log from npm
npm-debug.log
# Gitlab CI - automatically created, break flit validation
vars.env
gl-code-quality-report.html
54 changes: 54 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
# To contribute improvements to CI/CD templates, please follow the Development guide at:
# https://docs.gitlab.com/ee/development/cicd/templates.html
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml
include:
- project: nci-gdc/gitlab-templates
ref: master
file:
- templates/global/full.yaml
- templates/python/full.yaml

variables:
BASE_CONTAINER_VERSION: "2.1.0"
DOCKER_BUILDKIT: 1
PIP_EXTRA_INDEX_URL: https://nexus.osdc.io/repository/pypi-all/simple
DOCKER_BUILD_OPTS: "--build-arg PIP_EXTRA_INDEX_URL=https://nexus.osdc.io/repository/pypi-all/simple"

tox:
image: ${BASE_CONTAINER_REGISTRY}/${REPO_PY_VERSION}-builder:${BASE_CONTAINER_VERSION}
before_script:
- mkdir -p /usr/share/man/man1

release:
image: ${BASE_CONTAINER_REGISTRY}/${REPO_PY_VERSION}-builder:${BASE_CONTAINER_VERSION}

.python_versions:
parallel:
matrix:
- REPO_PY_VERSION: [python3.8]

docker_build:
rules:
- if: $CI_COMMIT_TAG
variables:
DOCKER_RELEASE_REGISTRY: "quay.io"
- if: $CI_COMMIT_REF_NAME =~ /main/
variables:
DOCKER_RELEASE_REGISTRY: "quay.io"
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
variables:
DOCKER_RELEASE_REGISTRY: "quay.io"
- when: always
script:
- docker build .
--file ./Dockerfile
${DOCKER_BUILD_OPTS}
--build-arg http_proxy
--build-arg https_proxy
--build-arg BASE_CONTAINER_VERSION
-t ${DOCKER_RELEASE_REGISTRY}/ncigdc/${CI_PROJECT_NAME}:${VERSION}
-t ${DOCKER_RELEASE_REGISTRY}/ncigdc/${CI_PROJECT_NAME}:${CI_COMMIT_SHA}
- docker push ${DOCKER_PUSH_OPTS} ${DOCKER_RELEASE_REGISTRY}/ncigdc/${CI_PROJECT_NAME}:${VERSION}
- docker push ${DOCKER_PUSH_OPTS} ${DOCKER_RELEASE_REGISTRY}/ncigdc/${CI_PROJECT_NAME}:${CI_COMMIT_SHA}
34 changes: 31 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
default_stages: [commit, push]
default_language_version:
python_venv: python3.8

repos:
- repo: git@github.com:Yelp/detect-secrets
rev: v0.13.1
- repo: https://github.com/Yelp/detect-secrets
rev: v1.2.0
hooks:
- id: detect-secrets
- id: detect-secrets
args: ['--baseline', '.secrets.baseline']
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: check-yaml
- id: check-toml
- id: check-json
- id: detect-aws-credentials
args: ["--allow-missing-credentials"]
- id: detect-private-key
- id: end-of-file-fixer
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: '4.0.1'
hooks:
- id: flake8
additional_dependencies: [flake8-docstrings]
Loading

0 comments on commit 5e8449d

Please sign in to comment.