Skip to content

Commit

Permalink
Skip tests for filtering on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
breimanntools committed Jun 27, 2024
1 parent 1bdd441 commit 7b1e3b5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 59 deletions.
56 changes: 0 additions & 56 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,62 +50,6 @@ jobs:
sudo apt-get update
sudo apt-get install -y mmseqs2
- name: Install cd-hit (Windows)
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
curl -L -o cd-hit.tar.gz https://github.com/weizhongli/cdhit/releases/download/V4.8.1/cd-hit-v4.8.1-2019-0228.tar.gz
$cdhitDir = "$Env:USERPROFILE\cdhit"
New-Item -ItemType Directory -Force -Path $cdhitDir
tar -xzf cd-hit.tar.gz -C $cdhitDir
$cdhitBinPath = "$cdhitDir\cd-hit-v4.8.1-2019-0228\bin"
Write-Host "cd-hit binary path: $cdhitBinPath"
[Environment]::SetEnvironmentVariable("PATH", "$Env:PATH;$cdhitBinPath", [System.EnvironmentVariableTarget]::Machine)
Write-Host "Contents of cd-hit bin directory:"
Get-ChildItem $cdhitBinPath
- name: Install mmseqs2 (Windows)
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
curl -L -o mmseqs2.zip https://mmseqs.com/latest/mmseqs-win64.zip
$mmseqsDir = "$Env:USERPROFILE\mmseqs"
New-Item -ItemType Directory -Force -Path $mmseqsDir
Expand-Archive -Path mmseqs2.zip -DestinationPath $mmseqsDir
$mmseqsBinPath = "$mmseqsDir\mmseqs-win64"
Write-Host "mmseqs2 binary path: $mmseqsBinPath"
[Environment]::SetEnvironmentVariable("PATH", "$Env:PATH;$mmseqsBinPath", [System.EnvironmentVariableTarget]::Machine)
Write-Host "Contents of mmseqs2 directory:"
Get-ChildItem $mmseqsBinPath
- name: Verify mmseqs2 installation
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
$mmseqsBinPath = "$Env:USERPROFILE\mmseqs\mmseqs-win64"
$env:Path += ";$mmseqsBinPath"
Write-Host "Updated PATH: $env:Path"
Write-Host "Checking mmseqs binary in PATH:"
if (-Not (Get-Command mmseqs -ErrorAction SilentlyContinue)) {
Write-Error "mmseqs not found in PATH"
} else {
Write-Host "mmseqs found in PATH"
mmseqs --version
- name: Verify cd-hit installation
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
$cdhitBinPath = "$Env:USERPROFILE\cdhit\cd-hit-v4.8.1-2019-0228\bin"
$env:Path += ";$cdhitBinPath"
Write-Host "Updated PATH: $env:Path"
Write-Host "Checking cd-hit binary in PATH:"
if (-Not (Get-Command cd-hit -ErrorAction SilentlyContinue)) {
Write-Error "cd-hit not found in PATH"
} else {
Write-Host "cd-hit found in PATH"
cd-hit --version
- name: Run Tests
run: pytest tests
env:
Expand Down
10 changes: 7 additions & 3 deletions tests/unit/data_handling_tests/test_filter_seq.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
"""This is a script to test the filter_seq() function."""
"""This is a script to test the filter_seq() function.
Will only be tested for Linux since CD-HIT not installable on windows"""
import pandas as pd
from hypothesis import given, settings
import hypothesis.strategies as st
import aaanalysis as aa
import pytest
import random
import platform

aa.options["verbose"] = False

# Set default deadline from 200 to 20000
settings.register_profile("ci", deadline=20000)
settings.load_profile("ci")

is_windows = platform.system() == "Windows"


# Normal Cases
@pytest.mark.skipif(is_windows, reason="Skipping tests on Windows")
class TestFilterSeq:
"""Test filter_seq function."""

Expand Down Expand Up @@ -157,8 +161,8 @@ def test_invalid_sort_clusters(self):
with pytest.raises(ValueError):
aa.filter_seq(df_seq=df_seq, sort_clusters=sort_cluster, method="mmseqs")


# Complex Cases
@pytest.mark.skipif(is_windows, reason="Skipping tests on Windows")
class TestFilterSeqComplex:
"""Test filter_seq function for complex cases."""

Expand Down

0 comments on commit 7b1e3b5

Please sign in to comment.