Skip to content

Commit b71984f

Browse files
authored
feat!: support new algoliasearch and django versions (#336)
1 parent 7f23fc2 commit b71984f

30 files changed

+1107
-967
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Bug Report
2+
description: File a bug report.
3+
title: '[bug]: '
4+
labels: ['bug', 'triage']
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
## Please help us help you!
10+
11+
Before filing your issue, ask yourself:
12+
- Is there an issue already opened for this bug?
13+
- Can I reproduce it?
14+
15+
If you are not sure about the origin of the issue, or if it impacts your customer experience, please contact [our support team](https://alg.li/support).
16+
- type: textarea
17+
attributes:
18+
label: Description
19+
description: A clear and concise description of what the bug is.
20+
validations:
21+
required: true
22+
- type: dropdown
23+
id: python version
24+
attributes:
25+
label: python version
26+
description: What is the Python version you've reproduced the error with
27+
options:
28+
- 3.8
29+
- 3.9
30+
- 3.10
31+
- 3.11
32+
- 3.12
33+
- 3.13
34+
validations:
35+
required: true
36+
- type: dropdown
37+
id: django version
38+
attributes:
39+
label: Django version
40+
description: What is the Django version you've reproduced the error with
41+
options:
42+
- 4.0
43+
- 4.1
44+
- 4.2
45+
- 5.0
46+
- 5.1
47+
validations:
48+
required: true
49+
- type: textarea
50+
attributes:
51+
label: Steps to reproduce
52+
description: Write down the steps to reproduce the bug, please include any information that seems relevant for us to reproduce it properly
53+
placeholder: |
54+
1. Use method `...`
55+
2. With parameters `...`
56+
3. See error
57+
validations:
58+
required: true
59+
- type: textarea
60+
id: logs
61+
attributes:
62+
label: Relevant log output
63+
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
64+
render: shell
65+
- type: checkboxes
66+
attributes:
67+
label: Self-service
68+
description: |
69+
If you feel like you could contribute to this issue, please check the box below. This would tell us and other people looking for contributions that someone's working on it.
70+
If you do check this box, please send a pull request within 7 days so we can still delegate this to someone else.
71+
options:
72+
- label: I'd be willing to fix this bug myself.
73+

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
1-
| Q | A
2-
| ----------------- | ----------
3-
| Bug fix? | yes/no
4-
| New feature? | yes/no <!-- please update the /CHANGELOG.md file -->
5-
| BC breaks? | no
6-
| Related Issue | Fix #... <!-- will close issue automatically, if any -->
7-
| Need Doc update | yes/no
1+
## 🧭 What and Why
82

3+
🎟 Related Issue:
94

10-
## Describe your change
5+
### Changes included:
116

127
<!--
138
Please describe your change, add as much detail as
149
necessary to understand your code.
1510
-->
1611

17-
## What problem is this fixing?
12+
## 🧪 Test
1813

1914
<!--
20-
Please include everything needed to understand the problem,
21-
its context and consequences, and, if possible, how to recreate it.
15+
Please include detail that could help the maintainers of this repository
16+
to assert the changes you've made (e.g. written tests, scenarios).
2217
-->

.github/workflows/main.yml

Lines changed: 55 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -17,51 +17,68 @@ jobs:
1717
strategy:
1818
matrix:
1919
include:
20-
- version: "3.5.4"
21-
toxenv: py35-django20
22-
os: ubuntu-20.04
23-
- version: "3.6.7"
24-
toxenv: py36-django32
25-
os: ubuntu-20.04
26-
- version: "3.7.5"
27-
toxenv: py37-django32
28-
os: ubuntu-20.04
29-
- version: "3.8.15"
30-
toxenv: py38-django32
31-
os: ubuntu-20.04
32-
- version: "3.9"
33-
toxenv: py39-django30
34-
os: ubuntu-latest
35-
- version: "3.9"
36-
toxenv: py39-django31
37-
os: ubuntu-latest
38-
- version: "3.9"
39-
toxenv: py39-django32
40-
os: ubuntu-latest
20+
# django 4.0
21+
- version: "3.8"
22+
toxenv: py38-django40
23+
os: ubuntu-22.04
4124
- version: "3.9"
4225
toxenv: py39-django40
43-
os: ubuntu-latest
44-
- version: "3.9"
45-
toxenv: py39-django41
46-
os: ubuntu-latest
47-
- version: "3.9"
48-
toxenv: py39-django42
49-
os: ubuntu-latest
26+
os: ubuntu-22.04
5027
- version: "3.10"
5128
toxenv: py310-django40
52-
os: ubuntu-latest
29+
os: ubuntu-22.04
30+
# django 4.1
31+
- version: "3.8"
32+
toxenv: py38-django41
33+
os: ubuntu-22.04
34+
- version: "3.9"
35+
toxenv: py39-django41
36+
os: ubuntu-22.04
5337
- version: "3.10"
5438
toxenv: py310-django41
55-
os: ubuntu-latest
56-
- version: "3.10"
57-
toxenv: py310-django42
58-
os: ubuntu-latest
39+
os: ubuntu-22.04
5940
- version: "3.11"
6041
toxenv: py311-django41
61-
os: ubuntu-latest
42+
os: ubuntu-22.04
43+
# django 4.2
44+
- version: "3.8"
45+
toxenv: py38-django42
46+
os: ubuntu-22.04
47+
- version: "3.9"
48+
toxenv: py39-django42
49+
os: ubuntu-22.04
50+
- version: "3.10"
51+
toxenv: py310-django42
52+
os: ubuntu-22.04
6253
- version: "3.11"
6354
toxenv: py311-django42
64-
os: ubuntu-latest
55+
os: ubuntu-22.04
56+
- version: "3.12"
57+
toxenv: py312-django42
58+
os: ubuntu-22.04
59+
# django 5.0
60+
- version: "3.10"
61+
toxenv: py310-django50
62+
os: ubuntu-22.04
63+
- version: "3.11"
64+
toxenv: py311-django50
65+
os: ubuntu-22.04
66+
- version: "3.12"
67+
toxenv: py312-django50
68+
os: ubuntu-22.04
69+
# django 5.1
70+
- version: "3.10"
71+
toxenv: py310-django51
72+
os: ubuntu-22.04
73+
- version: "3.11"
74+
toxenv: py311-django51
75+
os: ubuntu-22.04
76+
- version: "3.12"
77+
toxenv: py312-django51
78+
os: ubuntu-22.04
79+
- version: "3.13"
80+
toxenv: py313-django51
81+
os: ubuntu-22.04
6582

6683
steps:
6784
- uses: actions/checkout@v3
@@ -72,10 +89,10 @@ jobs:
7289
python-version: ${{ matrix.version }}
7390

7491
- name: Install dependencies and run tests
92+
timeout-minutes: 20
7593
run: |
7694
python -m venv python-ci-run
7795
source python-ci-run/bin/activate
78-
python -m pip install --upgrade pip
79-
python -m pip install tox
80-
python -m pip install -r requirements.txt
96+
pip3 install --upgrade pip
97+
pip3 install tox
8198
TOXENV=${{ matrix.toxenv }} ALGOLIA_APPLICATION_ID=${{ secrets.ALGOLIA_APPLICATION_ID }} ALGOLIA_API_KEY=${{ secrets.ALGOLIA_API_KEY }} tox

DOCKER_README.md

Lines changed: 6 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,7 @@
1-
In this page you will find our recommended way of installing Docker on your machine.
2-
This guide is made for OSX users.
3-
4-
## Install Docker
5-
6-
First install Docker using [Homebrew](https://brew.sh/)
7-
```
8-
$ brew install docker
9-
```
10-
11-
You can then install [Docker Desktop](https://docs.docker.com/get-docker/) if you wish, or use `docker-machine`. As we prefer the second option, we will only document this one.
12-
13-
## Setup your Docker
14-
15-
Install `docker-machine`
16-
```
17-
$ brew install docker-machine
18-
```
19-
20-
Then install [VirtualBox](https://www.virtualbox.org/) with [Homebrew Cask](https://github.com/Homebrew/homebrew-cask) to get a driver for your Docker machine
21-
```
22-
$ brew cask install virtualbox
23-
```
24-
25-
You may need to enter your password and authorize the application in your `System Settings` > `Security & Privacy`.
26-
27-
Create now a new machine, set it up as default and connect your shell to it (here we use zsh. The commands should anyway be displayed in each steps' output)
28-
29-
```
30-
$ docker-machine create --driver virtualbox default
31-
$ docker-machine env default
32-
$ eval "$(docker-machine env default)"
33-
```
34-
35-
Now you're all setup to use our provided Docker image!
36-
371
## Build the image
382

3+
> Make sure to have [Docker installed](https://docs.docker.com/engine/install/)
4+
395
```bash
406
docker build -t algoliasearch-django .
417
```
@@ -53,8 +19,8 @@ docker run -it --rm --env ALGOLIA_APPLICATION_ID=XXXXXX \
5319
However, we advise you to export them. That way, you can use [Docker's shorten syntax](https://docs.docker.com/engine/reference/commandline/run/#set-environment-variables--e---env---env-file) to set your variables.
5420

5521
```bash
56-
export ALGOLIA_APPLICATION_ID=XXXXXX
57-
export ALGOLIA_API_KEY=XXX
22+
export ALGOLIA_APPLICATION_ID=XXXXXX
23+
export ALGOLIA_API_KEY=XXX
5824

5925
docker run -it --rm --env ALGOLIA_APPLICATION_ID --env ALGOLIA_API_KEY -v $PWD:/code -w /code algoliasearch-django bash
6026
```
@@ -64,8 +30,8 @@ Once your container is running, any changes you make in your IDE are directly re
6430
To launch the tests, you can use this command
6531

6632
```bash
67-
tox -e py36-django31
33+
tox -e py313-django51
6834
```
6935

70-
If you'd like to sue an env other that `py36-django31`, run `tox --listenvs` to see the list of available envs.
36+
If you'd like to sue an env other that `py313-django51`, run `tox --listenvs` to see the list of available envs.
7137
Feel free to contact us if you have any questions.

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.8-slim
1+
FROM python:3.13-slim
22

33
# Force the stdout and stderr streams to be unbuffered.
44
# Ensure python output goes to your terminal
@@ -7,6 +7,6 @@ ENV PYTHONUNBUFFERED=1
77
WORKDIR /code
88
COPY requirements.txt /code/
99

10-
RUN pip install -r requirements.txt
10+
RUN pip3 install --upgrade pip && pip3 install -r requirements.txt
1111

1212
COPY . /code/

MAINTAINERS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## `algolia/algoliasearch-django` maintainers
22

3-
| Name | Email |
4-
|-----------------|---------------------|
5-
| Paul-Louis Nech | [email protected] |
3+
| Name | Email |
4+
|-----------------|------------------------|
5+
| Algolia | https://alg.li/support |

0 commit comments

Comments
 (0)