/examples-1

A collection of worked examples that use Bacalhau.

Primary LanguageJupyter Notebook

Bacalhau Code Examples

This is a collection of worked code examples that use Bacalhau. For ease of access, they are rendered in the docs at https://docs.bacalhau.org/examples/

Developer Guide

Please see the basic-template example for a guide on how to create a new example.

Requirements

  • All examples must be ipynb files
  • Examples must be placed in "task specific" directories in this repository - this structure is mirrored to the documentation site
  • The todo folder will not be rendered
  • Any file named README.ipynb or index.ipynb will be rendered as the index page for the directory

Documentation Rendering

Whenever you push to the main branch on this repository, a github action will automatically render your ipynb's into markdown and push them to the docs repository.

Cells can be ignored (or inputs -- remove_input, or outputs -- remove_output) by adding the following to the cell metadata:

...
    "metadata": {
        "tags": [
            "remove_cell"
        ]
    },
...

⚠️ Please note that the push of the rendered code will delete and replace the existing files in the docs/examples directory in the repository. ⚠️

Documentation Testing

All ipynb files (except those in the todo directory) are tested by a Github action using pytest and nbmake.

Please try to keep cell execution time to a minimum.

You can ignore cells, allow exceptions, and more.

Developer Help

If you have any questions or spot anything missing, please reach out to philwinder or enricorotundo on the Filecoin slack.