Skip to content

Commit

Permalink
avoided duplicating exports in api.pl and api.pp
Browse files Browse the repository at this point in the history
  • Loading branch information
falexwolf committed Aug 24, 2017
1 parent b637995 commit 2f871f5
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 44 deletions.
28 changes: 6 additions & 22 deletions scanpy/api/pl.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
# TODO: should not be duplicated from plotting.__init__
from ..plotting.ann_data import scatter, violin
from ..plotting.ann_data import ranking

from ..plotting.preprocessing import filter_genes_dispersion

from ..plotting.tools import pca, pca_loadings, pca_scatter, pca_variance_ratio
from ..plotting.tools import diffmap
from ..plotting.tools import draw_graph
from ..plotting.tools import tsne
from ..plotting.tools import aga, aga_attachedness, aga_graph, aga_path, aga_scatter
from ..plotting.tools import dpt, dpt_scatter, dpt_groups_pseudotime, dpt_timeseries
from ..plotting.tools import louvain
from ..plotting.tools import rank_genes_groups, rank_genes_groups_violin
from ..plotting.tools import sim

from ..plotting.rcmod import reset_rcParams
from ..plotting import palettes

from ..plotting.utils import matrix
from ..plotting.utils import timeseries, timeseries_subplot, timeseries_as_heatmap

# we need this dummy module as otherwise, sphinx cannot produce the overview of
# the api module
#
# importing all ("*") is ok, as scanpy.plotting.__init__ is carefully maintained
# to only contain the functions of the api
from ..plotting import *
10 changes: 6 additions & 4 deletions scanpy/api/pp.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# TODO: this duplicates scanpy.preprocessing.__init__
from ..preprocessing.recipes import recipe_zheng17, recipe_weinreb16
from ..preprocessing.simple import filter_cells, filter_genes, filter_genes_dispersion
from ..preprocessing.simple import log1p, pca, normalize_per_cell, regress_out, scale, subsample
# we need this dummy module as otherwise, sphinx cannot produce the overview of
# the api module
#
# importing all ("*") is ok, as scanpy.preprocessing.__init__ is carefully maintained
# to only contain the functions of the api
from ..preprocessing import *
33 changes: 16 additions & 17 deletions scanpy/plotting/__init__.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
# TODO: should not be duplicated from api.pl
from ..plotting.ann_data import scatter, violin
from ..plotting.ann_data import ranking
from .ann_data import scatter, violin
from .ann_data import ranking

from ..plotting.preprocessing import filter_genes_dispersion
from .preprocessing import filter_genes_dispersion

from ..plotting.tools import pca, pca_loadings, pca_scatter, pca_variance_ratio
from ..plotting.tools import diffmap
from ..plotting.tools import draw_graph
from ..plotting.tools import tsne
from ..plotting.tools import aga, aga_attachedness, aga_graph, aga_path, aga_scatter
from ..plotting.tools import dpt, dpt_scatter, dpt_groups_pseudotime, dpt_timeseries
from ..plotting.tools import louvain
from ..plotting.tools import rank_genes_groups, rank_genes_groups_violin
from ..plotting.tools import sim
from .tools import pca, pca_loadings, pca_scatter, pca_variance_ratio
from .tools import diffmap
from .tools import draw_graph
from .tools import tsne
from .tools import aga, aga_attachedness, aga_graph, aga_path, aga_scatter
from .tools import dpt, dpt_scatter, dpt_groups_pseudotime, dpt_timeseries
from .tools import louvain
from .tools import rank_genes_groups, rank_genes_groups_violin
from .tools import sim

from ..plotting.rcmod import reset_rcParams
from ..plotting import palettes
from .rcmod import reset_rcParams
from . import palettes

from ..plotting.utils import matrix
from ..plotting.utils import timeseries, timeseries_subplot, timeseries_as_heatmap
from .utils import matrix
from .utils import timeseries, timeseries_subplot, timeseries_as_heatmap

# reset matplotlib.rcParams
reset_rcParams()
1 change: 0 additions & 1 deletion scanpy/preprocessing/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# this duplicates scanpy.api.pp
from ..preprocessing.recipes import recipe_zheng17, recipe_weinreb16
from ..preprocessing.simple import filter_cells, filter_genes, filter_genes_dispersion
from ..preprocessing.simple import log1p, pca, normalize_per_cell, regress_out, scale, subsample

0 comments on commit 2f871f5

Please sign in to comment.