Skip to content

Commit

Permalink
Reset to 'master' branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Donaim committed Nov 6, 2024
1 parent d0407a8 commit 531840b
Show file tree
Hide file tree
Showing 147 changed files with 15,370 additions and 1,661 deletions.
29 changes: 29 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/universal
{
"name": "MiCall dev",

// More info: https://containers.dev/guide/dockerfile
"build": {
"dockerfile": "../Dockerfile"
},

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'onCreateCommand' to run commands after the container is created, but before anything else starts.
"onCreateCommand": "python -m pip install .[denovo,watcher,dev,test]",

// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": ["ms-python.python"]
}
}

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
5 changes: 4 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
.idea
bin
docs
*cache*
.github
Dockerfile
micall/tests/working
micall/tests/microtest/scratch
micall/tests/microtest/micall-results
Expand All @@ -12,4 +15,4 @@ venv_micall
*/*.pyc
*/*/*.pyc
*/*/*/*.pyc
simgs
simgs
81 changes: 52 additions & 29 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,19 @@
name: Build and Test MiCall
on: push
jobs:
build:
main:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.11
- run: mkdir -p ~/bin
- run: echo ~/bin >> $GITHUB_PATH

- uses: actions/setup-go@v2
with:
go-version: '^1.15.6'

- name: Install Haploflow
run: |
sudo apt-get update
sudo apt-get install -y build-essential git ronn
cd /opt/
git clone https://github.com/hzi-bifo/Haploflow
cd Haploflow
git checkout 9a5a0ff6c3a0435e723e41f98fe82ec2ad19cf50
sh build.sh
sudo ln -s /opt/Haploflow/build/haploflow ~/bin/haploflow
- name: Run apt update
run: sudo apt-get update

- name: Install IVA assembler dependencies
run: |
Expand Down Expand Up @@ -65,15 +53,54 @@ jobs:
echo "/opt/bowtie2" >> $GITHUB_PATH
- name: Install MiCall's Python dependencies
# Have to clean up alignment build files. Otherwise, they'll get reused
# in Singularity build with the wrong GLIBC libraries.
run: |
python -m pip install --upgrade pip
pip install -r requirements-test.txt
pip install .[denovo,watcher,dev,test]
- name: Run type checker
run: |
mypy
- name: Run linter
run: |
ruff check
- name: Test with pytest
run: coverage run --source=micall/core,micall/g2p,micall/resistance,micall/monitor -m pytest

- name: Report code coverage
run: |
rm -rf micall/tests/microtest/scratch
codecov
docker-test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Build docker image
run: docker build --tag micall --file Dockerfile .
- name: Run docker image entrypoint
run: docker run micall --help
- name: Check docker image entrypoint
run: docker run micall --help | grep -i -e 'docker'

singularity-test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11

- uses: actions/setup-go@v2
with:
go-version: '^1.15.6'

- name: Run apt update
run: sudo apt-get update

- name: Install Singularity
run: |
sudo apt-get install -qq \
Expand All @@ -95,19 +122,15 @@ jobs:
cd ..
rm -rf singularity
singularity --version
- name: Singularity build
run: sudo singularity build micall.simg Singularity

- name: Singularity test
run: python micall/main.py release_test_microtest micall.simg

- name: Upload Singularity Image
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: micall.simg
path: micall.simg

- name: Singularity test
run: python release_test_microtest.py micall.simg

- name: Report code coverage
run: |
rm -rf micall/tests/microtest/scratch
python -m pip install codecov
codecov
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/micall_logging_override.py
/micall/utils/micall_logging_override.py
/micall/monitor/HIV1_COM_2015_genome_DNA.csv
/micall/monitor/compare_454_samples.csv
/micall/monitor/compare_454_samples.png
Expand Down
Loading

0 comments on commit 531840b

Please sign in to comment.