Thank you for contributing to our notebook examples! To ensure that your contribution aligns with our guidelines, please carefully review the following guide.
- General notebook requirements
- Branches and tags
- Github workflows
- General prerequisites
- Styling tools
Review our template notebook for general overview on how notebooks should be structure. The template notebook and this section just serves as a guide and exceptions can be made. Here are our general requirements:
- Ensure that any modified notebooks run when edited.
- Ensure that you update any relevant headers and comments within the code block you may add or change.
- Notebooks should start with a top header below the Labelbox and link icons with the title of the notebook as a main header # and a overview of what the notebook shows.
- Use "labelbox[data]" over labelbox for installs to ensure you have the correct dependencies.
- Imports and installs should come after the main header under a Setup section.
- Labelbox and other platforms with clients and API keys should be specified under a single section.
- Subsections need a second level header ## and an overview of the section.
- The last cell should be a clean up section to delete any labelbox objects created and commented out to prevent accidentally running code blocks.
- Notebook github action workflows are required to run successfully before merging.
Important
Please make sure to remove any API keys before pushing changes
- All development happens in feature branches ideally prefixed by contributor's initials. For example
fs/feature_name. - Approved PRs are merged to the
developbranch. - All releases align to a git tag.
- Github Branch Workflow
- When you push to a branch that contains files inside the examples directory, it will automatically reformat your notebook to match our given style and provide appropriate headers. Once this workflow is completed it will commit back to your branch which then you can pull.
- If your push contains new notebooks or modifies the names of notebooks the readme will be updated to reflect the change with updated links.
Rye may be installed before contributing to the repository as it is the tool used to style our example notebooks. This could be used to avoid the github styling workflow. This is also the packaging tool used for the main SDK. The pyproject used for the example notebooks is a virtual package and does not get published.
Rye is setup in this directory to use a customs script that will run the notebooks through our formatting tools and create readmes.
rye syncin the examples folder to install the correct dev dependencies.rye run cleanruns a series of formatting tools.rye run create-readmecreates a readme based off our notebooks.