Skip to content

Commit 5481a1e

Browse files
committed
Renaming the project
1 parent f9b869d commit 5481a1e

30 files changed

+101
-87
lines changed

.github/workflows/pypi_publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: PyPi Publish
22
on:
33
push:
44
tags:
5-
- v*.*.*
5+
- v*
66
jobs:
77
deploy:
88
runs-on: ubuntu-latest

.github/workflows/testing.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@ jobs:
2525
poetry install
2626
- name: Isort check
2727
run: |
28-
poetry run isort async_search_client tests --check-only
28+
poetry run isort meilisearch_python_async tests --check-only
2929
- name: Black check
3030
run: |
31-
poetry run black async_search_client tests --check
31+
poetry run black meilisearch_python_async tests --check
3232
- name: Lint with flake8
3333
run: |
3434
# stop the build if there are Python syntax errors or undefined names
35-
poetry run flake8 async_search_client tests --count --select=E9,F63,F7,F82 --show-source --statistics
35+
poetry run flake8 meilisearch_python_async tests --count --select=E9,F63,F7,F82 --show-source --statistics
3636
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
37-
poetry run flake8 async_search_client tests --count --exit-zero --max-complexity=10 --max-line-length=100 --statistics
37+
poetry run flake8 meilisearch_python_async tests --count --exit-zero --max-complexity=10 --max-line-length=100 --statistics
3838
- name: mypy check
3939
run: |
40-
poetry run mypy async_search_client
40+
poetry run mypy meilisearch_python_async
4141
4242
testing:
4343
strategy:
@@ -66,7 +66,7 @@ jobs:
6666
run: docker run -d -p 7700:7700 getmeili/meilisearch:latest ./meilisearch --no-analytics=true --master-key=masterKey
6767
- name: Test with pytest
6868
run: |
69-
poetry run pytest --cov=async_search_client --cov-report=xml
69+
poetry run pytest --cov=meilisearch_python_async --cov-report=xml
7070
- name: Upload coverage
7171
uses: codecov/[email protected]
7272
with:

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ repos:
2222
hooks:
2323
- id: mypy
2424
additional_dependencies: [types-aiofiles]
25-
files: async_search_client/
25+
files: meilisearch_python_async/
2626
- repo: https://github.com/PyCQA/flake8
2727
rev: 3.9.2
2828
hooks:

CONTRIBUTING.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome.
66

7-
The best place to start is to check the [issues](https://github.com/sanders41/async-search-client/issues)
7+
The best place to start is to check the [issues](https://github.com/sanders41/meilisearch-python-async/issues)
88
for something that interests you.
99

1010
## Bug Reports
@@ -15,7 +15,7 @@ Please include:
1515
[GitHub markdown](https://docs.github.com/en/free-pro-team@latest/github/writing-on-github). For example:
1616

1717
```py
18-
from async_search_client import Client
18+
from meilisearch_python_async import Client
1919

2020
async with Client(BASE_URL, MASTER_KEY) as client:
2121
client.index("movies")
@@ -34,12 +34,12 @@ this project.
3434
Once the project is forked clone it to your local machine:
3535

3636
```sh
37-
git clone https://github.com/your-user-name/async-search-client.git
38-
cd async-search-client
39-
git remote add upstream https://github.com/sanders41/async-search-client.git
37+
git clone https://github.com/your-user-name/meilisearch-python-async.git
38+
cd meilisearch-python-async
39+
git remote add upstream https://github.com/sanders41/meilisearch-python-async.git
4040
```
4141

42-
This creates the directory async-search-client and connects your repository to the upstream (main project) repository.
42+
This creates the directory meilisearch-python-async and connects your repository to the upstream (main project) repository.
4343

4444
### Working with the code
4545

@@ -74,23 +74,23 @@ git pull upstream main --ff-only
7474

7575
### Code Standards and tests (isort, flake8, black, mypy, pytest, tox, and pre-commit)
7676

77-
async-search-client uses [isort](https://pycqa.github.io/isort/),
77+
meilisearch-python-async uses [isort](https://pycqa.github.io/isort/),
7878
[Flake8](https://flake8.pycqa.org/en/latest/), [Black](https://github.com/psf/black), and [mypy](https://mypy.readthedocs.io/en/stable/) to ensure consistant code formmating.
7979

8080
You can run linting on your code at any time with:
8181

8282
```sh
8383
# Run isort
84-
poetry run isort async_search_client tests
84+
poetry run isort meilisearch_python_async tests
8585

8686
# Run black
87-
poetry run black async_search_client tests
87+
poetry run black meilisearch_python_async tests
8888

8989
# Run flake8
90-
poetry run flake8 async_search_client tests
90+
poetry run flake8 meilisearch_python_async tests
9191

9292
# Run mypy
93-
poetry run mypy async_search_client
93+
poetry run mypy meilisearch_python_async
9494
```
9595

9696
It is also suggested that you setup [pre-commit](https://pre-commit.com/) in order to run linting when you commit changes to you branch. To setup pre-commit for this project run:
@@ -137,7 +137,7 @@ Type hints on files in the tests directory are optional.
137137

138138
This project uses [pytest](https://docs.pytest.org/en/stable/) and [tox](https://tox.readthedocs.io/en/latest/) for testing. Please ensure that any additions/changes you make to the code have tests to go along with them. Code coverage should not drop blow it's current level with any pull requests you make, if it does the pull request will not be accepted.
139139
You can view the current coverage level in the codecov badge on the
140-
[main github page](https://github.com/sanders41/async-search-client). You can run tests and see the
140+
[main github page](https://github.com/sanders41/meilisearch-python-async). You can run tests and see the
141141
code coverage by running.
142142

143143
Before running the tests start a Docker container running MeiliSearch.
@@ -162,7 +162,7 @@ poetry run pytest --cov-report term-missing
162162
In additon to mainting the coverage percentage please ensure that all
163163
tests are passing before submitting a pull request.
164164

165-
tox can be used to run both linting, and run the tests in all versions of Python async-search-client supports. Note that you will need to have all the verions of Python installed for this to work.
165+
tox can be used to run both linting, and run the tests in all versions of Python meilisearch-python-async supports. Note that you will need to have all the verions of Python installed for this to work.
166166

167167
```sh
168168
poetry run tox
@@ -208,11 +208,11 @@ git remote -v
208208

209209
## Making a Pull Request
210210

211-
After pushing your code to origin it is now on GitHub but not yet part of the async-search-client project. When you’re ready to ask for a code review, file a pull request. Before you do, once again make sure that you have followed all the guidelines outlined in this document regarding code style, tests, and documentation.
211+
After pushing your code to origin it is now on GitHub but not yet part of the meilisearch-python-async project. When you’re ready to ask for a code review, file a pull request. Before you do, once again make sure that you have followed all the guidelines outlined in this document regarding code style, tests, and documentation.
212212

213213
### Make the pull request
214214

215-
If everything looks good, you are ready to make a pull request. This is how you let the maintainers of the async-search-client project know you have code ready to be reviewed. To submit the pull request:
215+
If everything looks good, you are ready to make a pull request. This is how you let the maintainers of the meilisearch-python-async project know you have code ready to be reviewed. To submit the pull request:
216216

217217
1. Navigate to your repository on GitHub
218218
2. Click on the Pull Request button for your feature branch

README.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
# Async Search Client
1+
# Meilisearch Python Async
22

3-
[![Tests Status](https://github.com/sanders41/async-search-client/workflows/Testing/badge.svg?branch=main&event=push)](https://github.com/sanders41/async-search-client/actions?query=workflow%3ATesting+branch%3Amain+event%3Apush)
4-
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/sanders41/async-search-client/main.svg)](https://results.pre-commit.ci/latest/github/sanders41/async-search-client/main)
5-
[![Coverage](https://codecov.io/github/sanders41/async-search-client/coverage.svg?branch=main)](https://codecov.io/gh/sanders41/async-search-client)
6-
[![PyPI version](https://badge.fury.io/py/async-search-client.svg)](https://badge.fury.io/py/async-search-client)
7-
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/async-search-client?color=5cc141)](https://github.com/sanders41/async-search-client)
3+
[![Tests Status](https://github.com/sanders41/meilisearch-python-async/workflows/Testing/badge.svg?branch=main&event=push)](https://github.com/sanders41/meilisearch-python-async/actions?query=workflow%3ATesting+branch%3Amain+event%3Apush)
4+
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/sanders41/meilisearch-python-async/main.svg)](https://results.pre-commit.ci/latest/github/sanders41/meilisearch-python-async/main)
5+
[![Coverage](https://codecov.io/github/sanders41/meilisearch-python-async/coverage.svg?branch=main)](https://codecov.io/gh/sanders41/meilisearch-python-async)
6+
[![PyPI version](https://badge.fury.io/py/meilisearch-python-async.svg)](https://badge.fury.io/py/meilisearch-python-async)
7+
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/meilisearch-python-async?color=5cc141)](https://github.com/sanders41/meilisearch-python-async)
88

9-
Async Search Client is a Python async client for the [MeiliSearch](https://github.com/meilisearch/MeiliSearch) API. MeiliSearch also has an official [Python client](https://github.com/meilisearch/meilisearch-python).
9+
💡MeiliSearch Python Async was originally named [Async Search Client](https://github.com/sanders41/async-search-client)
10+
and was renamed to make the purpose more clear. All of the functionality remains the same and development continues from where Async Search Client left off.
11+
12+
Meilisearch Python Async is a Python async client for the [MeiliSearch](https://github.com/meilisearch/MeiliSearch) API. MeiliSearch also has an official [Python client](https://github.com/meilisearch/meilisearch-python).
1013

1114
Which of the two clients to use comes down to your particular use case. The purpose for this async client is to allow for non-blocking calls when working in async frameworks such as [FastAPI](https://fastapi.tiangolo.com/), or if your own code base you are working in is async. If this does not match your use case then the official client will be a better choice.
1215

@@ -41,16 +44,16 @@ For the most part this client mirrors the functionality of the official client a
4144

4245
In some instances it is not possible to return the data as an object because the structure will be dependant on your particular dataset and can't
4346
be known ahead of time. In these instances you can either work with the data in the dictionary that is returned, or because you will know the
44-
structure you can generate your own Classes.
47+
structure you can generate your own Pydantic models.
4548

46-
As an example, if you want to get a movie from the [small movies example](https://github.com/sanders41/async-search-client/blob/main/datasets/small_movies.json) you could put the results into an object with the following
49+
As an example, if you want to get a movie from the [small movies example](https://github.com/sanders41/meilisearch-python-async/blob/main/datasets/small_movies.json) you could put the results into an object with the following
4750

4851
```py
4952
from datetime import datetime
5053
from typing import Optional
5154

52-
from async_search_client import Client
53-
from async_search_client.models import CamelBase
55+
from meilisearch_python_async import Client
56+
from meilisearch_python_async.models import CamelBase
5457

5558

5659
# Inheriting from CamelBase will allow your class to automatically convert
@@ -84,17 +87,16 @@ Movie(
8487
)
8588
```
8689

87-
By inheriting from CamelBase, or any of the other [provided models](https://github.com/sanders41/async-search-client/tree/main/async_search_client/models)
90+
By inheriting from CamelBase, or any of the other [provided models](https://github.com/sanders41/meilisearch-python-async/tree/main/meilisearch_python_async/models)
8891
you will be inheriting Pydantic models and therefore have access to the funcitonality Pydantic provides
89-
such as [validators](https://pydantic-docs.helpmanual.io/usage/validators/) and [Fields](https://pydantic-docs.helpmanual.io/usage/model_config/#alias-precedence). Pydantic will also automatically deserialized the data into the correct data type
90-
based on the type hint provided.
92+
such as [validators](https://pydantic-docs.helpmanual.io/usage/validators/) and [Fields](https://pydantic-docs.helpmanual.io/usage/model_config/#alias-precedence). Pydantic will also automatically deserialized the data into the correct data type based on the type hint provided.
9193

9294
## Installation
9395

9496
Using a virtual environmnet is recommended for installing this package. Once the virtual environment is created and activated install the package with:
9597

9698
```sh
97-
pip install async-search-client
99+
pip install meilisearch-python-async
98100
```
99101

100102
## Run MeiliSearch
@@ -116,7 +118,7 @@ docker run -it --rm -p 7700:7700 getmeili/meilisearch:latest ./meilisearch --mas
116118
* Note: `client.index("books") creates an instance of an Index object but does not make a network call to send the data yet so it does not need to be awaited.
117119

118120
```py
119-
from async_search_client import Client
121+
from meilisearch_python_async import Client
120122

121123
async with Client('http://127.0.0.1:7700', 'masterKey') as client:
122124
index = client.index("books")
@@ -144,7 +146,7 @@ Splitting documents into batches can be useful with large dataset because it red
144146
during indexing.
145147

146148
```py
147-
from async_search_client import Client
149+
from meilisearch_python_async import Client
148150

149151
async with Client('http://127.0.0.1:7700', 'masterKey') as client:
150152
index = client.index("books")

async_search_client/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

async_search_client/models/__init__.py

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from meilisearch_python_async.client import Client # noqa: F401

async_search_client/_http_requests.py renamed to meilisearch_python_async/_http_requests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
Response,
1010
)
1111

12-
from async_search_client.errors import MeiliSearchApiError, MeiliSearchCommunicationError
12+
from meilisearch_python_async.errors import MeiliSearchApiError, MeiliSearchCommunicationError
1313

1414

1515
class _HttpRequests:

async_search_client/client.py renamed to meilisearch_python_async/client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55

66
from httpx import AsyncClient
77

8-
from async_search_client._http_requests import _HttpRequests
9-
from async_search_client.errors import MeiliSearchApiError
10-
from async_search_client.index import Index
11-
from async_search_client.models import ClientStats, DumpInfo, Health, IndexInfo, Keys, Version
8+
from meilisearch_python_async._http_requests import _HttpRequests
9+
from meilisearch_python_async.errors import MeiliSearchApiError
10+
from meilisearch_python_async.index import Index
11+
from meilisearch_python_async.models import ClientStats, DumpInfo, Health, IndexInfo, Keys, Version
1212

1313

1414
class Client:

0 commit comments

Comments
 (0)