These tools is used to generate workflows from README.md and python notebook files in the examples folder.
- Generated workflows will be placed in .github/workflows/samples_* folder.
- The script will also generate a new explanation README.md for all the examples.
pip install -r ../../examples/requirements.txt
pip install -r ../../examples/dev_requirements.txt
At the root of the repository, run the following command:
python scripts/readme/readme.py
At the root of the repository, run the following command:
# Generate workflow from README.md inside examples folder
python scripts/readme/readme_generator.py -g "examples/**/*.ipynb"
# Generate workflow from python notebook inside examples folder
python scripts/readme/workflow_generator.py -g "examples/flows/**/README.md"
Multiple inputs are supported.
3. Options to control generations of examples README.md
- Each workflow contains metadata area, set
.metadata.description
area will display this message in the corresponding cell in README.md file. - When set
.metadata.no_readme_generation
to valuetrue
, the script will stop generating for this notebook.
- For README.md files, only
bash
cells will be collected and converted to workflow. No cells will produce no workflow. - Readme descriptions are simply collected from the first sentence in the README.md file just below the title. The script will collect words before the first . of the fist paragraph. Multi-line sentence is also supported
- A supported description sentence:
This is a sample workflow for testing.
- A not supported description sentence:
Please check www.microsoft.com for more details.
- A supported description sentence: