Thanks for your interest in contributing to the notebooks
repository.
Please take a few minutes to read GitHub's guide on How to Contribute to Open Source. It's a quick read, and it's a great way to introduce yourself to how things work behind the scenes in open-source projects.
If you want to update the documentation, README.md is the file you're looking for.
Pull requests are the best way to propose changes to the notebooks repository:
- Configure name and email in git
- Fork the repo and create your branch from main.
- Sign off your commit using the -s, --signoff option. Write a good commit message (see How to Write a Git Commit Message)
- If you've added code that should be tested, add tests.
- Ensure the test suite passes.
- Make sure your code lints.
- Issue that pull request!
- Decide from which notebook you want to derive the new notebook
- Create a proper filepath and naming to the corresponding folder
- Add the minimum files you have to add:
- Pipfile with the additional packages
- Generate the Pipfile lock by running
pipenv lock
to the corresponding pipfile directory - Dockefile with proper instructions
- Kustomization objects to deploy the new notebook into an openshift cluster (Kustomization.yaml, service.yaml, statefulset.yaml)
- Create instructions into Makefile, for example if you derive the new notebooks from minimal then the recipe should be like the following:
# Your comment here .PHONY: jupyter-${NOTEBOOK_NAME}-ubi8-python-3.8 jupyter-${NOTEBOOK_NAME}-ubi8-python-3.8: jupyter-minimal-ubi8-python-3.8 $(call image,$@,jupyter/${NOTEBOOK_NAME}/ubi8-python-3.8,$<)
- Add the paths of the new pipfiles under
refresh-pipfilelock-files
- Test the changes locally, by manually running the
$ make jupyter-${NOTEBOOK_NAME}-ubi8-python-3.8
from the terminal.
Some basic instructions how to apply the new tests into openshift-ci
- Fork the openshift-ci repo and create your branch from master.
- Issue a pull request there by adding the following.
- Get navigated into opendatahub-io-notebooks-main.yaml file.
- Under
images
option, add build instructions (directory path, from(parent image) and to(new notebook name)) - Under
tests
option, add the tests (notebook-jupyter-${NOTEBOOK_NAME}-ubi8-python-3-8-image-mirror and notebook-jupyter-${NOTEBOOK_NAME}-ubi8-python-3-8-pr-image-mirror) - Under
notebooks-e2e-tests
add the jupyter-${NOTEBOOK_NAME}-ubi8-python-3.8-test-e2e - Finally, run on terminal
$make jobs
and ensure that there are not errors.
- Under
- Commit your PR
- Test the changes locally, by manually running the
$make jupyter-${NOTEBOOK_NAME}-ubi8-python-3.8
from the terminal. This definitely helps in that initial phase.
- Once the PR is submitted, you can either select specific reviewers or let the bot to select reviewers automatically.
- For the PR to be merged, it must receive 2 reviews from the repository approvals/reviewers. Following that, an
/approve
comment must be added by someone with approval rights. If the author of the PR has approval rights, it is preferred that they perform the merge action.