Skip to content

Commit b1918a8

Browse files
authored
Merge branch 'main' into feat/index-stats-query-params
2 parents fdd1f14 + 8330e28 commit b1918a8

59 files changed

Lines changed: 933 additions & 1058 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.code-samples.meilisearch.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,3 +610,16 @@ update_embedders_1: |-
610610
})
611611
reset_embedders_1: |-
612612
client.index('INDEX_NAME').reset_embedders()
613+
post_render_template_1: |-
614+
client.update_experimental_features({"renderRoute": True})
615+
616+
client.render_template(
617+
template={
618+
'kind': 'inlineDocumentTemplate',
619+
'inline': 'An inline document template rendered on {{doc.id}}'
620+
},
621+
input={
622+
'kind': 'inlineDocument',
623+
'inline': {'id': 'this document'}
624+
}
625+
)

.github/workflows/documentation.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
runs-on: ubuntu-latest
2525
env:
2626
PYTHONUNBUFFERED: 1
27-
UV_PYTHON: "3.9"
27+
PYTHON_VERSION: "3.10"
2828
UV_LOCKED: 1
2929
steps:
3030
- name: Checkout the repository
@@ -37,15 +37,16 @@ jobs:
3737
- name: Setup Github Pages
3838
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
3939

40-
- name: Install Python ${{ env.UV_PYTHON }}
40+
- name: Install Python ${{ env.PYTHON_VERSION }}
4141
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
4242
with:
43-
python-version: ${{ env.UV_PYTHON }}
43+
python-version: ${{ env.PYTHON_VERSION }}
4444

4545
- name: Install uv
4646
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
4747
with:
4848
version: "0.11.21"
49+
python-version: ${{ env.PYTHON_VERSION }}
4950
enable-cache: false
5051

5152
- name: Build docs

.github/workflows/pre-release-tests.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,29 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
19+
python-version: ["3.10", "3.11", "3.12", "3.13"]
2020
name: integration-tests-against-rc
2121
runs-on: ubuntu-latest
2222
env:
2323
PYTHONUNBUFFERED: 1
24-
UV_PYTHON: ${{ matrix.python-version }}
24+
PYTHON_VERSION: ${{ matrix.python-version }}
2525
UV_LOCKED: 1
2626
steps:
2727
- name: Checkout the repository
2828
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
2929
with:
3030
persist-credentials: false
3131

32-
- name: Set up Python ${{ matrix.python-version }}
32+
- name: Set up Python ${{ env.PYTHON_VERSION }}
3333
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
3434
with:
35-
python-version: ${{ matrix.python-version }}
35+
python-version: ${{ env.PYTHON_VERSION }}
3636

3737
- name: Install uv
3838
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
3939
with:
4040
version: "0.11.21"
41+
python-version: ${{ env.PYTHON_VERSION }}
4142

4243
- name: Get the latest Meilisearch RC
4344
run: echo "MEILISEARCH_VERSION=$(curl https://raw.githubusercontent.com/meilisearch/integration-guides/main/scripts/get-latest-meilisearch-rc.sh | bash)" >> $GITHUB_ENV

.github/workflows/pypi-publish.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ jobs:
1313
runs-on: ubuntu-latest
1414
env:
1515
PYTHONUNBUFFERED: 1
16-
UV_PYTHON: "3.9"
16+
PYTHON_VERSION: "3.10"
1717
steps:
1818
- name: Checkout the repository
1919
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
2020
with:
2121
persist-credentials: false
2222

23-
- name: Set up Python ${{ env.UV_PYTHON }}
23+
- name: Set up Python ${{ env.PYTHON_VERSION }}
2424
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
2525
with:
26-
python-version: ${{ env.UV_PYTHON }}
26+
python-version: ${{ env.PYTHON_VERSION }}
2727

2828
- name: Check release validity
2929
run: sh .github/scripts/check-release.sh
@@ -32,6 +32,7 @@ jobs:
3232
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
3333
with:
3434
version: "0.11.21"
35+
python-version: ${{ env.PYTHON_VERSION }}
3536
enable-cache: false
3637

3738
- name: Build and publish

.github/workflows/tests.yml

Lines changed: 13 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -18,83 +18,59 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
21+
python-version: ["3.10", "3.11", "3.12", "3.13"]
2222
name: integration-tests
2323
runs-on: ubuntu-latest
2424
env:
2525
PYTHONUNBUFFERED: 1
26-
UV_PYTHON: ${{ matrix.python-version }}
26+
PYTHON_VERSION: ${{ matrix.python-version }}
2727
UV_LOCKED: 1
2828
steps:
2929
- name: Checkout the repository
3030
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
3131
with:
3232
persist-credentials: false
3333

34-
- name: Set up Python ${{ matrix.python-version }}
34+
- name: Set up Python ${{ env.PYTHON_VERSION }}
3535
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
3636
with:
37-
python-version: ${{ matrix.python-version }}
37+
python-version: ${{ env.PYTHON_VERSION }}
3838

3939
- name: Install uv
4040
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
4141
with:
4242
version: "0.11.21"
43+
python-version: ${{ env.PYTHON_VERSION }}
4344

4445
- name: Meilisearch (latest version) setup with Docker
4546
run: docker run -d -p 7700:7700 getmeili/meilisearch-enterprise:latest meilisearch --no-analytics --master-key=masterKey
4647

4748
- name: Test with pytest
4849
run: uv run pytest --cov-report=xml
4950

50-
pylint:
51-
name: pylint
52-
runs-on: ubuntu-latest
53-
env:
54-
PYTHONUNBUFFERED: 1
55-
UV_PYTHON: "3.9"
56-
UV_LOCKED: 1
57-
steps:
58-
- name: Checkout the repository
59-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
60-
with:
61-
persist-credentials: false
62-
63-
- name: Set up Python 3.9
64-
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
65-
with:
66-
python-version: "3.9"
67-
68-
- name: Install uv
69-
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
70-
with:
71-
version: "0.11.21"
72-
73-
- name: Linter with pylint
74-
run: uv run pylint meilisearch tests
75-
7651
mypy:
7752
name: mypy
7853
runs-on: ubuntu-latest
7954
env:
8055
PYTHONUNBUFFERED: 1
81-
UV_PYTHON: "3.9"
56+
PYTHON_VERSION: "3.10"
8257
UV_LOCKED: 1
8358
steps:
8459
- name: Checkout the repository
8560
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
8661
with:
8762
persist-credentials: false
8863

89-
- name: Set up Python 3.9
64+
- name: Set up Python ${{ env.PYTHON_VERSION }}
9065
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
9166
with:
92-
python-version: 3.9
67+
python-version: ${{ env.PYTHON_VERSION }}
9368

9469
- name: Install uv
9570
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
9671
with:
9772
version: "0.11.21"
73+
python-version: ${{ env.PYTHON_VERSION }}
9874

9975
- name: mypy type check
10076
run: uv run mypy meilisearch
@@ -108,36 +84,13 @@ jobs:
10884
with:
10985
persist-credentials: false
11086

111-
- name: ruff format
87+
- name: Run linter
11288
uses: astral-sh/ruff-action@0ce1b0bf8b818ef400413f810f8a11cdbda0034b # v4.0.0
11389
with:
114-
args: "format --check"
115-
116-
isort:
117-
name: isort
118-
runs-on: ubuntu-latest
119-
env:
120-
PYTHONUNBUFFERED: 1
121-
UV_PYTHON: "3.9"
122-
UV_LOCKED: 1
123-
steps:
124-
- name: Checkout the repository
125-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
126-
with:
127-
persist-credentials: false
128-
129-
- name: Set up Python 3.9
130-
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
131-
with:
132-
python-version: 3.9
133-
134-
- name: Install uv
135-
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
136-
with:
137-
version: "0.11.21"
90+
args: "check --output-format=full"
13891

139-
- name: isort
140-
run: uv run isort meilisearch tests --check-only
92+
- name: Run formatter
93+
run: ruff format --check --output-format=full
14194

14295
yaml-lint:
14396
name: Yaml linting check

CONTRIBUTING.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ You can set up your local environment natively or using `docker`, check out the
4444

4545
Example of running all the checks with docker:
4646
```bash
47-
docker-compose run --rm package bash -c "uv run mypy meilisearch && uv run pylint meilisearch tests && uv run pytest tests"
47+
docker-compose run --rm package bash -c "uv run mypy meilisearch && uv run ruff check && uv run ruff format --check && uv run pytest tests"
4848
```
4949

5050
To install dependencies:
@@ -55,22 +55,22 @@ uv sync
5555

5656
### Tests and Linter <!-- omit in toc -->
5757

58-
Each PR should pass the tests, mypy type checking, and the linter to be accepted.
59-
Your PR also needs to be formatted using ruff and have its imports sorted using isort.
58+
Each PR should pass the tests, mypy type checking, linting, and formatting before it can be accepted.
6059

6160
```bash
6261
# Tests
6362
curl -L https://install.meilisearch.com | sh # download Meilisearch
6463
./meilisearch --master-key=masterKey --no-analytics # run Meilisearch
6564
uv run pytest tests
65+
6666
# MyPy
6767
uv run mypy meilisearch
68+
6869
# Linter
69-
uv run pylint meilisearch tests
70-
# Format
70+
uv run ruff check --fix .
71+
72+
# Formatter
7173
uv run ruff format .
72-
# Isort
73-
uv run isort meilisearch tests
7474
```
7575

7676
Optionally tox can be used to run test on all supported version of Python, mypy, and linting.

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.9-slim-trixie
1+
FROM python:3.10-slim-trixie
22

33
COPY --from=ghcr.io/astral-sh/uv:0.11.19 /uv /uvx /bin/
44

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ To learn more about Meilisearch Python, refer to the in-depth [Meilisearch Pytho
4242

4343
## 🔧 Installation
4444

45-
**Note**: Python 3.9+ is required.
45+
**Note**: Python 3.10+ is required.
4646

4747
With `pip3` in command line:
4848

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
# Add any paths that contain custom static files (such as style sheets) here,
5454
# relative to this directory. They are copied after the builtin static files,
5555
# so a file named "default.css" will overwrite the builtin "default.css".
56-
html_static_path = []
56+
html_static_path: list[str] = []
5757

5858
# This value contains a list of modules to be mocked up.
5959
autodoc_mock_imports = ["camel_converter"]

meilisearch/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
from meilisearch.client import Client as Client # pylint: disable=useless-import-alias
1+
from meilisearch.client import Client as Client

0 commit comments

Comments
 (0)