Unverified Commit e6dd7fd3 authored by moto's avatar moto Committed by GitHub
Browse files

Add tutorial to CONTRIBUTING (#1990)

parent 22379d14
...@@ -157,6 +157,19 @@ Omitting `BUILD_GALLERY` while providing `GALLERY_PATTERN` assumes `BUILD_GALLER ...@@ -157,6 +157,19 @@ Omitting `BUILD_GALLERY` while providing `GALLERY_PATTERN` assumes `BUILD_GALLER
GALLERY_PATTERN=forced_alignment_tutorial.py make html GALLERY_PATTERN=forced_alignment_tutorial.py make html
``` ```
## Adding a new tutorial
We use Sphinx-Gallery to generate tutorials. Please refer to the [documentation](https://sphinx-gallery.github.io/stable/syntax.html) for how to format the tutorial.
You can draft in Google Colab and export it as IPython notebook and use [this script](https://gist.github.com/chsasank/7218ca16f8d022e02a9c0deb94a310fe) to convert it to Python file, but this process is known to incur some rendering issue. So please make sure to the resulting tutorial renders correctly.
Some tips;
- Use the suffix `_tutorial.py` to be recognized by the doc build process.
- When displaying audio with `IPython.display.Audio`, put one audio object per cell and put it at the end so that the resulting audio is embedded. (https://github.com/pytorch/audio/pull/1985)
- Similarly, when adding plots, add one plot per one code cell (use `subplots` to plot multiple), so that the resulting image is properly picked up.
- Avoid using `=` for section header, use `-` or `~`. Otherwise the resulting doc will have an issue like https://github.com/pytorch/audio/pull/1989.
## Conventions ## Conventions
As a good software development practice, we try to stick to existing variable As a good software development practice, we try to stick to existing variable
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment