Skip to content

Commit 28924dc

Browse files
committed
Add Oriol's comments
1 parent 14da81b commit 28924dc

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

docs/source/contributing/jupyter_style.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,37 @@ This guide does not teach nor cover MyST extensively, only gives some opinionate
4545
* When linking to other notebooks, always use a `ref` type cross-reference pointing
4646
to the target in the {ref}`jupyter_style_first_cell`.
4747

48+
* Here are more guidances on reference links:
49+
50+
#### References to targets within the current project
51+
That is, notebooks in pymc-examples referring to other notebooks in pymc-examples.
52+
53+
```
54+
{ref}`explicit text <anchor_id>`
55+
[explicit text](#anchor_id)
56+
```
57+
58+
#### References to targets of other projects
59+
These can be to any project defined in the [intersphinx mapping](https://github.com/pymc-devs/pymc-examples/blob/main/examples/conf.py#L175). For example, from pymc-examples to pymc main docs, or to arviz docs or to matplotlib docs; it doesn't matter when it comes to syntax.
60+
61+
```
62+
{ref}`explicit text <key:anchor_id>`
63+
[explicit text](inv:key:*:ref#anchor_id)
64+
```
65+
66+
where key is one of the keys defined in the [intersphinx mapping](https://github.com/pymc-devs/pymc-examples/blob/main/examples/conf.py#L175), such as `pymc`, `arviz`, `numpy`...
67+
68+
#### References to python objects
69+
70+
```
71+
{type}`import.path` # to show full import path
72+
{type}`~import.path` # to show only object name
73+
```
74+
75+
where type is func for functions, meth for methods, class for classes, prop for property, etc.
76+
77+
Now let's continue with the MysT guidelines.
78+
4879
* If the output (or even code and output) of a cell is not necessary to follow the
4980
notebook or it is very long and can break the flow of reading, consider hiding
5081
it with a {ref}`toggle button <myst-nb:use/hiding/code>`

0 commit comments

Comments
 (0)