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

Automated tutorials based on Python script source #275

Open
knmcguire opened this issue Oct 27, 2021 · 3 comments
Open

Automated tutorials based on Python script source #275

knmcguire opened this issue Oct 27, 2021 · 3 comments

Comments

@knmcguire
Copy link
Member

I started step-by-step tutorials a while ago in this issue #159, however it was quite labor intensive to do this all by hand.

That is why a while ago I've played around with writing a parser that can turn a python script into a full tutorial in markdown, which can be put on the website. Here you can find the source: https://github.com/knmcguire/auto-tutorial

It might be good to have all the (big) examples also as an tutorial format? And do we want to automatically link to the generated API doc of the cflib ?

@knmcguire knmcguire self-assigned this Oct 27, 2021
@knmcguire
Copy link
Member Author

This will be quite difficult to maintain to generate it all from the python. It might be better to take code snippets from the code itself.

@marios-stam
Copy link
Contributor

An idea that could be useful is to write the tutorials as a jupyter notebook (.iypnb) and then use a Github Action that can convert the jupyter notebook into both Markdown and Python code, like this one. So if modifications are needed, by changing the notebook both the step-by-step tutorial and the Python code will be updated automatically.

@knmcguire
Copy link
Member Author

This might be too complicated to do with the current website framework, but we can reconsider if we rebuild the website based on mkdocs. Namely the pmdown snippet extension https://facelessuser.github.io/pymdown-extensions/extensions/snippets/

@knmcguire knmcguire removed their assignment Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants