summaryrefslogtreecommitdiffstats
path: root/CONTRIBUTING.md
blob: 451d7d4fba790a90fb7d6dbf50497daf95cd28a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Contributing to Takahē

## Getting Started

Development can be done "bare metal" or with Docker.  We'll describe both here.


### Bare Metal

Takahē requires Python 3.11, so you'll need that first.  Then, create and
activate a virtual environment:

```shell
$ python3 -m venv .venv
$ . .venv/bin/activate
```

You can install the development requirements:

```shell
$ pip install -r requirements-dev.txt
```

...and enable git commit hooks if you like:

```bash
$ pre-commit install
```

Finally, you can run the tests with PyTest:

```bash
$ pytest
```


### Docker

The docker build process will take care of much of the above, but you just have
to be sure that you're executing it from the project root.

First, you need to build your image:

```shell
$ docker build -f ./docker/Dockerfile -t "takahe:latest" .
```

Then start the `compose` session:

```shell
$ docker compose -f docker/docker-compose.yml up
```

Once your session is up and running, you can run the tests inside your
container:

```shell
$ docker compose -f docker/docker-compose.yml exec web pytest
```


# Code of Conduct

As a contributor, you can help us keep the Takahē community open and inclusive. Takahē
follows the [Django Project Code of Conduct](https://www.djangoproject.com/conduct/).