Skip to content

Commit 9c7d41b

Browse files
authored
Fix #40 Add extras for database dependencies (#41)
1 parent 6be1c94 commit 9c7d41b

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
- name: Install dependencies
7373
run: |
7474
pip install --upgrade pip
75-
pip install -e '.[dev]'
75+
pip install -e '.[dev,postgres]'
7676
pip install Django~=${{ matrix.django-version }}
7777
- name: Run tests
7878
run: just test
@@ -107,7 +107,7 @@ jobs:
107107
- name: Install dependencies
108108
run: |
109109
pip install --upgrade pip
110-
pip install -e '.[dev]'
110+
pip install -e '.[dev,mysql]'
111111
pip install Django~=${{ matrix.django-version }}
112112
- name: Run tests
113113
run: just test

CONTRIBUTING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ source .venv/bin/activate
1414
python -m pip install -e '.[dev]'
1515
```
1616

17+
> [!TIP]
18+
> Add an extra name for each database you want to develop with (e.g. `[dev,mysql]`, `[dev,postgres]` or `[dev,mysql,postgres]`). This is optional.
19+
1720
Then you can run the tests with the [just](https://just.systems/man/en/) command runner:
1821

1922
```sh

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ A reference implementation and backport of background workers and tasks in Djang
1313
## Installation
1414

1515
```
16-
pip install django-tasks
16+
python -m pip install django-tasks
1717
```
1818

1919
## Usage

pyproject.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,13 @@ dev = [
5555
"coverage",
5656
"django-stubs[compatible-mypy]",
5757
"dj-database-url",
58-
"psycopg",
58+
]
59+
mysql = [
5960
"mysqlclient"
6061
]
62+
postgres = [
63+
"psycopg[binary]",
64+
]
6165

6266
[tool.ruff.lint]
6367
select = ["E", "F", "I", "W", "N", "B", "A", "C4", "T20", "DJ"]

0 commit comments

Comments
 (0)