Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
canergen committed Dec 15, 2023
1 parent 5d93d4f commit fae267b
Show file tree
Hide file tree
Showing 34 changed files with 51 additions and 289,754 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
include:
- os: ubuntu-latest
python: "3.9"
- os: ubuntu-latest
python: "3.10"
- os: ubuntu-latest
python: "3.11"
- os: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
python: "3.9"
- os: ubuntu-latest
python: "3.10"
- os: ubuntu-latest
python: "3.11"

env:
OS: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion docs/notebooks/tabula_sapiens_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@
" ref_batch_key=ref_batch_key,\n",
" unknown_celltype_label=unknown_celltype_label,\n",
" save_path_trained_models=output_model_fn,\n",
" cl_obo_folder=\"./PopV/popv/ontology/\",\n",
" cl_obo_folder=\"./PopV/resources/ontology/\",\n",
" prediction_mode=\"inference\", # 'fast' mode gives fast results (does not include BBKNN and Scanorama and makes more inaccurate predictions)\n",
" n_samples_per_label=n_samples_per_label,\n",
" accelerator=\"cuda\",\n",
Expand Down
7 changes: 4 additions & 3 deletions popv/_settings.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations

import logging
from pathlib import Path
from typing import Union

import torch
from rich.console import Console
Expand Down Expand Up @@ -48,7 +49,7 @@ def logging_dir(self) -> Path:
return self._logging_dir

@logging_dir.setter
def logging_dir(self, logging_dir: Union[str, Path]):
def logging_dir(self, logging_dir: str | Path):
self._logging_dir = Path(logging_dir).resolve()

@property
Expand Down Expand Up @@ -80,7 +81,7 @@ def verbosity(self) -> int:
return self._verbosity

@verbosity.setter
def verbosity(self, level: Union[str, int]):
def verbosity(self, level: str | int):
"""
Sets logging configuration for popv based on chosen level of verbosity.
Expand Down
2 changes: 2 additions & 0 deletions popv/_utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import logging

import networkx as nx
Expand Down
2 changes: 2 additions & 0 deletions popv/algorithms/_bbknn.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import logging

import numpy as np
Expand Down
2 changes: 2 additions & 0 deletions popv/algorithms/_celltypist.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import logging

import celltypist
Expand Down
2 changes: 2 additions & 0 deletions popv/algorithms/_harmony.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import logging

import numpy as np
Expand Down
2 changes: 2 additions & 0 deletions popv/algorithms/_onclass.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import logging

import numpy as np
Expand Down
2 changes: 2 additions & 0 deletions popv/algorithms/_rf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import logging
import pickle

Expand Down
1 change: 1 addition & 0 deletions popv/algorithms/_scaffold_algorithm.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Method that hightlights how to implement a new classifier. All class items are necessary but can contain Pass as only function argument.
from __future__ import annotations

import logging

Expand Down
2 changes: 2 additions & 0 deletions popv/algorithms/_scanorama.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import logging

import anndata
Expand Down
2 changes: 2 additions & 0 deletions popv/algorithms/_scanvi.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import logging

import numpy as np
Expand Down
2 changes: 2 additions & 0 deletions popv/algorithms/_scvi.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import logging
import pickle

Expand Down
2 changes: 2 additions & 0 deletions popv/algorithms/_svm.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import logging
import pickle

Expand Down
2 changes: 2 additions & 0 deletions popv/annotation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""Helper function to execute cell-type annotation and accumulate results."""

from __future__ import annotations

import inspect
import logging
import os
Expand Down
Loading

0 comments on commit fae267b

Please sign in to comment.