bonesistools 1.2.3__tar.gz → 1.2.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {bonesistools-1.2.3 → bonesistools-1.2.5}/.gitignore +1 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/PKG-INFO +11 -6
- {bonesistools-1.2.3 → bonesistools-1.2.5}/README.md +3 -3
- {bonesistools-1.2.3 → bonesistools-1.2.5}/pyproject.toml +13 -3
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/__init__.py +4 -8
- bonesistools-1.2.5/src/bonesistools/_typing.py +13 -0
- bonesistools-1.2.5/src/bonesistools/_validation.py +388 -0
- bonesistools-1.2.5/src/bonesistools/_warnings.py +31 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/boolpy/__init__.py +4 -5
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/boolpy/boolean_algebra/_algebra.py +1 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/boolpy/boolean_algebra/_hypercube.py +41 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/boolpy/boolean_algebra/_parser.py +20 -17
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/boolpy/boolean_algebra/_structure.py +10 -5
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/boolpy/boolean_algebra/_typing.py +1 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/boolpy/boolean_network/__init__.py +4 -6
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/boolpy/boolean_network/_network.py +43 -21
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/boolpy/influence_graph/__init__.py +3 -0
- bonesistools-1.2.5/src/bonesistools/boolpy/influence_graph/_distances.py +192 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/boolpy/influence_graph/_influence_graph.py +50 -49
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/boolpy/influence_graph/_parser.py +1 -4
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/boolpy/influence_graph/_scoring.py +13 -15
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/boolpy/plotting/_graphviz.py +3 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/databases/hcop/_orthologs.py +70 -55
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/databases/ncbi/__init__.py +2 -1
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/databases/ncbi/_genesyn.py +78 -48
- bonesistools-1.2.5/src/bonesistools/databases/ncbi/_typing.py +18 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/databases/omnipath/_archive.py +24 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/databases/omnipath/_collectri.py +23 -37
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/databases/omnipath/_dorothea.py +30 -27
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/sctools/_dependencies.py +0 -35
- bonesistools-1.2.5/src/bonesistools/sctools/_metadata.py +21 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/sctools/_typing.py +39 -15
- bonesistools-1.2.5/src/bonesistools/sctools/_validation.py +130 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/sctools/plotting/__init__.py +7 -4
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/sctools/plotting/_barplot.py +94 -5
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/sctools/plotting/_colors.py +12 -27
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/sctools/plotting/_density.py +125 -21
- bonesistools-1.2.3/src/bonesistools/sctools/plotting/_boxplot.py → bonesistools-1.2.5/src/bonesistools/sctools/plotting/_distribution.py +148 -10
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/sctools/plotting/_figure.py +2 -1
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/sctools/plotting/_graph.py +92 -19
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/sctools/plotting/_scatterplot.py +93 -51
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/sctools/preprocessing/__init__.py +14 -7
- bonesistools-1.2.5/src/bonesistools/sctools/preprocessing/_duplicates.py +431 -0
- bonesistools-1.2.5/src/bonesistools/sctools/preprocessing/_genename.py +210 -0
- bonesistools-1.2.5/src/bonesistools/sctools/preprocessing/_simple.py +160 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/sctools/preprocessing/_transfer.py +254 -10
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/sctools/tools/__init__.py +25 -6
- bonesistools-1.2.5/src/bonesistools/sctools/tools/_classification.py +206 -0
- bonesistools-1.2.5/src/bonesistools/sctools/tools/_clustering.py +264 -0
- bonesistools-1.2.5/src/bonesistools/sctools/tools/_embedding.py +719 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/sctools/tools/_graph.py +21 -18
- bonesistools-1.2.5/src/bonesistools/sctools/tools/_markers.py +625 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/sctools/tools/_maths.py +52 -9
- bonesistools-1.2.5/src/bonesistools/sctools/tools/_neighbors.py +1915 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/sctools/tools/_regress.py +44 -4
- bonesistools-1.2.5/src/bonesistools/sctools/tools/_stats.py +494 -0
- bonesistools-1.2.5/src/bonesistools/sctools/tools/_utils.py +442 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/sctools/tools/_write.py +2 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/tests/bpy/test_aggregated_influence_graph.py +26 -18
- {bonesistools-1.2.3 → bonesistools-1.2.5}/tests/bpy/test_boolean_algebra.py +5 -4
- {bonesistools-1.2.3 → bonesistools-1.2.5}/tests/bpy/test_boolean_network.py +41 -27
- {bonesistools-1.2.3 → bonesistools-1.2.5}/tests/bpy/test_boolean_network_ensemble.py +23 -11
- {bonesistools-1.2.3 → bonesistools-1.2.5}/tests/bpy/test_hypercube.py +8 -6
- {bonesistools-1.2.3 → bonesistools-1.2.5}/tests/bpy/test_hypercube_collection.py +4 -3
- {bonesistools-1.2.3 → bonesistools-1.2.5}/tests/bpy/test_influence_graph.py +34 -18
- bonesistools-1.2.5/tests/bpy/test_influence_graph_distances.py +219 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/tests/bpy/test_influence_graph_parser.py +11 -6
- {bonesistools-1.2.3 → bonesistools-1.2.5}/tests/dbs/test_hcop.py +107 -2
- bonesistools-1.2.5/tests/dbs/test_hcop_orthologs.py +217 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/tests/dbs/test_ncbi.py +167 -13
- {bonesistools-1.2.3 → bonesistools-1.2.5}/tests/dbs/test_omnipath.py +15 -13
- bonesistools-1.2.3/tests/dbs/test_omnipath_reproducibility.py → bonesistools-1.2.5/tests/reproducibility/test_reproducibility_omnipath.py +6 -9
- bonesistools-1.2.5/tests/reproducibility/test_reproducibility_stats.py +35 -0
- bonesistools-1.2.5/tests/reproducibility/test_reproducibility_workflow.py +243 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/tests/sct/conftest.py +3 -2
- {bonesistools-1.2.3 → bonesistools-1.2.5}/tests/sct/plotting/test_barplot.py +34 -7
- {bonesistools-1.2.3 → bonesistools-1.2.5}/tests/sct/plotting/test_colors.py +3 -2
- {bonesistools-1.2.3 → bonesistools-1.2.5}/tests/sct/plotting/test_density.py +1 -1
- bonesistools-1.2.3/tests/sct/plotting/test_boxplot.py → bonesistools-1.2.5/tests/sct/plotting/test_distribution.py +70 -38
- {bonesistools-1.2.3 → bonesistools-1.2.5}/tests/sct/plotting/test_figure.py +2 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/tests/sct/plotting/test_graph.py +2 -2
- {bonesistools-1.2.3 → bonesistools-1.2.5}/tests/sct/plotting/test_scatterplot.py +33 -5
- bonesistools-1.2.5/tests/sct/preprocessing/test_duplicates.py +201 -0
- bonesistools-1.2.5/tests/sct/preprocessing/test_genename.py +332 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/tests/sct/preprocessing/test_simple.py +14 -12
- {bonesistools-1.2.3 → bonesistools-1.2.5}/tests/sct/preprocessing/test_transfer_obs.py +27 -22
- {bonesistools-1.2.3 → bonesistools-1.2.5}/tests/sct/test_typing.py +7 -4
- bonesistools-1.2.5/tests/sct/tools/test_clustering.py +101 -0
- bonesistools-1.2.5/tests/sct/tools/test_conversion.py +48 -0
- bonesistools-1.2.5/tests/sct/tools/test_embedding.py +464 -0
- bonesistools-1.2.5/tests/sct/tools/test_graph_neighbors_classification.py +517 -0
- bonesistools-1.2.3/tests/sct/tools/test_knnbs.py → bonesistools-1.2.5/tests/sct/tools/test_knnsc.py +280 -77
- bonesistools-1.2.5/tests/sct/tools/test_markers.py +492 -0
- bonesistools-1.2.5/tests/sct/tools/test_maths.py +47 -0
- bonesistools-1.2.5/tests/sct/tools/test_stats.py +550 -0
- bonesistools-1.2.5/tests/sct/tools/test_utils.py +207 -0
- bonesistools-1.2.5/tests/test_validation.py +39 -0
- bonesistools-1.2.3/src/bonesistools/databases/ncbi/_typing.py +0 -6
- bonesistools-1.2.3/src/bonesistools/sctools/preprocessing/_genename.py +0 -246
- bonesistools-1.2.3/src/bonesistools/sctools/preprocessing/_simple.py +0 -260
- bonesistools-1.2.3/src/bonesistools/sctools/tools/_classification.py +0 -146
- bonesistools-1.2.3/src/bonesistools/sctools/tools/_markers.py +0 -360
- bonesistools-1.2.3/src/bonesistools/sctools/tools/_neighbors.py +0 -930
- bonesistools-1.2.3/src/bonesistools/sctools/tools/_utils.py +0 -217
- bonesistools-1.2.3/tests/dbs/test_hcop_orthologs.py +0 -105
- bonesistools-1.2.3/tests/sct/preprocessing/test_genename.py +0 -177
- bonesistools-1.2.3/tests/sct/tools/test_graph_neighbors_classification.py +0 -186
- bonesistools-1.2.3/tests/sct/tools/test_utils_conversion_maths.py +0 -533
- {bonesistools-1.2.3 → bonesistools-1.2.5}/LICENSE +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/_compat.py +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/boolpy/boolean_algebra/__init__.py +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/boolpy/boolean_algebra/_boolean.py +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/boolpy/boolean_algebra/_representation.py +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/boolpy/boolean_network/_parser.py +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/boolpy/boolean_network/_typing.py +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/boolpy/influence_graph/_algorithms.py +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/boolpy/influence_graph/_typing.py +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/boolpy/plotting/__init__.py +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/boolpy/plotting/_styles.py +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/boolpy/plotting/_svg.py +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/databases/__init__.py +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/databases/hcop/__init__.py +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/databases/hcop/data/human_anole_lizard_hcop.tsv.gz +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/databases/hcop/data/human_c.elegans_hcop.tsv.gz +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/databases/hcop/data/human_cat_hcop.tsv.gz +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/databases/hcop/data/human_cattle_hcop.tsv.gz +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/databases/hcop/data/human_chicken_hcop.tsv.gz +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/databases/hcop/data/human_chimpanzee_hcop.tsv.gz +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/databases/hcop/data/human_dog_hcop.tsv.gz +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/databases/hcop/data/human_fruitfly_hcop.tsv.gz +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/databases/hcop/data/human_horse_hcop.tsv.gz +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/databases/hcop/data/human_macaque_hcop.tsv.gz +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/databases/hcop/data/human_mouse_hcop.tsv.gz +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/databases/hcop/data/human_opossum_hcop.tsv.gz +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/databases/hcop/data/human_pig_hcop.tsv.gz +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/databases/hcop/data/human_platypus_hcop.tsv.gz +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/databases/hcop/data/human_rat_hcop.tsv.gz +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/databases/hcop/data/human_s.cerevisiae_hcop.tsv.gz +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/databases/hcop/data/human_s.pombe_hcop.tsv.gz +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/databases/hcop/data/human_xenopus_hcop.tsv.gz +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/databases/hcop/data/human_zebrafish_hcop.tsv.gz +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/databases/ncbi/data/gi/escherichia_coli_gene_info.tsv.gz +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/databases/ncbi/data/gi/homo_sapiens_gene_info.tsv.gz +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/databases/ncbi/data/gi/mus_musculus_gene_info.tsv.gz +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/databases/omnipath/__init__.py +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/grntools/__init__.py +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/py.typed +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/sctools/__init__.py +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/sctools/datasets/__init__.py +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/sctools/datasets/nestorowa_hvg.h5ad +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/sctools/plotting/_typing.py +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/sctools/plotting/_utils.py +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/src/bonesistools/sctools/tools/_conversion.py +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/tests/bpy/conftest.py +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/tests/bpy/test_influence_graph_scoring.py +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/tests/bpy/test_partial_boolean.py +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/tests/bpy/test_plotting_styles.py +0 -0
- {bonesistools-1.2.3 → bonesistools-1.2.5}/tests/sct/tools/test_write.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bonesistools
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.5
|
|
4
4
|
Summary: Bioinformatics toolkit for upstream and downstream analyses around the BoNesis framework
|
|
5
5
|
Project-URL: Repository, https://github.com/bnediction/bonesistools
|
|
6
6
|
Author: Théo Roncalli
|
|
@@ -556,16 +556,19 @@ Requires-Dist: matplotlib>=3.5
|
|
|
556
556
|
Requires-Dist: networkx>=2.1
|
|
557
557
|
Requires-Dist: numpy>=1.21
|
|
558
558
|
Requires-Dist: pandas>=1.3.5
|
|
559
|
+
Requires-Dist: scikit-learn>=1.0
|
|
559
560
|
Requires-Dist: scipy>=1.7
|
|
560
561
|
Requires-Dist: typing-extensions>=4.0
|
|
561
562
|
Provides-Extra: all
|
|
562
563
|
Requires-Dist: graphviz>=0.20; extra == 'all'
|
|
564
|
+
Requires-Dist: igraph>=0.10; extra == 'all'
|
|
565
|
+
Requires-Dist: leidenalg>=0.10; extra == 'all'
|
|
563
566
|
Requires-Dist: mpbn>=4.1; extra == 'all'
|
|
564
567
|
Requires-Dist: mudata>=0.3.1; extra == 'all'
|
|
565
568
|
Requires-Dist: multiprocess>=0.70.18; extra == 'all'
|
|
566
569
|
Requires-Dist: pydot>=3.0.2; extra == 'all'
|
|
567
|
-
Requires-Dist: scikit-learn>=1.0; extra == 'all'
|
|
568
570
|
Requires-Dist: seaborn>=0.11; extra == 'all'
|
|
571
|
+
Requires-Dist: umap-learn>=0.5; extra == 'all'
|
|
569
572
|
Provides-Extra: graphviz
|
|
570
573
|
Requires-Dist: graphviz>=0.20; extra == 'graphviz'
|
|
571
574
|
Provides-Extra: mpbn
|
|
@@ -573,7 +576,9 @@ Requires-Dist: mpbn>=4.1; extra == 'mpbn'
|
|
|
573
576
|
Provides-Extra: mudata
|
|
574
577
|
Requires-Dist: mudata>=0.3.1; extra == 'mudata'
|
|
575
578
|
Provides-Extra: sctools
|
|
576
|
-
Requires-Dist:
|
|
579
|
+
Requires-Dist: igraph>=0.10; extra == 'sctools'
|
|
580
|
+
Requires-Dist: leidenalg>=0.10; extra == 'sctools'
|
|
581
|
+
Requires-Dist: umap-learn>=0.5; extra == 'sctools'
|
|
577
582
|
Description-Content-Type: text/markdown
|
|
578
583
|
|
|
579
584
|
[](https://github.com/bnediction/bonesistools/actions/workflows/tests.yml)
|
|
@@ -611,7 +616,7 @@ import bonesistools as bt
|
|
|
611
616
|
|
|
612
617
|
## Single-cell tools
|
|
613
618
|
|
|
614
|
-
`bt.sct`
|
|
619
|
+
`bt.sct` is inspired by [Scanpy](https://github.com/scverse/scanpy) while providing additional and complementary features for single-cell analyses.
|
|
615
620
|
|
|
616
621
|
Submodules:
|
|
617
622
|
|
|
@@ -627,7 +632,7 @@ Submodules:
|
|
|
627
632
|
|
|
628
633
|
- plotting: `bt.sct.pl`
|
|
629
634
|
- embedding, density, composition and graph visualizations
|
|
630
|
-
-
|
|
635
|
+
- distribution utilities
|
|
631
636
|
|
|
632
637
|
- datasets: `bt.sct.datasets`
|
|
633
638
|
- packaged reference datasets
|
|
@@ -694,7 +699,7 @@ Submodules:
|
|
|
694
699
|
Example:
|
|
695
700
|
|
|
696
701
|
```python
|
|
697
|
-
genesyn = bt.dbs.ncbi.
|
|
702
|
+
genesyn = bt.dbs.ncbi.genesyn()
|
|
698
703
|
|
|
699
704
|
grn = bt.dbs.omnipath.collectri(
|
|
700
705
|
organism="mouse",
|
|
@@ -33,7 +33,7 @@ import bonesistools as bt
|
|
|
33
33
|
|
|
34
34
|
## Single-cell tools
|
|
35
35
|
|
|
36
|
-
`bt.sct`
|
|
36
|
+
`bt.sct` is inspired by [Scanpy](https://github.com/scverse/scanpy) while providing additional and complementary features for single-cell analyses.
|
|
37
37
|
|
|
38
38
|
Submodules:
|
|
39
39
|
|
|
@@ -49,7 +49,7 @@ Submodules:
|
|
|
49
49
|
|
|
50
50
|
- plotting: `bt.sct.pl`
|
|
51
51
|
- embedding, density, composition and graph visualizations
|
|
52
|
-
-
|
|
52
|
+
- distribution utilities
|
|
53
53
|
|
|
54
54
|
- datasets: `bt.sct.datasets`
|
|
55
55
|
- packaged reference datasets
|
|
@@ -116,7 +116,7 @@ Submodules:
|
|
|
116
116
|
Example:
|
|
117
117
|
|
|
118
118
|
```python
|
|
119
|
-
genesyn = bt.dbs.ncbi.
|
|
119
|
+
genesyn = bt.dbs.ncbi.genesyn()
|
|
120
120
|
|
|
121
121
|
grn = bt.dbs.omnipath.collectri(
|
|
122
122
|
organism="mouse",
|
|
@@ -5,7 +5,7 @@ build-backend = "hatchling.build"
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "bonesistools"
|
|
7
7
|
description = "Bioinformatics toolkit for upstream and downstream analyses around the BoNesis framework"
|
|
8
|
-
version = "1.2.
|
|
8
|
+
version = "1.2.5"
|
|
9
9
|
license = {file = "LICENSE"}
|
|
10
10
|
credits = ["BNeDiction", "PEPR Santé Numérique 2030"]
|
|
11
11
|
authors = [
|
|
@@ -46,6 +46,7 @@ dependencies = [
|
|
|
46
46
|
"numpy>=1.21",
|
|
47
47
|
"pandas>=1.3.5",
|
|
48
48
|
"scipy>=1.7",
|
|
49
|
+
"scikit-learn>=1.0",
|
|
49
50
|
"networkx>=2.1",
|
|
50
51
|
"matplotlib>=3.5",
|
|
51
52
|
"h5py>=3.7",
|
|
@@ -71,14 +72,20 @@ all = [
|
|
|
71
72
|
"mudata>=0.3.1",
|
|
72
73
|
"multiprocess>=0.70.18",
|
|
73
74
|
"pydot>=3.0.2",
|
|
74
|
-
"
|
|
75
|
+
"igraph>=0.10",
|
|
76
|
+
"leidenalg>=0.10",
|
|
75
77
|
"seaborn>=0.11",
|
|
78
|
+
"umap-learn>=0.5",
|
|
76
79
|
"mpbn>=4.1",
|
|
77
80
|
]
|
|
78
81
|
graphviz = [ "graphviz>=0.20" ]
|
|
79
82
|
mudata = [ "mudata>=0.3.1" ]
|
|
80
83
|
mpbn = [ "mpbn>=4.1" ]
|
|
81
|
-
sctools = [
|
|
84
|
+
sctools = [
|
|
85
|
+
"igraph>=0.10",
|
|
86
|
+
"leidenalg>=0.10",
|
|
87
|
+
"umap-learn>=0.5",
|
|
88
|
+
]
|
|
82
89
|
|
|
83
90
|
[tool.hatch.build.targets.sdist]
|
|
84
91
|
ignore-vcs = true
|
|
@@ -113,6 +120,9 @@ select = ["E", "F", "I"]
|
|
|
113
120
|
typing-modules = ["bonesistools._compat"]
|
|
114
121
|
|
|
115
122
|
[tool.pytest.ini_options]
|
|
123
|
+
norecursedirs = [
|
|
124
|
+
"tests/reproducibility",
|
|
125
|
+
]
|
|
116
126
|
filterwarnings = [
|
|
117
127
|
"ignore:The NumPy module was reloaded:UserWarning",
|
|
118
128
|
]
|
|
@@ -22,7 +22,6 @@ from __future__ import annotations
|
|
|
22
22
|
|
|
23
23
|
import importlib as _importlib
|
|
24
24
|
import sys as _sys
|
|
25
|
-
import warnings as _warnings
|
|
26
25
|
from types import ModuleType as _ModuleType
|
|
27
26
|
from typing import TYPE_CHECKING as _TYPE_CHECKING
|
|
28
27
|
from typing import List as _List
|
|
@@ -30,6 +29,7 @@ from typing import List as _List
|
|
|
30
29
|
from . import boolpy as bpy
|
|
31
30
|
from . import databases as dbs
|
|
32
31
|
from . import sctools as sct
|
|
32
|
+
from ._warnings import _warn_deprecated
|
|
33
33
|
|
|
34
34
|
if _TYPE_CHECKING:
|
|
35
35
|
from . import grntools as grn
|
|
@@ -66,13 +66,9 @@ _sys.modules.update(
|
|
|
66
66
|
|
|
67
67
|
def __getattr__(name: str) -> _ModuleType:
|
|
68
68
|
if name == "grn":
|
|
69
|
-
|
|
70
|
-
"`bt.grn`
|
|
71
|
-
"
|
|
72
|
-
)
|
|
73
|
-
_warnings.warn(
|
|
74
|
-
message,
|
|
75
|
-
FutureWarning,
|
|
69
|
+
_warn_deprecated(
|
|
70
|
+
"`bt.grn`",
|
|
71
|
+
replacement="`bt.bpy.ig`",
|
|
76
72
|
stacklevel=2,
|
|
77
73
|
)
|
|
78
74
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
|
|
3
|
+
from types import ModuleType
|
|
4
|
+
from typing import Optional, Union
|
|
5
|
+
|
|
6
|
+
import numpy as np
|
|
7
|
+
|
|
8
|
+
from ._compat import Literal
|
|
9
|
+
|
|
10
|
+
RandomStateSeed = Optional[Union[int, np.random.RandomState, ModuleType]]
|
|
11
|
+
AutoInteger = Union[int, Literal["auto"]]
|
|
12
|
+
DataFrameAxis = Literal["index", "columns"]
|
|
13
|
+
FileOrientation = Literal["rows", "columns"]
|
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
|
|
3
|
+
import numbers
|
|
4
|
+
import re
|
|
5
|
+
from typing import Callable, Iterable, Optional, TypeVar, Union, overload
|
|
6
|
+
|
|
7
|
+
import numpy as np
|
|
8
|
+
|
|
9
|
+
from ._compat import Literal
|
|
10
|
+
from ._typing import (
|
|
11
|
+
DataFrameAxis,
|
|
12
|
+
FileOrientation,
|
|
13
|
+
RandomStateSeed,
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
T = TypeVar("T", bound=str)
|
|
17
|
+
F = TypeVar("F", bound=Callable[..., object])
|
|
18
|
+
|
|
19
|
+
_MEMORY_SIZE_PATTERN = re.compile(
|
|
20
|
+
r"^\s*(?P<value>[0-9]+(?:\.[0-9]+)?)\s*(?P<unit>[KMGT]i?B)\s*$",
|
|
21
|
+
re.IGNORECASE,
|
|
22
|
+
)
|
|
23
|
+
_MEMORY_SIZE_UNITS = {
|
|
24
|
+
"KB": 10**3,
|
|
25
|
+
"MB": 10**6,
|
|
26
|
+
"GB": 10**9,
|
|
27
|
+
"TB": 10**12,
|
|
28
|
+
"KIB": 2**10,
|
|
29
|
+
"MIB": 2**20,
|
|
30
|
+
"GIB": 2**30,
|
|
31
|
+
"TIB": 2**40,
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def _format_choices(choices: Iterable[str], *, include_none: bool = False) -> str:
|
|
36
|
+
|
|
37
|
+
choices = tuple(choices)
|
|
38
|
+
formatted = tuple(repr(choice) for choice in choices)
|
|
39
|
+
if include_none:
|
|
40
|
+
formatted = formatted + ("None",)
|
|
41
|
+
if len(formatted) == 1:
|
|
42
|
+
return formatted[0]
|
|
43
|
+
if len(formatted) == 2:
|
|
44
|
+
return f"{formatted[0]} or {formatted[1]}"
|
|
45
|
+
return f"{', '.join(formatted[:-1])} or {formatted[-1]}"
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
@overload
|
|
49
|
+
def _as_literal(
|
|
50
|
+
value: str,
|
|
51
|
+
*,
|
|
52
|
+
choices: Iterable[T],
|
|
53
|
+
name: str,
|
|
54
|
+
allow_none: Literal[False] = False,
|
|
55
|
+
) -> T: ...
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
@overload
|
|
59
|
+
def _as_literal(
|
|
60
|
+
value: Optional[str],
|
|
61
|
+
*,
|
|
62
|
+
choices: Iterable[T],
|
|
63
|
+
name: str,
|
|
64
|
+
allow_none: Literal[True],
|
|
65
|
+
) -> Optional[T]: ...
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def _as_literal(
|
|
69
|
+
value: Optional[str],
|
|
70
|
+
*,
|
|
71
|
+
choices: Iterable[T],
|
|
72
|
+
name: str,
|
|
73
|
+
allow_none: bool = False,
|
|
74
|
+
) -> Optional[T]:
|
|
75
|
+
|
|
76
|
+
if value is None and allow_none:
|
|
77
|
+
return None
|
|
78
|
+
|
|
79
|
+
if not isinstance(value, str):
|
|
80
|
+
expected = f"{str} or None" if allow_none else str
|
|
81
|
+
raise TypeError(
|
|
82
|
+
f"unsupported argument type for '{name}': "
|
|
83
|
+
f"expected {expected} but received {type(value)}"
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
resolved_choices = tuple(choices)
|
|
87
|
+
for choice in resolved_choices:
|
|
88
|
+
if value == choice:
|
|
89
|
+
return choice
|
|
90
|
+
|
|
91
|
+
expected = _format_choices(resolved_choices, include_none=allow_none)
|
|
92
|
+
raise ValueError(
|
|
93
|
+
f"invalid argument value for '{name}': "
|
|
94
|
+
f"expected one of {expected} but received {value!r}"
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
@overload
|
|
99
|
+
def _as_string(
|
|
100
|
+
value: str,
|
|
101
|
+
name: str,
|
|
102
|
+
*,
|
|
103
|
+
allow_none: Literal[False] = False,
|
|
104
|
+
) -> str: ...
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
@overload
|
|
108
|
+
def _as_string(
|
|
109
|
+
value: Optional[str],
|
|
110
|
+
name: str,
|
|
111
|
+
*,
|
|
112
|
+
allow_none: Literal[True],
|
|
113
|
+
) -> Optional[str]: ...
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
def _as_string(
|
|
117
|
+
value: Optional[str],
|
|
118
|
+
name: str,
|
|
119
|
+
*,
|
|
120
|
+
allow_none: bool = False,
|
|
121
|
+
) -> Optional[str]:
|
|
122
|
+
|
|
123
|
+
if value is None and allow_none:
|
|
124
|
+
return None
|
|
125
|
+
|
|
126
|
+
if not isinstance(value, str):
|
|
127
|
+
expected = f"{str} or None" if allow_none else str
|
|
128
|
+
raise TypeError(
|
|
129
|
+
f"unsupported argument type for '{name}': "
|
|
130
|
+
f"expected {expected} but received {type(value)}"
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
return value
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
@overload
|
|
137
|
+
def _as_boolean(
|
|
138
|
+
value: bool,
|
|
139
|
+
name: str,
|
|
140
|
+
*,
|
|
141
|
+
allow_none: Literal[False] = False,
|
|
142
|
+
) -> bool: ...
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
@overload
|
|
146
|
+
def _as_boolean(
|
|
147
|
+
value: Optional[bool],
|
|
148
|
+
name: str,
|
|
149
|
+
*,
|
|
150
|
+
allow_none: Literal[True],
|
|
151
|
+
) -> Optional[bool]: ...
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
def _as_boolean(
|
|
155
|
+
value: Optional[bool],
|
|
156
|
+
name: str,
|
|
157
|
+
*,
|
|
158
|
+
allow_none: bool = False,
|
|
159
|
+
) -> Optional[bool]:
|
|
160
|
+
|
|
161
|
+
if value is None and allow_none:
|
|
162
|
+
return None
|
|
163
|
+
|
|
164
|
+
if not isinstance(value, bool):
|
|
165
|
+
expected = f"{bool} or None" if allow_none else bool
|
|
166
|
+
raise TypeError(
|
|
167
|
+
f"unsupported argument type for '{name}': "
|
|
168
|
+
f"expected {expected} but received {type(value)}"
|
|
169
|
+
)
|
|
170
|
+
|
|
171
|
+
return value
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
@overload
|
|
175
|
+
def _as_callable(
|
|
176
|
+
value: F,
|
|
177
|
+
name: str,
|
|
178
|
+
*,
|
|
179
|
+
allow_none: Literal[False] = False,
|
|
180
|
+
) -> F: ...
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
@overload
|
|
184
|
+
def _as_callable(
|
|
185
|
+
value: Optional[F],
|
|
186
|
+
name: str,
|
|
187
|
+
*,
|
|
188
|
+
allow_none: Literal[True],
|
|
189
|
+
) -> Optional[F]: ...
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
def _as_callable(
|
|
193
|
+
value: Optional[F],
|
|
194
|
+
name: str,
|
|
195
|
+
*,
|
|
196
|
+
allow_none: bool = False,
|
|
197
|
+
) -> Optional[F]:
|
|
198
|
+
|
|
199
|
+
if value is None and allow_none:
|
|
200
|
+
return None
|
|
201
|
+
|
|
202
|
+
if not callable(value):
|
|
203
|
+
expected = "callable object or None" if allow_none else "callable object"
|
|
204
|
+
raise TypeError(
|
|
205
|
+
f"unsupported argument type for '{name}': "
|
|
206
|
+
f"expected {expected} but received {type(value)}"
|
|
207
|
+
)
|
|
208
|
+
|
|
209
|
+
return value
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
def _as_positive_number(value: float, name: str) -> float:
|
|
213
|
+
|
|
214
|
+
if not isinstance(value, (int, float)) or isinstance(value, bool):
|
|
215
|
+
raise TypeError(
|
|
216
|
+
f"unsupported argument type for '{name}': "
|
|
217
|
+
f"expected {float} but received {type(value)}"
|
|
218
|
+
)
|
|
219
|
+
|
|
220
|
+
value = float(value)
|
|
221
|
+
if value <= 0:
|
|
222
|
+
raise ValueError(
|
|
223
|
+
f"invalid argument value for '{name}': "
|
|
224
|
+
f"expected positive value but received {value!r}"
|
|
225
|
+
)
|
|
226
|
+
|
|
227
|
+
return value
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
def _as_non_negative_number(value: float, name: str) -> float:
|
|
231
|
+
|
|
232
|
+
if not isinstance(value, (int, float)) or isinstance(value, bool):
|
|
233
|
+
raise TypeError(
|
|
234
|
+
f"unsupported argument type for '{name}': "
|
|
235
|
+
f"expected {float} but received {type(value)}"
|
|
236
|
+
)
|
|
237
|
+
|
|
238
|
+
value = float(value)
|
|
239
|
+
if value < 0:
|
|
240
|
+
raise ValueError(
|
|
241
|
+
f"invalid argument value for '{name}': "
|
|
242
|
+
f"expected non-negative value but received {value!r}"
|
|
243
|
+
)
|
|
244
|
+
|
|
245
|
+
return value
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
def _as_positive_integer(value: Union[int, float], name: str) -> int:
|
|
249
|
+
|
|
250
|
+
if not isinstance(value, (int, float)) or isinstance(value, bool):
|
|
251
|
+
raise TypeError(
|
|
252
|
+
f"unsupported argument type for '{name}': "
|
|
253
|
+
f"expected {int} but received {type(value)}"
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
if value <= 0:
|
|
257
|
+
raise ValueError(
|
|
258
|
+
f"invalid argument value for '{name}': "
|
|
259
|
+
f"expected non-null positive value but received {value!r}"
|
|
260
|
+
)
|
|
261
|
+
|
|
262
|
+
if isinstance(value, float) and not value.is_integer():
|
|
263
|
+
raise ValueError(
|
|
264
|
+
f"invalid argument value for '{name}': "
|
|
265
|
+
f"expected integer but received {value!r}"
|
|
266
|
+
)
|
|
267
|
+
|
|
268
|
+
return int(value)
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
def _as_non_negative_integer(value: Union[int, float], name: str) -> int:
|
|
272
|
+
|
|
273
|
+
if not isinstance(value, (int, float)) or isinstance(value, bool):
|
|
274
|
+
raise TypeError(
|
|
275
|
+
f"unsupported argument type for '{name}': "
|
|
276
|
+
f"expected {int} but received {type(value)}"
|
|
277
|
+
)
|
|
278
|
+
|
|
279
|
+
if value < 0:
|
|
280
|
+
raise ValueError(
|
|
281
|
+
f"invalid argument value for '{name}': "
|
|
282
|
+
f"expected non-negative value but received {value!r}"
|
|
283
|
+
)
|
|
284
|
+
|
|
285
|
+
if isinstance(value, float) and not value.is_integer():
|
|
286
|
+
raise ValueError(
|
|
287
|
+
f"invalid argument value for '{name}': "
|
|
288
|
+
f"expected integer but received {value!r}"
|
|
289
|
+
)
|
|
290
|
+
|
|
291
|
+
return int(value)
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
def _as_memory_size(value: Union[int, str], name: str) -> int:
|
|
295
|
+
|
|
296
|
+
if isinstance(value, bool) or not isinstance(value, (int, str)):
|
|
297
|
+
raise TypeError(
|
|
298
|
+
f"unsupported argument type for '{name}': "
|
|
299
|
+
f"expected {int} or {str} but received {type(value)}"
|
|
300
|
+
)
|
|
301
|
+
|
|
302
|
+
if isinstance(value, int):
|
|
303
|
+
if value <= 0:
|
|
304
|
+
raise ValueError(
|
|
305
|
+
f"invalid argument value for '{name}': "
|
|
306
|
+
f"expected positive memory size but received {value!r}"
|
|
307
|
+
)
|
|
308
|
+
return value
|
|
309
|
+
|
|
310
|
+
match = _MEMORY_SIZE_PATTERN.match(value)
|
|
311
|
+
if match is None:
|
|
312
|
+
raise ValueError(
|
|
313
|
+
f"invalid argument value for '{name}': "
|
|
314
|
+
"expected memory size with unit KB, MB, GB, TB, KiB, MiB, GiB or TiB "
|
|
315
|
+
f"but received {value!r}"
|
|
316
|
+
)
|
|
317
|
+
|
|
318
|
+
size = float(match.group("value"))
|
|
319
|
+
unit = match.group("unit").upper()
|
|
320
|
+
bytes_size = int(size * _MEMORY_SIZE_UNITS[unit])
|
|
321
|
+
if bytes_size <= 0:
|
|
322
|
+
raise ValueError(
|
|
323
|
+
f"invalid argument value for '{name}': "
|
|
324
|
+
f"expected positive memory size but received {value!r}"
|
|
325
|
+
)
|
|
326
|
+
|
|
327
|
+
return bytes_size
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
def _as_probability(value: float, name: str) -> float:
|
|
331
|
+
|
|
332
|
+
if not isinstance(value, (int, float)) or isinstance(value, bool):
|
|
333
|
+
raise TypeError(
|
|
334
|
+
f"unsupported argument type for '{name}': "
|
|
335
|
+
f"expected {float} but received {type(value)}"
|
|
336
|
+
)
|
|
337
|
+
|
|
338
|
+
value = float(value)
|
|
339
|
+
if not 0 <= value <= 1:
|
|
340
|
+
raise ValueError(
|
|
341
|
+
f"invalid argument value for '{name}': "
|
|
342
|
+
f"expected value between 0 and 1 but received {value!r}"
|
|
343
|
+
)
|
|
344
|
+
|
|
345
|
+
return value
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
def _as_seed(seed: RandomStateSeed) -> np.random.RandomState:
|
|
349
|
+
|
|
350
|
+
if seed is None or seed is np.random:
|
|
351
|
+
return np.random.mtrand._rand
|
|
352
|
+
if isinstance(seed, numbers.Integral):
|
|
353
|
+
return np.random.RandomState(int(seed))
|
|
354
|
+
if isinstance(seed, np.random.RandomState):
|
|
355
|
+
return seed
|
|
356
|
+
raise ValueError(
|
|
357
|
+
f"invalid argument value for 'seed': "
|
|
358
|
+
f"expected None, np.random, integer seed or np.random.RandomState "
|
|
359
|
+
f"but received {seed!r}"
|
|
360
|
+
)
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
def _as_dataframe_axis(axis: Union[int, str]) -> DataFrameAxis:
|
|
364
|
+
|
|
365
|
+
if isinstance(axis, str) and axis == "index":
|
|
366
|
+
return "index"
|
|
367
|
+
if isinstance(axis, str) and axis == "columns":
|
|
368
|
+
return "columns"
|
|
369
|
+
if isinstance(axis, int) and not isinstance(axis, bool) and axis == 0:
|
|
370
|
+
return "index"
|
|
371
|
+
if isinstance(axis, int) and not isinstance(axis, bool) and axis == 1:
|
|
372
|
+
return "columns"
|
|
373
|
+
|
|
374
|
+
raise ValueError(
|
|
375
|
+
f"invalid argument value for 'axis': "
|
|
376
|
+
f"expected 0, 1, 'index' or 'columns' but received {axis!r}"
|
|
377
|
+
)
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
def _as_orientation(orientation: str) -> FileOrientation:
|
|
381
|
+
|
|
382
|
+
if orientation == "rows" or orientation == "columns":
|
|
383
|
+
return orientation
|
|
384
|
+
|
|
385
|
+
raise ValueError(
|
|
386
|
+
f"invalid argument value for 'orientation': "
|
|
387
|
+
f"expected 'rows' or 'columns' but received {orientation!r}"
|
|
388
|
+
)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
|
|
3
|
+
import warnings
|
|
4
|
+
from typing import Optional
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def _warn_deprecated(
|
|
8
|
+
name: str,
|
|
9
|
+
*,
|
|
10
|
+
replacement: Optional[str] = None,
|
|
11
|
+
stacklevel: int = 2,
|
|
12
|
+
) -> None:
|
|
13
|
+
|
|
14
|
+
message = f"{name} is deprecated and will be removed in 2.0.0"
|
|
15
|
+
if replacement is not None:
|
|
16
|
+
message = f"{message}; use {replacement} instead"
|
|
17
|
+
warnings.warn(f"{message}.", FutureWarning, stacklevel=stacklevel)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def _warn_deprecated_argument(
|
|
21
|
+
old_name: str,
|
|
22
|
+
new_name: str,
|
|
23
|
+
*,
|
|
24
|
+
stacklevel: int = 2,
|
|
25
|
+
) -> None:
|
|
26
|
+
|
|
27
|
+
_warn_deprecated(
|
|
28
|
+
f"`{old_name}`",
|
|
29
|
+
replacement=f"`{new_name}`",
|
|
30
|
+
stacklevel=stacklevel,
|
|
31
|
+
)
|
|
@@ -21,13 +21,13 @@ pl
|
|
|
21
21
|
from __future__ import annotations
|
|
22
22
|
|
|
23
23
|
import sys as _sys
|
|
24
|
-
import warnings as _warnings
|
|
25
24
|
from types import ModuleType as _ModuleType
|
|
26
25
|
from typing import Dict as _Dict
|
|
27
26
|
from typing import List as _List
|
|
28
27
|
from typing import Tuple as _Tuple
|
|
29
28
|
from typing import cast as _cast
|
|
30
29
|
|
|
30
|
+
from .._warnings import _warn_deprecated
|
|
31
31
|
from . import boolean_algebra as ba
|
|
32
32
|
from . import boolean_network as bn
|
|
33
33
|
from . import influence_graph as ig
|
|
@@ -65,10 +65,9 @@ __all__ = [
|
|
|
65
65
|
def __getattr__(name: str) -> object:
|
|
66
66
|
if name in _DEPRECATED:
|
|
67
67
|
module_alias, attr = _DEPRECATED[name]
|
|
68
|
-
|
|
69
|
-
f"`bt.bpy.{name}`
|
|
70
|
-
f"`bt.bpy.{module_alias}.{attr}`
|
|
71
|
-
DeprecationWarning,
|
|
68
|
+
_warn_deprecated(
|
|
69
|
+
f"`bt.bpy.{name}`",
|
|
70
|
+
replacement=f"`bt.bpy.{module_alias}.{attr}`",
|
|
72
71
|
stacklevel=2,
|
|
73
72
|
)
|
|
74
73
|
return _cast(object, getattr(_MODULES[module_alias], attr))
|