Backport PRs #2691 and #2660: Add missing 1.9.6 release notes #2693
Azure Pipelines / scverse.scanpy
succeeded
Oct 17, 2023 in 18m 28s
Build #20231017.5 had test failures
Details
- Failed: 2 (0.05%)
- Passed: 3,840 (96.29%)
- Other: 146 (3.66%)
- Total: 3,988
- 8382 of 11643 lines covered (71.99%)
Annotations
Check failure on line 1 in scanpy/tests/notebooks/test_pbmc3k.py::test_pbmc3k
azure-pipelines / scverse.scanpy
scanpy/tests/notebooks/test_pbmc3k.py::test_pbmc3k
image_comparer = <function image_comparer.<locals>.make_comparer at 0x7f16c0bc68b0>
@needs("leidenalg")
def test_pbmc3k(image_comparer):
save_and_compare_images = image_comparer(ROOT, FIGS, tol=20)
adata = sc.read(
'./data/pbmc3k_raw.h5ad', backup_url='http://falexwolf.de/data/pbmc3k_raw.h5ad'
)
# Preprocessing
sc.pl.highest_expr_genes(adata, n_top=20, show=False)
save_and_compare_images('highest_expr_genes')
sc.pp.filter_cells(adata, min_genes=200)
sc.pp.filter_genes(adata, min_cells=3)
mito_genes = [name for name in adata.var_names if name.startswith('MT-')]
# for each cell compute fraction of counts in mito genes vs. all genes
# the `.A1` is only necessary as X is sparse to transform to a dense array after summing
adata.obs['percent_mito'] = (
np.sum(adata[:, mito_genes].X, axis=1).A1 / np.sum(adata.X, axis=1).A1
)
# add the total counts per cell as observations-annotation to adata
adata.obs['n_counts'] = adata.X.sum(axis=1).A1
> sc.pl.violin(
adata,
['n_genes', 'n_counts', 'percent_mito'],
jitter=False,
multi_panel=True,
show=False,
)
scanpy/tests/notebooks/test_pbmc3k.py:54:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
scanpy/plotting/_anndata.py:793: in violin
g = sns.catplot(
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/seaborn/categorical.py:2927: in catplot
p.plot_violins(
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/seaborn/categorical.py:1145: in plot_violins
self._configure_legend(ax, legend_artist, common_kws)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <seaborn.categorical._CategoricalPlotter object at 0x7f16c0c42460>
ax = None
func = <function _get_patch_legend_artist.<locals>.legend_artist at 0x7f16c15b5e50>
common_kws = {'edgecolor': (0.24823529411764705, 0.24823529411764705, 0.24823529411764705), 'linewidth': 1.25}
semantic_kws = None
def _configure_legend(self, ax, func, common_kws=None, semantic_kws=None):
if self.legend == "auto":
show_legend = not self._redundant_hue and self.input_format != "wide"
else:
show_legend = bool(self.legend)
if show_legend:
self.add_legend_data(ax, func, common_kws, semantic_kws=semantic_kws)
> handles, _ = ax.get_legend_handles_labels()
E AttributeError: 'NoneType' object has no attribute 'get_legend_handles_labels'
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/seaborn/categorical.py:419: AttributeError
Raw output
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/seaborn/categorical.py:419: AttributeError: 'NoneType' object has no attribute 'get_legend_handles_labels'
Check failure on line 1 in scanpy/tests/test_plotting.py::test_violin
azure-pipelines / scverse.scanpy
scanpy/tests/test_plotting.py::test_violin
image_comparer = <function image_comparer.<locals>.make_comparer at 0x7f16c270fe50>
def test_violin(image_comparer):
save_and_compare_images = image_comparer(ROOT, FIGS, tol=40)
with plt.rc_context():
sc.pl.set_rcParams_defaults()
sc.set_figure_params(dpi=50, color_map='viridis')
pbmc = pbmc68k_reduced()
> sc.pl.violin(
pbmc,
['n_genes', 'percent_mito', 'n_counts'],
stripplot=True,
multi_panel=True,
jitter=True,
show=False,
)
scanpy/tests/test_plotting.py:487:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
scanpy/plotting/_anndata.py:793: in violin
g = sns.catplot(
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/seaborn/categorical.py:2927: in catplot
p.plot_violins(
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/seaborn/categorical.py:1145: in plot_violins
self._configure_legend(ax, legend_artist, common_kws)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <seaborn.categorical._CategoricalPlotter object at 0x7f16c14cbc70>
ax = None
func = <function _get_patch_legend_artist.<locals>.legend_artist at 0x7f16c1404ee0>
common_kws = {'edgecolor': (0.24823529411764705, 0.24823529411764705, 0.24823529411764705), 'linewidth': 1.25}
semantic_kws = None
def _configure_legend(self, ax, func, common_kws=None, semantic_kws=None):
if self.legend == "auto":
show_legend = not self._redundant_hue and self.input_format != "wide"
else:
show_legend = bool(self.legend)
if show_legend:
self.add_legend_data(ax, func, common_kws, semantic_kws=semantic_kws)
> handles, _ = ax.get_legend_handles_labels()
E AttributeError: 'NoneType' object has no attribute 'get_legend_handles_labels'
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/seaborn/categorical.py:419: AttributeError
Raw output
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/seaborn/categorical.py:419: AttributeError: 'NoneType' object has no attribute 'get_legend_handles_labels'
Loading