-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from UMCUGenetics/feature/refactor_kinship_pri…
…nt_to_write Feature/refactor kinship print to write
- Loading branch information
Showing
19 changed files
with
1,003 additions
and
85 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,17 @@ | ||
name: Kinship Lint | ||
on: | ||
pull_request: | ||
paths: [Kinship/**] | ||
push: | ||
branches: [master, develop] | ||
paths: [Kinship/**] | ||
|
||
jobs: | ||
ruff: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: Kinship/ | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: chartboost/ruff-action@v1 |
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,63 @@ | ||
# Source: https://github.com/marketplace/actions/install-poetry-action | ||
name: Kinship Test | ||
on: | ||
pull_request: | ||
paths: [Kinship/**] | ||
push: | ||
branches: [master, develop] | ||
paths: [Kinship/**] | ||
|
||
jobs: | ||
pytest: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: Kinship/ | ||
steps: | ||
#---------------------------------------------- | ||
# check-out repo and set-up python | ||
#---------------------------------------------- | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
- name: Set up python | ||
id: setup-python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11.5' | ||
#---------------------------------------------- | ||
# install & configure poetry | ||
#---------------------------------------------- | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
version: 1.8.3 | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
installer-parallel: true | ||
|
||
#---------------------------------------------- | ||
# load cached venv if cache exists | ||
#---------------------------------------------- | ||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: .venv | ||
key: venv_kinship-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | ||
#---------------------------------------------- | ||
# install dependencies if cache does not exist | ||
#---------------------------------------------- | ||
- name: Install dependencies | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: poetry install --no-interaction --no-root | ||
#---------------------------------------------- | ||
# install root project | ||
#---------------------------------------------- | ||
- name: Install project | ||
run: poetry install --no-interaction | ||
#---------------------------------------------- | ||
# run pytest | ||
#---------------------------------------------- | ||
- name: Run tests | ||
run: | | ||
poetry run pytest . |
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,10 +1,44 @@ | ||
FROM --platform=linux/amd64 continuumio/miniconda3 | ||
################## BASE IMAGEs ###################### | ||
FROM continuumio/miniconda3:24.5.0-0 | ||
|
||
LABEL base_image="continuumio/miniconda3" | ||
LABEL version="1.0.0" | ||
LABEL extra.binaries="vcftools, plink, king" | ||
################## METADATA ###################### | ||
LABEL base_image="continuumio/miniconda3:24.5.0-0" | ||
LABEL version="1.1.1" | ||
LABEL extra.binaries="vcftools, plink, king, pandas" | ||
|
||
################## INSTALLATIONS ###################### | ||
# Use conda to install other dependencies. | ||
RUN conda config --add channels bioconda && \ | ||
conda config --add channels conda-forge && \ | ||
conda install -y vcftools=0.1.14 plink=1.90b4 king=2.2.7 | ||
|
||
# Use poetry to install virtualenv. | ||
ENV POETRY_VERSION=1.8.3 | ||
ENV POETRY_HOME=/opt/poetry | ||
ENV POETRY_VENV=/opt/poetry-venv | ||
|
||
# Tell Poetry where to place its cache and virtual environment | ||
ENV POETRY_CACHE_DIR=/tmp/poetry_cache | ||
|
||
# Do not ask any interactive question | ||
ENV POETRY_NO_INTERACTION=1 | ||
|
||
# Make poetry create the virtual environment in the project's root | ||
# it gets named `.venv` | ||
ENV POETRY_VIRTUALENVS_IN_PROJECT=1 | ||
ENV POETRY_VIRTUALENVS_CREATE=1 | ||
|
||
# Set virtual_env variable | ||
ENV VIRTUAL_ENV=/.venv | ||
# Prepend virtual environments path | ||
ENV PATH="${VIRTUAL_ENV}/bin:${POETRY_VENV}/bin:${PATH}" | ||
|
||
# Creating a virtual environment just for poetry and install it with pip | ||
RUN python3 -m venv $POETRY_VENV \ | ||
&& $POETRY_VENV/bin/pip3 install poetry==${POETRY_VERSION} | ||
|
||
# Copy project requirement files here to ensure they will be cached. | ||
COPY pyproject.toml poetry.lock ./ | ||
|
||
# Install dependencies. | ||
RUN --mount=type=cache,target=$POETRY_CACHE_DIR poetry install --without dev --no-interaction --no-cache |
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
Oops, something went wrong.