File: CONTRIBUTING.md

package info (click to toggle)
morecantile 7.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,036 kB
  • sloc: python: 3,339; makefile: 5
file content (59 lines) | stat: -rw-r--r-- 1,274 bytes parent folder | download | duplicates (2)
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
# Contributing

Issues and pull requests are more than welcome.

We recommand using [`uv`](https://docs.astral.sh/uv) as project manager for development.

See https://docs.astral.sh/uv/getting-started/installation/ for installation 

**dev install**

```bash
git clone https://github.com/developmentseed/morecantile.git
cd morecantile

uv sync --extra rasterio
```

You can then run the tests with the following command:

```sh
uv run pytest --cov morecantile --cov-report term-missing -s -vv
```

### pre-commit

This repo is set to use `pre-commit` to run *isort*, *flake8*, *pydocstring*, *black* ("uncompromising Python code formatter") and mypy when committing new code.

```bash
uv run pre-commit install
```

##### Performance tests

```sh
uv sync --group benchmark 
uv run pytest tests/benchmarks.py --benchmark-only --benchmark-columns 'min, max, mean, median' --benchmark-sort 'min'
```

### Docs

```bash
git clone https://github.com/developmentseed/morecantile.git
cd morecantile

uv sync --group docs
```

Hot-reloading docs:

```bash
uv run mkdocs serve -f docs/mkdocs.yml
```

To manually deploy docs (note you should never need to do this because Github
Actions deploys automatically for new commits.):

```bash
uv run mkdocs gh-deploy -f docs/mkdocs.yml
```