File: CONTRIBUTING.md

package info (click to toggle)
python-pook 2.1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 672 kB
  • sloc: python: 3,558; makefile: 13
file content (59 lines) | stat: -rw-r--r-- 1,636 bytes parent folder | download
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
# Pook development

**All contributors are obliged to follow Pook's [Code of Conduct](./CODE_OF_CONDUCT.md)**.

## Getting started

First, clone the repository:

```bash
git clone git@github.com:h2non/pook.git
```

Pook uses [`hatch`](https://hatch.pypa.io/) for script and environment management. Run the `ci` script to set up a development virtual environment and verify your local setup:

```bash
hatch run ci
```

Running the `ci` script will:
- Cause Hatch to set up a development virtual environment
- Install pre-commit hooks
- Run the pre-commit hooks, including type checks
- Run the unit tests

Now you are ready to contribute to Pook! If there is a specific issue you'd like to work on, leave a comment expressing your interest and any questions you have for maintainers regarding implementation details.

When contributing code, please add unit tests for all changes and documentation for any non-internal changes.

## Testing

Pook supports all actively supported CPython versions, as well as the latest Pypy version. To run Pook's test suite for each supported interpreter, run the following:

```bash
hatch run test:test
```

Note that each interpreter requires a new virtual environment, and hatch will automatically handle creating these.

To run tests only for a specific version, affix the version designation to the environment name (the left side of the `:`):

```bash
hatch run test.pypy3.10:test
```

## Documentation

Generate the documentation site by running:

```bash
hatch run docs:build
```

## Building for distribution

Use Hatch's build tools to create the Pook distribution:

```bash
hatch build -c
```