Skip to content

Latest commit

 

History

History
70 lines (46 loc) · 2.67 KB

CONTRIBUTING.md

File metadata and controls

70 lines (46 loc) · 2.67 KB

We welcome any contributions from the community. Please make sure your PR follows the rules below:

General notebook rules

  • folders and files name should be lowercase with hyphen.

    Example: name-of-my-folder-or-file

  • notebook example should be put inside a folder which name is the notebook's title. This folder should be located under a specific "domain" folder.

    Example: /relevant-domain/title-of-my-notebook-folder/

  • entrypoint should be named main.ipynb

  • README TOC should be updated to link to the new notebook

  • notebook should have an H1 title, matching folder name and README TOC

Data rules

  • data files name should use snake_case
  • data files should be of reasonnable 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 Black
  • python methods should be typed
  • documentation should follow Google's docstring

Testing and CI

This repository is tested with a Github Action.

These commands can be used while developing:

  • Reformat python files using black :

    poetry run black .
  • Reformat notebooks using black-nb :

    poetry run black-nb notebooks/
  • Execute all the notebooks:

    poetry run python tests/execute_notebooks.py

How to write a notebook

  1. Pull the master branch (git checkout master and git pull).
  2. Run poetry install to be sure to work with the expected dependencies.
  3. Create the working branch git switch -c <PSEUDO>/<SUBJECT>.
  4. Start JupyterLab poetry run jupyter lab.
  5. Create the folder and notebooks. Add notebooks responsible for data pre-processing to the list of untested notebooks. The main notebook using atoti should be tested to ensure users can run them.
  6. If a dependency is missing run poetry add <DEPENDENCY_NAME>: DEPENDENCIES MUST NOT BEEN ADDED WITH CONDA OR PIP since the Github CI is relying on the poetry.lock file to install dependencies.
  7. Push changes using git push and create the related pull request.

About

Checkout atoti.io for more info!

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