Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mrc 5033 Autocode execution #34

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Mrc 5033 Autocode execution #34

wants to merge 2 commits into from

Conversation

M-Kusumgar
Copy link
Contributor

@M-Kusumgar M-Kusumgar commented Feb 2, 2024

run hatch run generate-docs and then open the docs/_build/index.html file to view docs

@M-Kusumgar M-Kusumgar changed the base branch from mrc-4500 to main February 2, 2024 19:12
@M-Kusumgar M-Kusumgar changed the base branch from main to mrc-4500 February 2, 2024 19:13
@M-Kusumgar
Copy link
Contributor Author

okay I think I maybe be cooking with this one potentially, had to dig through the source code to find that # ignore but we might be able to do the setup without showing it to the user, let me know what you guys think

@M-Kusumgar M-Kusumgar requested a review from r-ash February 2, 2024 19:34
@M-Kusumgar M-Kusumgar changed the base branch from mrc-4500 to main February 8, 2024 15:44
Copy link
Contributor

@r-ash r-ash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this is going to be quite limited in terms of what code blocks we can include.

Looks like no persistent data between separate code blocks. With something like

```{runblock} pycon
>>> exec(open("./docs/setup/helper.py").read()) # ignore
>>> x = multiply(1, 2)
```

```{runblock} pycon
>>> print(x)
```

We get an error in generated docs

Traceback (most recent call last):
  File "<input>", line 1, in <module>
NameError: name 'x' is not defined

Which is going to be a real pain for writing any long form vignette like docs. Have you seen https://machow.github.io/quartodoc/get-started/overview.html looks like it is made to be very similar to R in docs it produces. There is an example here of the docs site it creates https://rstudio.github.io/pins-python/

But I also wonder if there is a better way to do this with Sphinx? Do you know what numpy or pandas are using for their docs? It says it is built using sphinx but they must be doing something to have persistent code blocks in e.g. https://pandas.pydata.org/docs/user_guide/10min.html

@richfitz
Copy link
Member

Looks like the numpy docs are using something based on ipython notebooks to me (jupyter notebooks). some pointers to other ideas here : quarto-dev/quarto-cli#2638

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants