Skip to content

Commit

Permalink
Merge branch 'main' into pr/36
Browse files Browse the repository at this point in the history
  • Loading branch information
endast committed Nov 28, 2023
2 parents 01d8d55 + 4dd98a9 commit 5efbeeb
Show file tree
Hide file tree
Showing 192 changed files with 3,891 additions and 355 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/autoblack_pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# GitHub Action that uses Black to reformat the Python code in an incoming pull request.
# If all Python code in the pull request is complient with Black then this Action does nothing.
# Othewrwise, Black is run and its changes are committed back to the incoming pull request.
# https://github.com/cclauss/autoblack

name: autoblack_pull_request
on: [ pull_request ]
jobs:
black-code:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- run: pip install black
- run: black --check .
- name: If needed, commit black changes to the pull request
if: failure()
run: |
printenv | grep GITHUB
git config --global user.name 'PMBio'
git config --global user.email 'PMBio@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git remote -v
git branch
git status
black .
git status
echo ready to commit
git commit -am "fixup! Format Python code with psf/black pull_request"
echo ready to push
git push
23 changes: 23 additions & 0 deletions .github/workflows/docs-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "Pull Request Docs Check"
run-name: "Docs Check 📑📝"

on:
- pull_request

jobs:
docs-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ammaraskar/sphinx-action@0.4
with:
docs-folder: "docs/"

docs-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ammaraskar/sphinx-action@0.4
with:
docs-folder: "docs/"
build-command: "make linkcheck"
69 changes: 68 additions & 1 deletion .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:
directory: 'example'
snakefile: 'pipelines/training_association_testing.snakefile'
args: '-j 2 -n'
stagein: 'pip install -e ${{ github.workspace }}'
- name: Link pretrained models
run: cd ${{ github.workspace }}/example && ln -s ../pretrained_models
- name: Association Testing Pretrained Smoke Test
Expand Down Expand Up @@ -70,3 +69,71 @@ jobs:
python -m snakemake -j 2 --directory ${{ github.workspace }}/example \
--snakefile ${{ github.workspace }}/pipelines/seed_gene_discovery.snakefile --show-failed-logs
shell: micromamba-shell {0}


DeepRVAT-Preprocessing-Pipeline-Smoke-Tests:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Preprocessing Smoke Test
uses: snakemake/snakemake-github-action@v1.24.0
with:
directory: 'example/preprocess'
snakefile: 'pipelines/preprocess.snakefile'
args: '-j 2 -n --configfile pipelines/config/deeprvat_preprocess_config.yaml'
stagein: 'touch example/preprocess/workdir/reference/GRCh38.primary_assembly.genome.fa'


DeepRVAT-Annotation-Pipeline-Smoke-Tests:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Annotations Smoke Test
uses: snakemake/snakemake-github-action@v1.25.1
with:
directory: 'example/annotations'
snakefile: 'pipelines/annotations.snakefile'
args: '-j 2 -n --configfile pipelines/config/deeprvat_annotation_config.yaml'


DeepRVAT-Preprocessing-Pipeline-Tests:
runs-on: ubuntu-latest
needs: DeepRVAT-Preprocessing-Pipeline-Smoke-Tests
steps:

- name: Check out repository code
uses: actions/checkout@v3
- uses: mamba-org/setup-micromamba@v1.4.3
with:
environment-name: deeprvat-preprocess-gh-action
environment-file: ${{ github.workspace }}/deeprvat_preprocessing_env.yml
cache-environment: true
cache-downloads: true

- name: Install DeepRVAT
run: pip install -e ${{ github.workspace }}
shell: micromamba-shell {0}

- name: Cache Fasta file
id: cache-fasta
uses: actions/cache@v3
with:
path: example/preprocess/workdir/reference
key: ${{ runner.os }}-reference-fasta

- name: Download and unpack fasta data
if: steps.cache-fasta.outputs.cache-hit != 'true'
run: |
cd ${{ github.workspace }}/example/preprocess && \
wget https://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_44/GRCh38.primary_assembly.genome.fa.gz \
-O workdir/reference/GRCh38.primary_assembly.genome.fa.gz \
&& gzip -d workdir/reference/GRCh38.primary_assembly.genome.fa.gz
- name: Run preprocessing pipeline
run: |
python -m snakemake -j 2 --directory ${{ github.workspace }}/example/preprocess \
--snakefile ${{ github.workspace }}/pipelines/preprocess.snakefile \
--configfile ${{ github.workspace }}/pipelines/config/deeprvat_preprocess_config.yaml --show-failed-logs
shell: micromamba-shell {0}
25 changes: 25 additions & 0 deletions .github/workflows/test-runner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: DeepRVAT test runner
run-name: DeepRVAT Tests 🧑🏼‍💻✅
on: [ push ]

jobs:
DeepRVAT-Tests-Runner:
runs-on: ubuntu-latest
steps:

- name: Check out repository code
uses: actions/checkout@v3
- uses: mamba-org/setup-micromamba@v1.4.3
with:
environment-name: deeprvat-preprocess-gh-action
environment-file: ${{ github.workspace }}/deeprvat_preprocessing_env.yml
cache-environment: true
cache-downloads: true

- name: Install DeepRVAT
run: pip install -e ${{ github.workspace }}
shell: micromamba-shell {0}

- name: Run pytest
run: pytest -v ${{ github.workspace }}/tests
shell: micromamba-shell {0}
167 changes: 167 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@

example/**/.snakemake/**
example/**/.snakemake_*
example/preprocess/workdir/reference/*.fa


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

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# 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/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/
/docs/apidocs/
20 changes: 20 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"

sphinx:
configuration: docs/conf.py
fail_on_warning: true

python:
install:
- requirements: docs/requirements.txt
Loading

0 comments on commit 5efbeeb

Please sign in to comment.