# Contributing

You want to contribute to the project ? First, thank you very much! We'll try to do our best to help you getting
started.

The first step is to clone the project, you can find more information about that in
the [getting started guide](../install.md). Once that's done, you can:

- choose a task [on the board](https://gitlab.com/la-chariotte/la_chariotte/-/boards) and assign it to
  yourself - if you don't know which task to do, feel free to reach to
  us.
- create a new branch **from develop** naming it to reflect what you want to do
- complete the task, without forgetting to write and run tests (see below)
- create a Merge Request, containing as many details as possible about what you have done

Then, a maintainer will be able to review your code and suggest improvements/ask questions if necessary.

If you think your Merge Request should be reviewed by one or more specific person (because their expertise would be
needed), feel
free to add them as reviewer of your MR. Only maintainers can merge into develop and main.

Thanks again, and happy coding!

## Merging rules

In order to be merged, your code needs to be reviewed by two maintainers. If you feel the review is taking too long,
please feel free to send us a message or to ping us on Discord.

## Working on the frontend

To recompile the files as soon as changes are detected in the scss files.

```bash
sass --watch --no-source-map ./la_chariotte/static/sass/style.sass:./la_chariotte/static/css/app.css
```

## Running tests

Run tests with `pytest`:

```bash
pytest
```

## Formatting your code

Once you're ready, you'll need to ensure your code is formatted the right way.
We're using [isort](https://pycqa.github.io/isort/) to fix the import order,
and [black](https://black.readthedocs.io/en/stable/) for general linting.

You can run them with:

```bash
isort .
black .
```

## Docs

We're using [MkDocs](https://www.mkdocs.org/) for this documentation. If you want to
build it locally, just run:

```bash
mkdocs serve
```
