First, thanks a lot for wanting to help! Everyone is welcome to contribute. Answering questions, helping others, improving the already existing tutorials (or creating new ones) are some of the ways to contribute.
Before writing code, search through the existing PRs or issues to ensure that nobody is already working on the same thing.
-
Fork the repository by clicking on the 'Fork' button on the repository's page.
-
Clone your fork to your local disk, and add the base repository as a remote:
$ git clone [email protected]:<your Github user>/dl-tutorials.git $ cd dl-tutorials $ git remote add upstream https://github.com/lapix-ufsc/dl-tutorials.git
-
Sync your fork with the original repository.
$ git fetch upstream $ git rebase upstream/main
-
Create a new branch for your changes:
$ git checkout -b descriptive-of-my-changes
Do not work on the
main
branch. -
Write the changes on your branch.
As you work on improving or writing new tutorials, you should make sure that the notebook follow PEP8.
Keeps in mind, that the pages are build directly from the jupyter notebooks. This is done with the help of quarto. So, you can try and test the build locally, where you first will need to install it:
Manual install
quarto
:$ curl -LO https://www.quarto.org/download/latest/quarto-linux-amd64.deb $ sudo dpkg -i *64.deb && rm *64.deb
To preview the pages, run:
$ quarto preview tutorials
Note: you can use some
cell options
from quarto to improve the pages. By example use at some cell#| output: false
to hidden the output at the page. See other options here. In addition, you can use front matters.To help on follow PEP8 and also on formatting the notebooks with
black
andisort
, you can use pre-commit. You can check all hooks we use at .pre-commit-config.yaml, or just let the pre-commit do its magic by installing with:$ pip install pre-commit
The pre-commit hooks will automatically run when you try create a commit. Also, can be run manually with:
$ pre-commit run
Please write good commit messages.
Push the changes to your account using:
$ git push -u origin descriptive-of-my-changes
-
When you finish your changes, go to the webpage of your fork on GitHub (
github.com/<your Github user>/dl-tutorials
). Click on 'Pull Request' to send your changes for review.
-
The title of your pull request should be a summary of your contribution;
-
If your pull request addresses a issue, please mention the issue in the description of the pull request to make sure that they are linked;
-
To indicate a work in progress, please prefix the title with
[WIP]
. You can also create the PR as a draft.