Skip to content

Commit 4f40d68

Browse files
authored
Document datasets (#3060)
1 parent 8d046ff commit 4f40d68

File tree

16 files changed

+417
-180
lines changed

16 files changed

+417
-180
lines changed

.azure-pipelines.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ trigger:
44

55
variables:
66
python.version: '3.12'
7-
PYTEST_ADDOPTS: '-v --color=yes --nunit-xml=test-data/test-results.xml'
7+
PYTEST_ADDOPTS: '-v --color=yes --internet-tests --nunit-xml=test-data/test-results.xml'
88
TEST_EXTRA: 'test-full'
99
DEPENDENCIES_VERSION: "latest" # |"pre-release" | "minimum-version"
1010
TEST_TYPE: "standard" # | "coverage"
@@ -44,11 +44,19 @@ jobs:
4444
inputs:
4545
key: '"python $(python.version)" | "$(Agent.OS)" | pyproject.toml'
4646
restoreKeys: |
47-
python | "$(Agent.OS)"
48-
python
47+
"python" | "$(Agent.OS)"
48+
"python"
4949
path: $(uv_cache_dir)
5050
displayName: Cache pip packages
5151

52+
53+
- task: Cache@2
54+
inputs:
55+
key: '"pytest"'
56+
restoreKeys: '"pytest"'
57+
path: $(System.DefaultWorkingDirectory)/.pytest_cache/d
58+
displayName: Cache pytest data
59+
5260
- script: |
5361
export MPLBACKEND="agg"
5462
echo $MPLBACKEND

docs/extensions/patch_myst_nb.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
"""Extension to patch https://github.com/executablebooks/MyST-NB/pull/599."""
2+
3+
# TODO once MyST-NB 1.1.1/1.2.0 is out, this can be removed.
4+
5+
from __future__ import annotations
6+
7+
from copy import copy
8+
from typing import TYPE_CHECKING
9+
10+
from myst_nb.core.render import MditRenderMixin
11+
12+
if TYPE_CHECKING:
13+
from sphinx.application import Sphinx
14+
15+
16+
get_orig = MditRenderMixin.get_cell_level_config
17+
18+
19+
def get_cell_level_config(
20+
self: MditRenderMixin,
21+
field: str,
22+
cell_metadata: dict[str, object],
23+
line: int | None = None,
24+
):
25+
rv = get_orig(self, field, cell_metadata, line)
26+
return copy(rv)
27+
28+
29+
def setup(app: Sphinx):
30+
MditRenderMixin.get_cell_level_config = get_cell_level_config

docs/references.bib

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,21 @@ @article{Blondel2008
9999
pages = {P10008},
100100
}
101101

102+
@article{Burczynski2006,
103+
author = {Burczynski, Michael E. and Peterson, Ron L. and Twine, Natalie C. and Zuberek, Krystyna A. and Brodeur, Brendan J. and Casciotti, Lori and Maganti, Vasu and Reddy, Padma S. and Strahs, Andrew and Immermann, Fred and Spinelli, Walter and Schwertschlag, Ulrich and Slager, Anna M. and Cotreau, Monette M. and Dorner, Andrew J.},
104+
title = {Molecular Classification of Crohn’s Disease and Ulcerative Colitis Patients Using Transcriptional Profiles in Peripheral Blood Mononuclear Cells},
105+
volume = {8},
106+
issn = {1525-1578},
107+
url = {https://doi.org/10.2353/jmoldx.2006.050079},
108+
doi = {10.2353/jmoldx.2006.050079},
109+
number = {1},
110+
journal = {The Journal of Molecular Diagnostics},
111+
publisher = {Elsevier BV},
112+
year = {2006},
113+
month = {feb},
114+
pages = {51--61},
115+
}
116+
102117
@article{Butler2018,
103118
author = {Butler, Andrew and Hoffman, Paul and Smibert, Peter and Papalexi, Efthymia and Satija, Rahul},
104119
title = {Integrating single-cell transcriptomic data across different conditions, technologies, and species},

docs/release-notes/1.10.2.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
* Fixed incorrect instructions in "testing" dev docs {pr}`2994` {smaller}`I Virshup`
1313
* Update marsilea tutorial to use `group_` methods {pr}`3001` {smaller}`I Virshup`
1414
* Fixed citations {pr}`3032` {smaller}`P Angerer`
15+
* Improve dataset documentation {pr}`3060` {smaller}`P Angerer`
1516

1617
```{rubric} Bug fixes
1718
```

scanpy/_utils/_doctests.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,10 @@ def decorator(func: F) -> F:
2626
return func
2727

2828
return decorator
29+
30+
31+
def doctest_internet(func: F) -> F:
32+
"""Mark function so doctest gets the internet mark."""
33+
34+
func._doctest_internet = True
35+
return func

0 commit comments

Comments
 (0)