Skip to content

Commit c70f64c

Browse files
authored
Merge pull request #1 from brandur/brandur-development-instructions
Development instructions + link from README + additional make targets
2 parents 144ade0 + c5dec4f commit c70f64c

File tree

3 files changed

+65
-1
lines changed

3 files changed

+65
-1
lines changed

Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,15 @@
1+
.PHONY: fmt
2+
fmt:
3+
rye fmt
4+
5+
.PHONY: lint
6+
lint:
7+
rye lint
8+
9+
.PHONY: test
10+
test:
11+
rye test
12+
13+
.PHONY: typecheck
114
typecheck:
215
rye run mypy -p src.riverqueue

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
# River client for Python
22

3-
An insert-only Python client for [River](https://github.com/riverqueue).
3+
An insert-only Python client for [River](https://github.com/riverqueue/river) packaged in the [`riverqueue` gem](https://rubygems.org/gems/riverqueue). Allows jobs to be inserted in Python and run by a Go worker, but doesn't support working jobs in Python.
4+
5+
## Development
6+
7+
See [development](./docs/development.md).

docs/development.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# riverqueue-python development
2+
3+
## Install dependencies
4+
5+
The project uses [Rye](https://github.com/astral-sh/rye) for its development toolchain and to run development targets. Install it with:
6+
7+
```shell
8+
$ curl -sSf https://rye.astral.sh/get | bash
9+
```
10+
11+
Or via Homebrew:
12+
13+
```shell
14+
$ brew install rye
15+
```
16+
17+
Then use it to set up a virtual environment:
18+
19+
```shell
20+
$ rye sync
21+
```
22+
23+
## Run tests
24+
25+
```shell
26+
$ rye test
27+
```
28+
29+
## Run lint
30+
31+
```shell
32+
$ rye lint
33+
```
34+
35+
## Run type check (Mypy)
36+
37+
```shell
38+
$ make typecheck
39+
```
40+
41+
## Format code
42+
43+
```shell
44+
$ rye fmt
45+
```
46+
47+
Rye uses [Ruff](https://github.com/astral-sh/ruff) under the hood for code formatting.

0 commit comments

Comments
 (0)