tools¶
Checks the readme syntax¶
The command line checks the readme syntax in virtual environments.
python -m sphinx_runpython readme -p <path_to_readme.rst> -v
It is based on function:
- sphinx_runpython.readme.check_readme_syntax(readme: str, folder: str, version: str | None = None, verbose: int = 0) str[source]¶
- Checks the syntax of the file - readme.rstwhich describes a python project.- Parameters:
- readme – file to check 
- folder – location for the virtual environment 
- version – version of docutils 
- verbose – verbosity 
 
- Returns:
- output or SyntaxError exception 
 
However, it is better to run command line twine check dist/*
assuming the whl was built by a command such as python setup.py sdist.
Convert notebooks into examples¶
The command line converts every notebook in a folder into examples which can be used into a sphinx gallery.
python -m sphinx_runpython --help