|
27 | 27 | "adata = AnnData(np.random.normal(size=(20, 10)))" |
28 | 28 | ] |
29 | 29 | }, |
| 30 | + { |
| 31 | + "cell_type": "markdown", |
| 32 | + "metadata": {}, |
| 33 | + "source": [ |
| 34 | + "With myst it is possible to link in the text cell of a notebook such as this one the documentation of a function or a class.\n", |
| 35 | + "\n", |
| 36 | + "Let's take as an example the function {func}`{{cookiecutter.package_name}}.pp.basic_preproc`. \n", |
| 37 | + "You can see that by clicking on the text, the link redirects to the API documentation of the function. \n", |
| 38 | + "Check the raw markdown of this cell to understand how this is specified.\n", |
| 39 | + "\n", |
| 40 | + "This works also for any package listed by `intersphinx`. Go to `docs/conf.py` and look for the `intersphinx_mapping` variable. \n", |
| 41 | + "There, you will see a list of packages (that this package is dependent on) for which this functionality is supported. \n", |
| 42 | + "\n", |
| 43 | + "For instance, we can link to the class {class}`anndata.AnnData`, to the attribute {attr}`anndata.AnnData.obs` or the method {meth}`anndata.AnnData.write`.\n", |
| 44 | + "\n", |
| 45 | + "Again, check the raw markdown of this cell to see how each of these links are specified.\n", |
| 46 | + "\n", |
| 47 | + "You can read more about this in the [intersphinx page](https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html) and the [myst page](https://myst-parser.readthedocs.io/en/v0.15.1/syntax/syntax.html#roles-an-in-line-extension-point)." |
| 48 | + ] |
| 49 | + }, |
30 | 50 | { |
31 | 51 | "cell_type": "code", |
32 | 52 | "execution_count": 3, |
|
57 | 77 | ], |
58 | 78 | "metadata": { |
59 | 79 | "kernelspec": { |
60 | | - "display_name": "Python 3", |
| 80 | + "display_name": "Python 3.9.12 ('squidpy39')", |
61 | 81 | "language": "python", |
62 | 82 | "name": "python3" |
63 | 83 | }, |
|
71 | 91 | "name": "python", |
72 | 92 | "nbconvert_exporter": "python", |
73 | 93 | "pygments_lexer": "ipython3", |
74 | | - "version": "3.8.13" |
| 94 | + "version": "3.9.12" |
| 95 | + }, |
| 96 | + "vscode": { |
| 97 | + "interpreter": { |
| 98 | + "hash": "ae6466e8d4f517858789b5c9e8f0ed238fb8964458a36305fca7bddc149e9c64" |
| 99 | + } |
75 | 100 | } |
76 | 101 | }, |
77 | 102 | "nbformat": 4, |
|
0 commit comments