-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
93 additions
and
21 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,45 @@ | ||
name: Tests | ||
|
||
on: [push] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
lfs: true | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
|
||
- name: Install Poetry Dynamic Versioning | ||
run: | | ||
poetry self add "poetry-dynamic-versioning[plugin]" | ||
- name: Build package | ||
run: | | ||
poetry install --extras "cli" | ||
poetry build | ||
- name: Test package | ||
run: | | ||
poetry run pytest -v | ||
- name: Lint package | ||
run: poetry run black --check --diff . | ||
|
||
- name: Archive test output | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: test_curves | ||
path: | | ||
test_results.* | ||
if-no-files-found: error |
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,3 +1,5 @@ | ||
test_results.* | ||
|
||
# Compiled python modules. | ||
*.pyc | ||
|
||
|
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
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
Git LFS file not shown
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 |
---|---|---|
|
@@ -3,7 +3,7 @@ name = "lollipop" | |
version = "0.0.0" | ||
description = "tool for Deconvolution for Wastewater Genomics" | ||
authors = ["David Dreifuss <[email protected]>", "Ivan Blagoev Topolsky <[email protected]>", "Matteo Carrara <[email protected]>"] | ||
maintainer = ["Ivan Blagoev Topolsky <[email protected]>"] | ||
maintainers = ["Ivan Blagoev Topolsky <[email protected]>"] | ||
license = "GPL-3.0-or-later" | ||
readme = "README.md" | ||
repository = "https://github.com/cbg-ethz/LolliPop" | ||
|
@@ -31,8 +31,8 @@ lollipop = { callable = "lollipop.cli:cli", extras = ["cli"] } | |
deconvolute = { callable = "lollipop.deconvolute:deconvolute", extras = ["cli"] } | ||
|
||
[tool.poetry.dev-dependencies] | ||
black = "^22.1.0" | ||
#pytest = "^6.2.1" | ||
black = "^23.3.0" | ||
pytest = "^6.2.1" | ||
|
||
[build-system] | ||
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"] | ||
|
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,24 @@ | ||
import subprocess | ||
|
||
|
||
def test_workflow(): | ||
# data: its handled with LFS | ||
|
||
# dummy run | ||
subprocess.check_call(["lollipop", "--version"]) | ||
|
||
# do fast test from preprint | ||
subprocess.check_call( | ||
[ | ||
"lollipop", | ||
"deconvolute", | ||
"--output=test_results.csv", | ||
"--out-json=test_results.json", | ||
"--fmt-columns", | ||
"--variants-config=config_preprint.yaml", | ||
"--deconv-config=presets/deconv_linear.yaml", | ||
"--location=Zürich (ZH)", | ||
"--seed=42", | ||
"preprint/data/tallymut_line_full.tsv", | ||
] | ||
) |