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

[discussion]: how do we want to display docstring examples in the reference docs? #953

Closed
signekb opened this issue Jan 7, 2025 · 3 comments
Assignees

Comments

@signekb
Copy link
Member

signekb commented Jan 7, 2025

We'll be using the Quarto syntax, so the code will be executed:

```{python}
code here
```

But some decisions are still to be made before I can add the docstrings examples in #951:

  • Do we want the output of the code to be shown or hidden?
  • Do we want separate code blocks for each example or collect them in one block?

Option 1: One code block + Hidden output

Image

Option 2: One code block + Shown output

(No good: Only last output shown)
Image

Option 3: Separate code blocks + Hidden output

Image

Option 4: Separate code blocks + Shown output

Image

What do you think @seedcase-project/developers ?

@signekb signekb moved this to Todo in Team project planning Jan 7, 2025
@signekb signekb self-assigned this Jan 7, 2025
@signekb signekb moved this from Todo to In Review in Team project planning Jan 7, 2025
@lwjohnst86
Copy link
Member

lwjohnst86 commented Jan 8, 2025

Ah, strange that there isn't an option to have same code block but also show both outputs (option 2 doesn't show the output of the second command).

We should show the output.

@signekb
Copy link
Member Author

signekb commented Jan 9, 2025

Yeah, really strange. I at least couldn't find a workaround to include all outputs. It might also be nicer, actually, if the output is longer/more complex, to keep them separate?

@signekb
Copy link
Member Author

signekb commented Jan 9, 2025

Option 4 it is: Separate code blocks with shown output

@signekb signekb closed this as completed Jan 9, 2025
@github-project-automation github-project-automation bot moved this from In Review to Done in Team project planning Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants