Skip to content

Latest commit

 

History

History
115 lines (66 loc) · 4.71 KB

CONTRIBUTING.md

File metadata and controls

115 lines (66 loc) · 4.71 KB

Getting started

We welcome any contributions from the community!

To get started, please proceed to...

  1. Fork the Atoti repository:

  2. Clone the forked repository and ensure latest changes from the main branch.

    • git checkout main and git pull
  3. Install dependencies from the uv.lock file.

    • uv sync --python 3.10
  4. Create a working branch.

    • git checkout -b <BRANCH_NAME> or git switch -c <BRANCH_NAME>
  5. Start JupyterLab using uv.

    • uv run jupyter-lab
  6. Create the folder and notebooks.

    • Make sure to add any notebooks responsible for data pre-processing to the list of untested notebooks.
    • Notebooks using Atoti should be tested to ensure users can run it.
  7. If a dependency is missing run uv add <DEPENDENCY_NAME>.

    • DEPENDENCIES MUST NOT BEEN ADDED WITH CONDA OR PIP since the Github CI relies on the uv.lock file to install dependencies.
  8. Add, commit, and push changes to the forked repository.

    • git add, git commit, and git push
  9. Create a pull request from the forked repository.

Please monitor the pull request as each pull request is subject to automatic code testing. The Atoti team will review and comment on any pull requests to ensure each submission is aligned with the API's usage.

Pull request rules

Please make sure your PR follows the rules below:

General notebook rules

  • Folders and file names should be lowercase with hyphens.

    • E.g. name-of-my-folder-or-file
  • Notebook examples should reside within folders whose names represent the notebook's title or idea. Each notebook folder should reside within a "domain" folder, such as 01-atoti-academy, 02-technical-guides, or 03-use-cases.

    • E.g. /domain/notebook-folder/
  • Individual .ipynb files within a notebook folder should be named main.ipynb.

    • E.g. /domain/notebook-folder/main.ipynb
  • README table of contents should be updated to link to the new notebook.

  • Notebook should have an H1 title, matching folder name and README table of contents.

  • Create a README within notebook folders to briefly introduce the use case.

Data rules

  • Data file names should use snake_case.
  • Data files should be of reasonable size, not exceeding 50MB, unless programmatically generated.
  • All data files should be uploaded on data.atoti.io. If you don't have access to it, data should be hosted on a public host and an owner will transfer them to data.atoti.io upon review.

Python code rules

  • Variables should follow Google's naming convention.
  • Python files should be formatted with Ruff.
  • Python methods should be typed.
  • Documentation should follow Google's style guide for docstrings.

Formatting, testing, rendering, and upgrading notebooks

A Makefile is a type of script used by the make utility to automate repetitive tasks. This repository uses the following Makefile to automate common tasks when working with the Atoti notebooks:

  • Format code in notebooks using the ruff formatter.

    make format
    
  • Test code in notebooks with pytest using the nbmake Pytest plugin.

    make test
    
  • Execute code in notebooks and render web-based JupyterLab widgets using jupyterlab and the browser automation tool playwright.

    make render
    
  • Upgrade all notebooks using a combination of make test and make render.

    make upgrade
    

CI/CD

GitHub Actions is GitHub’s built-in continuous integration and continuous deployment (CI/CD) platform that allows for defining workflows as YAML files. This repository uses the following Github Action workflow to test the notebooks. Test reports are generated from pytest and uploaded to the summary view of every workflow run.

About

Check out atoti.io for more info!

By opening an issue or a pull request, you agree with Atoti's terms of use and privacy policy.