Repository: scverse/scanpy

Issue:
deprecate scvi in external
I was wondering if we could deprecate the scvi external wrapper as we now have `scvi-tools`. I could also update the wrapper to have minimal functionality, but I think it would be better for people to use our API now that it's tightly integrated with scanpy anyway.


Discussion:
Sounds reasonable, would you want to add anything more to Ecosystem about this? Also, would you like to make a PR with the deprecation message pointing to `scvi-tools`?
With the scanpy ecosystem growing also with packages outside of scanpy external, it would probably be good to have a page with all packages that are part of this ecosystem. Ideally this would be on the Scanpy page I guess as it would be a first port-of-call for users. 

Such a page could have brief explanations of the capabilities of each of these tools, and link to tutorials from all the independent packages that show how these tools are integrated into a standard Scanpy workflow. What do you guys think?
Thanks for the responses!

> Sounds reasonable, would you want to add anything more to Ecosystem about this? Also, would you like to make a PR with the deprecation message pointing to scvi-tools?

I already made a PR to update the docs (https://scanpy.readthedocs.io/en/latest/ecosystem.html). I can also do the latter.

> With the scanpy ecosystem growing also with packages outside of scanpy external, it would probably be good to have a page with all packages that are part of this ecosystem. Ideally this would be on the Scanpy page I guess as it would be a first port-of-call for users.
>
> Such a page could have brief explanations of the capabilities of each of these tools, and link to tutorials from all the independent packages that show how these tools are integrated into a standard Scanpy workflow. What do you guys think?

Is this different than the ecosystem page? Sounds reasonable though
Hah, so I wasn't aware of the ecosystem page yet. This looks very cool, and could really be built upon nicely. I think a more clear tutorial integration into the page would be useful.... and I guess some tools don't really have any brief explanations there.

Resolving patch:
diff --git a/scanpy/external/pp/_scvi.py b/scanpy/external/pp/_scvi.py
--- a/scanpy/external/pp/_scvi.py
+++ b/scanpy/external/pp/_scvi.py
@@ -1,3 +1,4 @@
+import warnings
 import numpy as np
 import pandas as pd
 import scipy as sp
@@ -5,7 +6,7 @@
 from typing import Optional, Sequence, Union
 from anndata import AnnData
 
-MIN_VERSION = "0.6.5"
+MIN_VERSION = "0.6.7"
 
 
 def scvi(
@@ -105,6 +106,11 @@ def scvi(
     genes by n_latent matrix.
 
     """
+    warnings.warn(
+        "scvi via scanpy external API is no longer supported. "
+        + "Please use the new scvi-tools package from `scvi-tools.org`",
+        FutureWarning,
+    )
 
     try:
         from scvi.models import VAE, LDVAE
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -32,7 +32,7 @@
         louvain=['python-igraph', 'louvain>=0.6,!=0.6.2'],
         leiden=['python-igraph', 'leidenalg'],
         bbknn=['bbknn'],
-        scvi=['scvi>=0.6.5'],
+        scvi=['scvi==0.6.7'],
         rapids=['cudf>=0.9', 'cuml>=0.9', 'cugraph>=0.9'],
         magic=['magic-impute>=2.0'],
         skmisc=['scikit-misc>=0.1.3'],


Test patch: