From 6e222699691a05df9c6b31e8f23565c10ff1371c Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 31 Jul 2026 14:02:19 +0800 Subject: [PATCH 1/3] DOCS: Update contrib instructions for Myst-nb --- doc/contribute/contributing.rst | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/doc/contribute/contributing.rst b/doc/contribute/contributing.rst index a0ddf551833..9231e64c039 100644 --- a/doc/contribute/contributing.rst +++ b/doc/contribute/contributing.rst @@ -392,25 +392,21 @@ Some other important things to know about the docs: for a detailed explanation, or look at some of the existing functions to extend it in a similar manner. -- The documentation makes heavy use of the `jupyter-sphinx extension - `_. - The ``jupyter-execute`` directive lets you put code in the documentation which will be run - during the doc build. For example: +- The documentation makes heavy use of `MyST-NB `_. + Documentation pages that contain executable code are written as + MyST Markdown files (``.md``) using the ``{code-cell}`` directive, + which is run during the doc build. For example: - .. code:: rst + .. code:: md - .. jupyter-execute:: - - x = 2 - x**3 - - will be rendered as: - - .. jupyter-execute:: - - x = 2 - x**3 + ```{code-cell} python + tags: [remove-input] + x = 2 + x**3 + ``` + + Note the ``tags: [remove-input]`` line above - this line is optional, and these tags allows us to control how the cell is displayed (in this case, it hides the code but still displays the output). See `this page `_ for a list of these tags. Almost all code examples in the docs are run (and the output saved) during the doc build. This approach means that code examples will always be up to date, but it does make building the docs a bit more complex. From dd74c416386fa681613f9f388bb3bfa510801ca6 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 31 Jul 2026 06:27:14 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- doc/contribute/contributing.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/contribute/contributing.rst b/doc/contribute/contributing.rst index 9231e64c039..7c6eb723f69 100644 --- a/doc/contribute/contributing.rst +++ b/doc/contribute/contributing.rst @@ -400,12 +400,12 @@ Some other important things to know about the docs: .. code:: md ```{code-cell} python - tags: [remove-input] + tags: [remove - input] x = 2 x**3 ``` - + Note the ``tags: [remove-input]`` line above - this line is optional, and these tags allows us to control how the cell is displayed (in this case, it hides the code but still displays the output). See `this page `_ for a list of these tags. Almost all code examples in the docs are run (and the output saved) during the doc build. This approach means that code examples will always be up to date, From c91760461dbc7dac7558e653d4b746907d09aace Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Fri, 31 Jul 2026 14:29:27 +0800 Subject: [PATCH 3/3] Note on tags --- doc/contribute/contributing.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/contribute/contributing.rst b/doc/contribute/contributing.rst index 7c6eb723f69..c2c3a97e54f 100644 --- a/doc/contribute/contributing.rst +++ b/doc/contribute/contributing.rst @@ -400,13 +400,13 @@ Some other important things to know about the docs: .. code:: md ```{code-cell} python - tags: [remove - input] + tags: [...] x = 2 x**3 ``` - Note the ``tags: [remove-input]`` line above - this line is optional, and these tags allows us to control how the cell is displayed (in this case, it hides the code but still displays the output). See `this page `_ for a list of these tags. + Note the ``tags: [...]`` line above - this line is optional, and you can place tags here to control how the cell is displayed (e.g., ``tags: [remove-input]`` hides the code but still displays the output). See `this page `_ for a list of these tags. Almost all code examples in the docs are run (and the output saved) during the doc build. This approach means that code examples will always be up to date, but it does make building the docs a bit more complex.