Skip to content

Commit 505dfd9

Browse files
committed
checks
1 parent 9781ea8 commit 505dfd9

File tree

16 files changed

+30
-18
lines changed

16 files changed

+30
-18
lines changed

run_checks.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
set -e
3+
4+
echo "================================"
5+
echo "Running code quality checks..."
6+
echo "================================"
7+
echo ""
8+
9+
echo "📝 Checking code formatting with black..."
10+
black --check src/ tests/
11+
echo "✓ Black formatting check passed"
12+
echo ""
13+
14+
echo "🔍 Linting code with ruff..."
15+
ruff check src/ tests/
16+
echo "✓ Ruff linting passed"
17+
echo ""
18+
19+
echo "🧪 Running tests with coverage..."
20+
pytest --cov=votuderep --cov-report=term-missing --cov-report=xml -v
21+
echo "✓ All tests passed"
22+
echo ""
23+
24+
echo "================================"
25+
echo "✅ All checks passed!"
26+
echo "================================"

src/votuderep/cli.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""Main CLI interface for votuderep using rich-click."""
22

33
import sys
4-
from typing import Optional
54

65
import rich_click as click
76
from rich.console import Console

src/votuderep/commands/derep.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import os
44
import shutil
55
import tempfile
6-
from pathlib import Path
76

87
import rich_click as click
98
from rich.console import Console
@@ -179,7 +178,7 @@ def derep(
179178
progress.update(task4, completed=True)
180179

181180
# Success message
182-
console.print(f"\n[bold green]Success![/bold green]")
181+
console.print("\n[bold green]Success![/bold green]")
183182
console.print(f"Wrote {num_written} dereplicated sequences to: [bold]{output}[/bold]")
184183

185184
if keep:

src/votuderep/commands/filter.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
"""Filter command for filtering FASTA files using CheckV metrics."""
22

3-
import sys
4-
53
import rich_click as click
64
from rich.console import Console
75

@@ -145,7 +143,7 @@ def filter_cmd(
145143
)
146144

147145
# Success message (to stderr so it doesn't interfere with stdout output)
148-
console.print(f"\n[bold green]Success![/bold green]")
146+
console.print("\n[bold green]Success![/bold green]")
149147
console.print(f"Filtered {num_written} sequences")
150148

151149
if output:
-75 Bytes
Binary file not shown.
-86 Bytes
Binary file not shown.
-36 Bytes
Binary file not shown.

src/votuderep/core/blast.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
"""BLAST operations for vOTU dereplication."""
22

33
import subprocess
4-
from pathlib import Path
5-
from typing import Optional
64

75
from ..utils.logging import get_logger
86
from ..utils.validators import VotuDerepError

src/votuderep/core/dereplication.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
"""ANI calculation and clustering for vOTU dereplication."""
22

33
import gzip
4-
from pathlib import Path
54
from typing import Iterator, Dict, List, Tuple, Set
65

7-
import numpy as np
86

97
from ..utils.logging import get_logger
108
from ..utils.io import read_fasta
@@ -259,8 +257,7 @@ def cluster_by_ani(
259257
for line in handle:
260258
fields = line.strip().split("\t")
261259
qname, tname = fields[0], fields[1]
262-
num_alns, ani, qcov, tcov = (
263-
int(fields[2]),
260+
ani, qcov, tcov = (
264261
float(fields[3]),
265262
float(fields[4]),
266263
float(fields[5]),

src/votuderep/core/filtering.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""Filtering sequences based on CheckV quality metrics."""
22

3-
from pathlib import Path
43
from typing import Set, Optional
54

65
import pandas as pd

0 commit comments

Comments
 (0)