Skip to content

Commit

Permalink
Merge pull request #737 from theislab/fix/linting_attr
Browse files Browse the repository at this point in the history
Fixing Linting and Plotting Error
  • Loading branch information
selmanozleyen authored Jul 23, 2024
2 parents 76b259e + c05c88f commit 36d93bf
Show file tree
Hide file tree
Showing 25 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,4 @@ packages.dot

# plotting tests
tests/plotting/actual_figures/
tests/plotting/figures/
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
tippy_enable_mathjax = True
# no need because of sphinxcontrib-bibtex
tippy_enable_doitips = False

linkcheck_report_timeouts_as_broken = True
linkcheck_ignore = [
# 403 Client Error
r"https://doi.org/10.1126/science.aad0501",
Expand Down
12 changes: 6 additions & 6 deletions src/moscot/problems/space/_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ def prepare(
- :attr:`spatial_key` - key in :attr:`~anndata.AnnData.obsm` where the spatial coordinates are stored.
- :attr:`batch_key` - key in :attr:`~anndata.AnnData.obs` where batches are stored.
- :attr:`stage` - set to ``'prepared'``.
- :attr:`problem_kind` - set to ``'quadratic'`` (if both ``spatial_key`` and ``sc_attr`` are passed)
or ``'linear'`` (if both ``spatial_key`` and ``sc_attr`` are `None`).
- :attr:`problem_kind` - set to ``'quadratic'`` (if both `spatial_key` and `sc_attr` are passed)
or ``'linear'`` (if both `spatial_key` and `sc_attr` are `None`).
"""
if sc_attr:
x = {"attr": "obsm", "key": spatial_key} if isinstance(spatial_key, str) else spatial_key
Expand Down Expand Up @@ -292,15 +292,15 @@ def solve(
Whether to :func:`~jax.jit` the underlying :mod:`ott` solver.
min_iterations
Minimum number of :term:`(fused) GW <Gromov-Wasserstein>` or :term:`Sinkhorn` iterations,
depending on :attr:`alpha`.
depending on `alpha`.
max_iterations
Maximum number of :term:`(fused) GW <Gromov-Wasserstein>` or :term:`Sinkhorn` iterations,
depending on :attr:`alpha`.
depending on `alpha`.
threshold
Convergence threshold of the :term:`GW <Gromov-Wasserstein>` or the :term:`Sinkhorn` algorithm,
depending on :attr:`alpha`.
depending on `alpha`.
linear_solver_kwargs
Keyword arguments for the inner :term:`linear problem` solver. Only used when :attr:`alpha` > 0.
Keyword arguments for the inner :term:`linear problem` solver. Only used when `alpha` > 0.
device
Transfer the solution to a different device, see :meth:`~moscot.base.output.BaseSolverOutput.to`.
If :obj:`None`, keep the output on the original device.
Expand Down
10 changes: 5 additions & 5 deletions src/moscot/problems/space/_mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,20 +412,20 @@ def correlate( # type: ignore[misc]
corr_method
Correlation method. Valid options are:
- ``'pearson'`` - `Pearson correlation <https://en.wikipedia.org/wiki/Pearson_correlation_coefficient>`_.
- ``'spearman'`` - `Spearman's rank correlation
<https://en.wikipedia.org/wiki/Spearman%27s_rank_correlation_coefficient>`_.
- ``'pearson'`` - `Pearson correlation <https://en.wikipedia.org/wiki/Pearson_correlation_coefficient>`_.
- ``'spearman'`` - `Spearman rank correlation <https://en.wikipedia.org/wiki/Spearman%27s_rank_correlation_coefficient>`_.
device
Device where to transfer the solutions, see :meth:`~moscot.base.output.BaseSolverOutput.to`.
groupby
Optional key in :attr:`~anndata.AnnData.obs`, containing categorical annotations for grouping.
batch_size:
batch_size
Number of features to process at once. If :obj:`None`, process all features at once.
Larger values will require more memory.
Returns
-------
Correlation for each solution in :attr:`solutions`.
Correlation for each solution in `solutions`.
"""
var_sc = self._filter_vars(var_names)
if var_sc is None or not len(var_sc):
Expand Down
Binary file modified tests/plotting/expected_figures/OutputPlotting_costs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/plotting/expected_figures/OutputPlotting_costs_last.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/plotting/expected_figures/OutputPlotting_errors_gw.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/plotting/expected_figures/OutputPlotting_errors_sink.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/plotting/expected_figures/Plotting_cell_transition.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/plotting/expected_figures/Plotting_pull.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/plotting/expected_figures/Plotting_push.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/plotting/expected_figures/Plotting_sankey.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/plotting/expected_figures/Plotting_sankey_params.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed tests/plotting/figures/Plotting_cell_transition.png
Binary file not shown.
Binary file not shown.
Binary file removed tests/plotting/figures/Plotting_pull-failed-diff.png
Binary file not shown.
Binary file removed tests/plotting/figures/Plotting_pull.png
Binary file not shown.
Binary file removed tests/plotting/figures/Plotting_push-failed-diff.png
Binary file not shown.
Binary file removed tests/plotting/figures/Plotting_push.png
Binary file not shown.
Binary file removed tests/plotting/figures/Plotting_sankey.png
Binary file not shown.
Binary file not shown.
Binary file removed tests/plotting/figures/Plotting_sankey_params.png
Binary file not shown.

0 comments on commit 36d93bf

Please sign in to comment.