Skip to content

287 dynamically adjust minimum maf for hwe calculation and add option to set hwe p value threshold #500

287 dynamically adjust minimum maf for hwe calculation and add option to set hwe p value threshold

287 dynamically adjust minimum maf for hwe calculation and add option to set hwe p value threshold #500

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python package
on:
push:
branches: [ default ]
pull_request:
branches: [ default ]
jobs:
build_docs:
runs-on: ubuntu-latest
if: "!startsWith(github.event.head_commit.message, 'noci') && startsWith(github.event.head_commit.message, 'docs')"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get Current tag
id: current_tag
uses: WyriHaximus/github-action-get-previous-tag@v1
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip poetry
poetry version ${{ steps.current_tag.outputs.tag }}
poetry install
- name: Build Docs
shell: bash
run: |
poetry run make -C docs html
- name: Deploy gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html
build_and_test:
runs-on: ubuntu-latest
if: "!startsWith(github.event.head_commit.message, 'noci') && !startsWith(github.event.head_commit.message, 'docs')"
steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"
- name: setup-conda
uses: s-weigand/setup-conda@v1
with:
# Whether to activate the conda base env (Default: 'true')
activate-conda: true
# If conda should be updated before running other commands (Default: 'false')
update-conda: true
# Python version which should be installed with conda (default: 'Default')
python-version: 3.8
# Additional channels like 'conda-forge' which can be used to install packages
conda-channels: conda-forge, bioconda, default
- name: Install dependencies
shell: bash
run: |
conda install -y mamba
python -m pip install --upgrade pip
python -m pip install poetry
poetry env info
poetry install
- name: Lint with flake8
shell: bash
run: |
# stop the build if there are Python syntax errors or undefined names
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
poetry run flake8 . --count --exit-zero --statistics
- name: Run black --check --exclude=tests/data .
shell: bash
run: |
poetry run black --check --exclude=tests/data .
- name: If needed, commit black changes to the pull request
if: failure()
shell: bash
run: |
poetry run black --exclude=tests/data .
git config --global user.name 'autoblack'
git config --global user.email '1240432+jfear@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git checkout $GITHUB_HEAD_REF
git commit -am "fixup: Format Python code with Black"
git push
- name: Test with pytest
shell: bash
run: |
poetry run pytest