Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression Tests, Bugfixes, new CLI #3

Merged
merged 39 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
cb0eb2a
🙈 update gitignore and remove ignored files
aromberg Dec 25, 2023
2772a9e
🎨 format code using Black
aromberg Dec 25, 2023
11c2af3
👷 add Black workflow
aromberg Dec 25, 2023
979926e
🧪 test black workflow
aromberg Dec 25, 2023
53b4192
✅ test Black workflow with correct formatting
aromberg Dec 25, 2023
5c5c820
Merge pull request #1 from BIONF/feature/format-workflow
aromberg Dec 25, 2023
5510514
🙈 update gitignore
aromberg Dec 26, 2023
aa33f7c
🙈 update gitignore
aromberg Dec 27, 2023
664e04c
✅ add regression tests
aromberg Dec 27, 2023
cf195e7
🙈 update gitignore
aromberg Jan 18, 2024
81e2920
✅ add regression tests
aromberg Jan 18, 2024
ef4b510
🔀 manually merge 6af3f96
aromberg Jan 18, 2024
6f149eb
🐛 fix species classification return and web strain typing (KAN-75, KA…
aromberg Jan 19, 2024
ecbb51d
✅ update tests to account for fixed species classification output
aromberg Jan 19, 2024
5c38a1d
✅ add web app strain typing tests
aromberg Jan 19, 2024
054fae5
KAN-46 add basic filter downloads ✨
aromberg Jan 19, 2024
34b90c2
KAN-44 add pytest workflow 👷
aromberg Jan 19, 2024
83d2209
KAN-44 update pytest workflow 👷
aromberg Jan 19, 2024
7a990c1
KAN-46 update downloader to include SVM data 🚑️
aromberg Jan 19, 2024
da1379b
Merge pull request #2 from BIONF/feature/regression-tests
aromberg Jan 19, 2024
8ab1150
update setup python version 👷
aromberg Jan 19, 2024
daf6760
KAN-47 remove ClassT from web app🧹
aromberg Jan 20, 2024
7436e0a
KAN-43 remove dead code from Flask app ⚰️
aromberg Jan 20, 2024
c7620f6
KAN-43 force git to rename to lowercase letter🪲
aromberg Jan 20, 2024
1cc6c8f
KAN-43 remove dead code ⚰️
aromberg Jan 20, 2024
88a453c
KAN-37 add dependency for CLI ➕
aromberg Jan 20, 2024
6392e9d
KAN-37 add unified CLI✨
aromberg Jan 22, 2024
05aeb48
KAN-37 update readme📝
aromberg Jan 22, 2024
940aec0
KAN-93 outsource filters🗃️
aromberg Jan 24, 2024
43c8f3b
KAN-38 restructure project as python package
aromberg Jan 24, 2024
bce6f51
KAN-38 fix unavailable config file
aromberg Jan 25, 2024
339c7f2
KAN-38 remove files/
aromberg Jan 25, 2024
4d5132e
update gitignore to exclude code2flow outputs
aromberg Jan 25, 2024
6337043
KAN-38 update CLI to pull project details from pyproject
aromberg Jan 25, 2024
cad64df
KAN-85 move filter hosting to applbio
aromberg Jan 25, 2024
f242da6
update gitignore to include files generated during runtime
aromberg Jan 26, 2024
4ce5a3e
KAN-51 add codecov to test workflow
aromberg Jan 26, 2024
bf794ae
manually merge 309c53b and b790a45
aromberg Jan 26, 2024
02fe2e6
resolve merge conflict
aromberg Jan 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
KAN-46 add basic filter downloads ✨
  • Loading branch information
aromberg committed Jan 19, 2024
commit 054fae5f93dea9eedbc597856996ed7905f228d9
29 changes: 29 additions & 0 deletions download_filters.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
"""Download filters from public repository."""

import os
import shutil
import requests


def download_test_filters(url):
"""Download filters."""

r = requests.get(url, allow_redirects=True, timeout=10)
with open("filter/test_filters.zip", "wb") as f:
f.write(r.content)

shutil.unpack_archive(
"filter/test_filters.zip",
"filter/temp",
"zip",
)

shutil.copytree(
"filter/temp/test_filters",
"filter",
dirs_exist_ok=True,
)

shutil.rmtree("filter/temp")

os.remove("filter/test_filters.zip")
21 changes: 21 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
"""Project CLI"""

import click

from download_filters import download_test_filters


@click.group
def cli():
pass


@cli.command()
def download_filters():
"""Download filters."""
click.echo("Downloading filters...")
download_test_filters("https://xspect.s3.eu-central-1.amazonaws.com/filters.zip")


if __name__ == "__main__":
cli()
3 changes: 2 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ def pytest_sessionstart():
print("Downloading " + assembly)

r = requests.get(url, allow_redirects=True, timeout=10)
open("tests/test_assemblies/" + assembly + ".zip", "wb").write(r.content)
with open("tests/test_assemblies/" + assembly + ".zip", "wb") as f:
f.write(r.content)

# Unzip and move
shutil.unpack_archive(
Expand Down