Skip to content
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
branches: [ "*" ]

permissions:
contents: read
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,5 @@ dmypy.json
# vs code
.vscode/
data_private/
test_output/
test_output/
data/output*
2 changes: 1 addition & 1 deletion pyranker/cli/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def main(
"--metrics-for-reversal",
help="The comma-separated metric columns for which the reversal should be calculated; for example, 'hausdorff_tc,hausdorff_et'.",
),
] = None,
] = "",
iterations: Annotated[
int,
typer.Option(
Expand Down
7 changes: 6 additions & 1 deletion pyranker/ranker.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,12 @@ def perform_permutation_test(self) -> None:
n_methods = len(self.ranks_per_metric)
self.pvals = np.zeros((n_methods, n_methods))

ranks_per_metric_sanitized = self.ranks_per_metric.drop(
# sort in order of cumulative rank and reset index in one step
ranks_per_metric_sorted = self.ranks_per_metric.sort_values(
by="cumulative_rank"
).reset_index(drop=True)

ranks_per_metric_sanitized = ranks_per_metric_sorted.drop(
columns=["method", "cumulative_rank", "final_rank"]
)

Expand Down