# Become a Contributor

## Help Build Code for Life

As Code for Life is an [open-source](https://github.com/ocadotechnology/codeforlife-workspace) project, we welcome external contributors and all forms of contribution such as:

* code changes
* design
* student resources
* teacher resources
* strategic insights from qualified teachers
* process review
* cloud infrastructure setup
* running [coding clubs](https://app.gitbook.com/o/-M_6U74XVytl1uT1MyQy/s/uSZtpmG9RnvL8z3GdptG/)

If you would like to contribute in one of the ways mentioned above or in a way not mentioned above, please reach out at <codeforlife@ocado.com> - all help is welcome! 😉

## Why Should I Contribute?

Some of the reasons we would like to highlight:

* Your contributions will be directly used by students and teachers worldwide, helping them to flourish in an increasingly digital world.
* You'll learn a variety of technologies and gain experience developing a production-ready system.
* You'll build your portfolio and industry-experience, which is highly valued by employers.
* You'll have the satisfaction of making the world a better place, one contribution at a time. 😊

Want more reasons? See [why you should contribute to open-source](https://opensource.guide/how-to-contribute/#why-contribute-to-open-source).

## Getting Started

Get ready to dig in! 💪 We're hoping that contributing to this project will be as rewarding to you as it is to us. 🚀

{% hint style="success" %}
We endorse and extend [Python's Community Code of Conduct](https://www.python.org/psf/codeofconduct/); please make sure you are friendly and welcoming.
{% endhint %}

### Create a GitHub Account

Every contributor will need a GitHub account, regardless of whether they wish to contribute code or other types of work to the project. This is because we use GitHub to manage our project's tasks. If you don't already have a personal GitHub account, [create one](https://github.com/signup).

### Notice of Intention

We recommend that you start your journey with us by reaching out to us at <codeforlife@ocado.com> and notify us of your intent to contribute. While it's not required to do this, we recommend starting a conversation with us early on so that we may learn more about your individual skill set and suggest tasks that you're suited to.

{% hint style="info" %}
Notifying us of your intent to contribute is not a commitment on your part. You are never obligated to start or complete any work for CFL.
{% endhint %}

### Sign our Agreement

Before you begin contributing, you must first sign our [contributor agreement](https://github.com/ocadotechnology/codeforlife-workspace/blob/main/CONTRIBUTING.md). This gives CFL permission to use your contributions in our app! 🚀 After reading the agreement, you must sign it by following the below steps. If you have any trouble, please reach out to <support@codeforlife.education>.

#### 1. Set up your Git identity.

{% hint style="info" %}
[See](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup) Git's first-time setup docs.
{% endhint %}

```bash
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com
```

Set `user.name` to be anything you like.

Set `user.email` to be an email address that you own. Note that:

* This email address will be forever publicly visible! If you wish to keep your personal email address private, then we recommend you create a new email address for the sole purpose of making contributions. If you have a GitHub account, you can [add the new email address](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/adding-an-email-address-to-your-github-account) to it.
* You cannot use a private/noreply email address. If you have a GitHub account, this is enabled by default and can be turned off at **Settings > Emails > Keep my email addresses private**.

#### 2. Fork our [code workspace](https://github.com/ocadotechnology/codeforlife-workspace).

{% hint style="info" %}
You only need to fork the **main** branch.
{% endhint %}

{% hint style="info" %}
[See](https://docs.github.com/en/get-started/quickstart/fork-a-repo) how to do this on GitHub.
{% endhint %}

#### 3. Sign your email address.

On the **main** branch of your forked **codeforlife-workspace** repo, write your email address on a new line at the *bottom* of **CONTRIBUTING.md**.

{% hint style="warning" %}
You must not make any other edits!
{% endhint %}

```markdown
<example@gmail.com>
```

#### 4. Commit your changes.

```bash
git commit -m "user.email"
```

Replace `user.email` with your email address.

#### 5. Push your changes.

```bash
git push
```

#### 6. Create a pull request.

Create a pull request from the **main** branch of your forked **codeforlife-workspace** repo to the **main** branch of [Ocado Technology's **codeforlife-workspace** repo](https://github.com/ocadotechnology/codeforlife-workspace).

{% hint style="info" %}
[See](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork) how to do this on GitHub.
{% endhint %}

#### 7. Verify your email address.

To affirm that you own the email address you provided, an email will be sent to the email address after your pull request has been reviewed and approved by a member of our team. The email will contain a link to the pull request that added the email address as a contributor. You must forward the email to <codeforlife@ocado.com> from the same email address and state:

{% code overflow="wrap" %}

```
I confirm that I created this pull request and I agree to being a contributor to the Code for Life project.
```

{% endcode %}

### Finding Tasks

All of our project's tasks are tracked using [GitHub Issues](https://github.com/features/issues) - we use the words "issue" and "task" interchangeably. Each code repository has an **Issues** tab where you can browse the various tasks we have for the repo. You can find our list of repos by looking at our [reading list](https://docs.codeforlife.education/repositories-and-packages).

<figure><img src="https://2662351606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_6UDUiGoJDhr_OXetO%2Fuploads%2FZWo9dd0CHWSJGEcdBlIm%2Fimage.png?alt=media&#x26;token=41b8b5fe-8a3e-4efa-b8c8-f3de43a83b89" alt=""><figcaption><p>What the <strong>Issues</strong> tab looks like in GitHub</p></figcaption></figure>

Although you're welcome to pick up any task, not all issues are suitable for contributors. This is because some tasks require specialised knowledge or familiarity with how our system works. To help contributors find tasks we believe to be suitable for them, we label some of our tasks with a **volunteers** tag.

<figure><img src="https://2662351606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_6UDUiGoJDhr_OXetO%2Fuploads%2F29bFQSVKUjuNmHxZaQU6%2Fimage.png?alt=media&#x26;token=eeb6ddf5-0e40-4836-b58f-daf2f17cebcb" alt=""><figcaption><p>Listing and filtering issues on GitHub </p></figcaption></figure>

You can search for these with the filters:

```
is:issue is:open label:"volunteers"
```

Furthermore, we label some tasks with **good first issue** that we believe to be easy enough for first time contributors:

```
is:issue is:open label:"volunteers" label:"good first issue"
```

### Contributing as a Developer

If you are contributing code changes, we recommend you spend a little time skimming through the docs of our different code repos (see our [reading list](https://docs.codeforlife.education/repositories-and-packages)). This will give you some insight into how our system is structured and, given that each task is associated to a repo, you'll have a high-level understanding of the area of the system that you'll be working on.

Once you have an overview of our system, [set up your development environment](https://docs.codeforlife.education/software-developer-guide/dev-environment-setup).&#x20;

#### General Skills

All dev contributors will need to have these skills to contribute code changes:

* A basic understanding of what [Git](https://git-scm.com/) does. You'll need to know what the following commands do:
  * `git clone`
  * `git pull`
  * `git commit`
  * `git push`
* A basic understanding of what [Docker](https://docs.docker.com/get-started/overview/) does.
* A basic understanding of what [VSCode](https://code.visualstudio.com/) does.

#### Back End Skills

It's recommended contributors wishing to contribute to our back end familiarise themselves with:

{% hint style="info" %}
You **don't** have to be familiar with all these technologies - as long as you are keen to learn.
{% endhint %}

* The basics of [Python](https://www.python.org/).
* The basics of [pip](https://pip.pypa.io/en/stable/) and [pipenv](https://pipenv.pypa.io/en/latest/).
* The basics of [Django](https://www.djangoproject.com/).
* The basics of [unittest](https://docs.python.org/3/library/unittest.html) and [pytest](https://docs.pytest.org/en/).

#### Front End Skills

It's recommended contributors wishing to contribute to our front end familiarise themselves with:

{% hint style="info" %}
You **don't** have to be familiar with all these technologies - as long as you are keen to learn.
{% endhint %}

* The basics of [HTML](https://developer.mozilla.org/en-US/docs/Web/HTML).
* The basics of [CSS](https://developer.mozilla.org/en-US/docs/Web/CSS).
* The basics of [JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript) and [TypeScript](https://www.typescriptlang.org/).
* The basics of [npm](https://docs.npmjs.com/) and [Yarn](https://yarnpkg.com/).
* The basics of [React](https://react.dev/).
* The basics of [Cypress](https://www.cypress.io/).

## Working on Tasks

Below is everything you need to know about how to handle tasks as a contributor.

### Picking up a Task

Before you start working on a task, we recommend you reach out to us at <codeforlife@ocado.com> so that we may assign the tasks you're working on to your GitHub account.

{% hint style="info" %}
If you're a dev contributor, you'll first need to fork any repo you wish to develop for. You should have forked all of CFL's repos when you [set up your dev environment](https://docs.codeforlife.education/software-developer-guide/dev-environment-setup).
{% endhint %}

{% hint style="info" %}
If you've been assigned a task and we've seen no activity from you in the past 2 weeks, you'll be unassigned so that others may have a chance to pick up the task. You can always be re-assigned if you so wish.
{% endhint %}

### Support Requests

If you have questions or require guidance, we'll do our best to respond promptly and provide you with support.

Our preferred communication channel is GitHub - we ask you make comments directly on a task so that we may keep all conversations regarding a specific task in a central location. Otherwise, you may reach out to us at <codeforlife@ocado.com> or via the email address of any CFL team member you may have previously been in contact with.

### Review Requests & Change Requests

When you've completed your task, you must request a review from us to determine whether we can accept your contribution. The simplest way to do so is to comment on the task:

```
ready for review
```

{% hint style="info" %}
If you're a dev contributor, review requests will come in the form of [pull requests from your forked repo](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork).
{% endhint %}

If we discover issues in our review, we'll request changes. It's normal to have multiple rounds of review requests (by you) followed by change requests (by us) until the task is completed to our standards. Change requests will usually be commented directly on their respective GitHub task or pull request.

### Closing a Task

Once a task has been closed by us we'll go through some internal processes which will ultimately result in your contribution getting deployed in the next version of system.

It may take some time before your accepted contributions are live on our system as we batch changes and release them as new versions on our system.

{% hint style="info" %}
You can see when your contributions have been released by keeping an eye on our [release notes](https://docs.codeforlife.education/release-notes). However, we're aiming to improve our notifications so you're kept in the loop every step of the way.
{% endhint %}
