Skip to content

Commit 214e05b

Browse files
Backport PR #2901: Doc submodule (#2962)
Co-authored-by: Isaac Virshup <ivirshup@gmail.com>
1 parent 236cbf9 commit 214e05b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+299
-194
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "notebooks"]
2+
path = notebooks
3+
url = https://github.com/scverse/scanpy-tutorials/

.readthedocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
version: 2
2+
submodules:
3+
include: all
24
build:
35
os: ubuntu-20.04
46
tools:

docs/_tutorials.md

Lines changed: 0 additions & 142 deletions
This file was deleted.

docs/api/plotting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
The plotting module {mod}`scanpy.pl` largely parallels the `tl.*` and a few of the `pp.*` functions.
1212
For most tools and for some preprocessing functions, you'll find a plotting function with the same name.
1313

14-
See {doc}`tutorials:plotting/core` for an overview of how to use these functions.
14+
See {doc}`/tutorials/plotting/core` for an overview of how to use these functions.
1515

1616
```{note}
1717
See the {ref}`settings` section for all important plotting configurations.

docs/conf.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
# -- General configuration ------------------------------------------------
2323

24-
2524
nitpicky = True # Warn about broken links. This is here for a reason: Do not change.
2625
needs_sphinx = "4.0" # Nicer param docs
2726
suppress_warnings = [
@@ -42,6 +41,11 @@
4241

4342
release = version
4443

44+
# Bibliography settings
45+
bibtex_bibfiles = ["references.bib"]
46+
bibtex_reference_style = "author_year"
47+
48+
4549
# default settings
4650
templates_path = ["_templates"]
4751
master_doc = "index"
@@ -59,6 +63,7 @@
5963
"sphinx.ext.napoleon",
6064
"sphinx.ext.autosummary",
6165
"sphinx.ext.extlinks",
66+
"sphinxcontrib.bibtex",
6267
"matplotlib.sphinxext.plot_directive",
6368
"sphinx_autodoc_typehints", # needs to be after napoleon
6469
"git_ref", # needs to be before scanpydoc.rtd_github_links
@@ -90,7 +95,7 @@
9095
"html_image",
9196
"html_admonition",
9297
]
93-
myst_url_schemes = ("http", "https", "mailto")
98+
myst_url_schemes = ("http", "https", "mailto", "ftp")
9499
nb_output_stderr = "remove"
95100
nb_execution_mode = "off"
96101
nb_merge_streams = True
@@ -127,7 +132,6 @@
127132
scipy=("https://docs.scipy.org/doc/scipy/", None),
128133
seaborn=("https://seaborn.pydata.org/", None),
129134
sklearn=("https://scikit-learn.org/stable/", None),
130-
tutorials=("https://scanpy-tutorials.readthedocs.io/en/latest/", None),
131135
)
132136

133137

docs/extensions/cite.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ def cite_role( # noqa: PLR0917
3030

3131

3232
def setup(app: Sphinx):
33-
app.add_role("cite", cite_role, override=True)
33+
app.add_role("cite-hack", cite_role, override=True)

docs/how-to/index.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# How to
2+
3+
This section contains short examples on how to perform specific tasks with scanpy.
4+
5+
```{toctree}
6+
knn-transformers
7+
```

docs/how-to/knn-transformers.ipynb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../notebooks/knn-transformers.ipynb

docs/index.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ New to *scanpy*? Check out the installation guide.
2121
:::
2222

2323
:::{grid-item-card} Tutorials {octicon}`play;1em;`
24-
:link: _tutorials
24+
:link: tutorials/index
2525
:link-type: doc
2626

2727
The tutorials walk you through real-world applications of scanpy.
@@ -49,8 +49,9 @@ Find a bug? Interested in improving scanpy? Checkout our GitHub for the latest d
4949
::::
5050

5151
**Other resources**
52+
5253
* Follow changes in the {ref}`release notes <release-notes>`.
53-
* Find tools that harmonize well with anndata & Scanpy via the {doc}`external API <external/index>` and the {doc}`ecosystem page <ecosystem>`.
54+
* Find tools that harmonize well with anndata & Scanpy at [scverse.org/packages/](https://scverse.org/packages/)
5455
* Check out our {ref}`contribution guide <contribution-guide>` for development practices.
5556
* Consider citing [Genome Biology (2018)] along with original {doc}`references <references>`.
5657

@@ -71,9 +72,10 @@ Find a bug? Interested in improving scanpy? Checkout our GitHub for the latest d
7172
:hidden: true
7273
:maxdepth: 1
7374
74-
_tutorials
75-
usage-principles
7675
installation
76+
tutorials/index
77+
usage-principles
78+
how-to/index
7779
api/index
7880
external/index
7981
ecosystem

docs/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pip install 'scanpy[leiden]'
2424
```
2525

2626
The extra `[leiden]` installs two packages that are needed for popular
27-
parts of scanpy but aren't requirements: [igraph] {cite}`Csardi06` and [leiden] {cite}`Traag18`.
27+
parts of scanpy but aren't requirements: [igraph] {cite-hack}`Csardi06` and [leiden] {cite-hack}`Traag18`.
2828

2929
(dev-install-instructions)=
3030

0 commit comments

Comments
 (0)