diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d101c7d..a86224d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,7 @@ name: CI on: push: branches: - - 'master' + - 'main' pull_request: branches: - '**' @@ -13,35 +13,34 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macos-latest] - #os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ['3.7', '3.8', '3.9'] + os: [ubuntu-latest, macos-latest, windows-latest] + python-version: ['3.7', '3.8', '3.9', '3.10'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: persist-credentials: false - name: Setup Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} - # - name: Ensure Python and source code are on same drive (Windows) - # if: ${{ matrix.os == 'windows-latest' }} - # shell: cmd - # run: | - # mkdir C:\a - # xcopy D:\a C:\a /s /e + - name: Ensure Python and source code are on same drive (Windows) + if: ${{ matrix.os == 'windows-latest' }} + shell: cmd + run: | + mkdir C:\a + xcopy D:\a C:\a /s /e - name: Install dependencies run: | pip install pytest-cov pip install . # run this command to move the data files to the user's home directory ezancestry --help - # - name: Test with pytest (Ubuntu & macOS) - # if: ${{ matrix.os != 'windows-latest' }} - # run: | - # pytest --cov=ezancestry tests - # - name: Test with pytest (Windows) - # if: ${{ matrix.os == 'windows-latest' }} - # working-directory: C:\a\ezancestry\ezancestry - # run: | - # pytest --cov=ezancestry tests + - name: Test with pytest (Ubuntu & macOS) + if: ${{ matrix.os != 'windows-latest' }} + run: | + pytest --cov=ezancestry tests + - name: Test with pytest (Windows) + if: ${{ matrix.os == 'windows-latest' }} + working-directory: C:\a\ezancestry\ezancestry + run: | + pytest --cov=ezancestry tests diff --git a/tests/test_ezancestry.py b/tests/test_ezancestry.py index 6543afb..86b61a3 100644 --- a/tests/test_ezancestry.py +++ b/tests/test_ezancestry.py @@ -17,14 +17,11 @@ def test_predict_from_file(algorithm): write_predictions=False, models_directory=data_directory.joinpath("models"), aisnps_directory=None, - n_components=None, - k=None, - algorithm=algorithm, aisnps_set=None, ) assert ( results.loc[ - "sample_genome_snps.txt", "predicted_population_superpopulation" + "sample_genome_snps.txt", "predicted_ancestry_superpopulation" ] == "EUR" )