-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* renamed scIB to scib * fixed imports * Fixed name in setup.py * fix name in CI * refactored package options to setup.cfg * separate command for pip install scib * fix finding packages * moved pytest.ini content to pyproject.toml * removed old module notes * removed redundant requirements files * rename functions to snake case * wrap integration functions with old functions names * Better deprecation warning * rename read_conos and read_scanorama * moved test dependencies to setup.cfg * Update README * Rename batch in README usage * add per batch trajectory score (#273) * add per batch trajectory score * Update trajectory.py add missing comma * Update trajectory.py import pandas * don't recompute trajectories per batch * correct batch var handling * Update trajectory.py * Check batch key * add tests for trajectory score * update test values * update test values Co-authored-by: Strobl <[email protected]> Co-authored-by: Michaela Mueller <[email protected]> * renamed scIB to scib * fixed imports * Fixed name in setup.py * fix name in CI * refactored package options to setup.cfg * separate command for pip install scib * fix finding packages * moved pytest.ini content to pyproject.toml * removed old module notes * removed redundant requirements files * rename functions to snake case * wrap integration functions with old functions names * Better deprecation warning * rename read_conos and read_scanorama * moved test dependencies to setup.cfg * Update README * Rename batch in README usage * rename trajectory batch function usage * integrated code review * add kwargs to integration methods * Use tempfile for model paths * rename packaging tools file * minor code review changes * use tempfile for conos saving * Throw error when batches mismatch in trajectory conservation metric * restructured utils functions in metrics module * Revert "Throw error when batches mismatch in trajectory conservation metric" This reverts commit fe0200c. * Throw error when batches mismatch in trajectory conservation metric * Revert "restructured utils functions in metrics module" This reverts commit c30a501. * fix batch check in TI conservation * update import order * setup bumpversion * Bump version: 0.2.0 → 1.0.0 * add MANIFEST.in Co-authored-by: Daniel Strobl <[email protected]> Co-authored-by: Strobl <[email protected]>
- Loading branch information
1 parent
a757bfc
commit 985d815
Showing
57 changed files
with
1,064 additions
and
886 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ testing.h5ad | |
data | ||
.ipynb_checkpoints | ||
*.egg-info | ||
*dist/ | ||
*cache* | ||
.snakemake | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include VERSION.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools", | ||
"wheel", | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.pytest.ini_options] | ||
log_cli = 'True' | ||
log_cli_level = 'INFO' | ||
addopts = '-p no:warnings' |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
try: | ||
from importlib import metadata | ||
except ImportError: # for Python<3.8 | ||
import importlib_metadata as metadata | ||
|
||
__version__ = metadata.version('scib') | ||
|
||
from . import integration, metrics, preprocessing | ||
from . import utils as utils | ||
from ._package_tools import rename_func | ||
from .metrics import clustering | ||
|
||
alias_func_map = { | ||
'runScanorama': integration.scanorama, | ||
'runTrVae': integration.trvae, | ||
'runTrVaep': integration.trvaep, | ||
'runScGen': integration.scgen, | ||
'runScvi': integration.scvi, | ||
'runScanvi': integration.scanvi, | ||
'runMNN': integration.mnn, | ||
'runBBKNN': integration.bbknn, | ||
'runSaucie': integration.saucie, | ||
'runCombat': integration.combat, | ||
'runDESC': integration.desc, | ||
'readSeurat': preprocessing.read_seurat, | ||
'readConos': preprocessing.read_conos, | ||
} | ||
|
||
for alias, func in alias_func_map.items(): | ||
rename_func(func, alias) | ||
|
||
pp = preprocessing | ||
ig = integration | ||
me = metrics | ||
cl = clustering |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import inspect | ||
import warnings | ||
from functools import wraps | ||
|
||
warnings.simplefilter('default') # or 'always' | ||
|
||
|
||
def wrap_func_naming(func, name): | ||
""" | ||
Decorator that adds a `DeprecationWarning` and a name to `func`. | ||
""" | ||
|
||
@wraps(func) | ||
def wrapper(*args, **kwargs): | ||
warnings.warn( | ||
f"Mixed case function naming is deprecated for '{name}'. " | ||
f"Please use '{func.__name__}' instead.", | ||
DeprecationWarning | ||
) | ||
return func(*args, **kwargs) | ||
|
||
wrapper.__name__ = name | ||
return wrapper | ||
|
||
|
||
def rename_func(function, new_name): | ||
if callable(function): | ||
function = wrap_func_naming(function, new_name) | ||
setattr(inspect.getmodule(function), new_name, function) |
File renamed without changes.
Oops, something went wrong.