You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+42-2Lines changed: 42 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,28 +1,68 @@
1
1
# Contributing
2
2
Contributions are welcome! Make sure to first open an issue discussing the problem or the new feature before creating a pull request. This project uses [poetry](https://python-poetry.org/).
3
3
4
+
## Installation
5
+
Python and poetry are used for the dependency and build management.
6
+
7
+
### Install Poetry
8
+
[Poetry](https://python-poetry.org/) can be installed with `pip` on most systems, but the direct installer on windows systems may work better.
Once poetry is installed, the dependencies can be installed with the following command
26
+
```bash
27
+
$ poetry install --with dev
28
+
```
29
+
30
+
### Open Shell
31
+
The virtualenv can be accessed using the following command to avoid prepending `poetry run` to every command
32
+
```bash
33
+
$ poetry shell
34
+
```
35
+
36
+
4
37
## Code Style
5
38
The code follows the [black](https://github.com/psf/black) code style. Import statements are sorted with [isort](https://pycqa.github.io/isort/). The project must type-check with [pyright](https://github.com/microsoft/pyright). It is recommend to run the type-checker via the VSCode Python extension (discussed below).
6
39
7
-
**Format**
40
+
**Reformat**
8
41
```bash
9
42
# omit `poetry run` if u have the virtualenv activated
10
43
$ poetry run isort beet_observer
11
44
$ poetry run black beet_observer
12
45
```
13
46
14
-
**Check**
47
+
**Check Formatting**
15
48
```bash
16
49
# omit `poetry run` if u have the virtualenv activated
17
50
$ poetry run black --check beet_observer
18
51
$ poetry run isort --check-only beet_observer
19
52
```
20
53
54
+
**Type check**
55
+
```bash
56
+
# omit `poetry run` if u have the virtualenv activated
57
+
$ poetry run pyright
58
+
```
59
+
21
60
You can run `poetry self add 'poethepoet[poetry_plugin]'` to get access to an easier set of commands:
22
61
```bash
23
62
# omit `poetry` if u have the virtualenv activated
0 commit comments