mirror of
https://framagit.org/la-chariotte/la-chariotte.git
synced 2025-04-29 18:32:38 +02:00
66 lines
1.9 KiB
Markdown
66 lines
1.9 KiB
Markdown
# 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]() 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. Only maintainers can merge into develop and main.
|
|
|
|
Thanks again, and happy coding!
|
|
|
|
## 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 .
|
|
```
|
|
|
|
## Working with emails
|
|
|
|
To test the appearance of emails, you can use [Sendria](https://github.com/msztolcman/sendria):
|
|
|
|
```bash
|
|
pip install sendria
|
|
sendria --db mails.sqlite
|
|
$NAVIGATOR http://127.0.0.1:1080
|
|
```
|
|
|
|
## Docs
|
|
|
|
We're using [MkDocs](https://www.mkdocs.org/) for this documentation. If you want to
|
|
build it locally, just run:
|
|
|
|
```bash
|
|
mkdocs serve
|
|
```
|
|
|
|
## Merging rules
|
|
|
|
In order to be merged, your code needs to be reviewed by two maintainers. Don't hesitate to ping us if needed.
|