From 4fd8d6c12bc8c0f3050780814b0e96ca1ba4aefa Mon Sep 17 00:00:00 2001 From: arpanda Date: Thu, 18 Jul 2024 16:37:47 -0500 Subject: [PATCH] test for python versions --- .github/workflows/python-test.yml | 33 +++++++++++++++++++++++++++++++ tests/test_viewer.py | 13 ++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 .github/workflows/python-test.yml create mode 100644 tests/test_viewer.py diff --git a/.github/workflows/python-test.yml b/.github/workflows/python-test.yml new file mode 100644 index 0000000..9aaf9a7 --- /dev/null +++ b/.github/workflows/python-test.yml @@ -0,0 +1,33 @@ +name: Python package + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + python-version: [3.7, 3.8, 3.9, 3.10, 3.11] + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pytest + pip install -r requirements.txt + + -name: Download pytor file + run: | + wget https://storage.googleapis.com/cnvpytor_data/HepG2_WGS.pytor + + - name: Run tests + run: | + pytest \ No newline at end of file diff --git a/tests/test_viewer.py b/tests/test_viewer.py new file mode 100644 index 0000000..e5add10 --- /dev/null +++ b/tests/test_viewer.py @@ -0,0 +1,13 @@ +import cnvpytor +from pathlib import Path + + +def test_module(): + app = cnvpytor.Viewer(["HepG2_WGS.pytor"], bin_size=100000) + print(app.ls()) + + +if __name__ == "__main__": + print("Welcome to python version test") + test_module() +