Skip to content

Commit

Permalink
Merge #368
Browse files Browse the repository at this point in the history
368: Remove tests from wheel r=alallema a=sanders41

# Pull Request

## What does this PR do?
Fixes #367

I also added Python 3.10 to the list of supported versions.

## PR checklist
Please check if your PR fulfills the following requirements:
- [x] Does this PR fix an existing issue?
- [x] Have you read the contributing guidelines?
- [x] Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to MeiliSearch!


Co-authored-by: Paul Sanders <psanders1@gmail.com>
  • Loading branch information
bors[bot] and sanders41 authored Dec 6, 2021
2 parents 38d862e + cede993 commit 66b1f31
Show file tree
Hide file tree
Showing 34 changed files with 12 additions and 11 deletions.
6 changes: 3 additions & 3 deletions meilisearch/index.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import urllib
from urllib import parse
from datetime import datetime
from time import sleep
from typing import Any, Dict, Generator, List, Optional, Union
Expand Down Expand Up @@ -313,7 +313,7 @@ def get_documents(self, parameters: Optional[Dict[str, Any]] = None) -> List[Dic
if parameters is None:
parameters = {}
return self.http.get(
f'{self.config.paths.index}/{self.uid}/{self.config.paths.document}?{urllib.parse.urlencode(parameters)}'
f'{self.config.paths.index}/{self.uid}/{self.config.paths.document}?{parse.urlencode(parameters)}'
)

def add_documents(
Expand Down Expand Up @@ -1240,5 +1240,5 @@ def _build_url(
) -> str:
if primary_key is None:
return f'{self.config.paths.index}/{self.uid}/{self.config.paths.document}'
primary_key = urllib.parse.urlencode({'primaryKey': primary_key})
primary_key = parse.urlencode({'primaryKey': primary_key})
return f'{self.config.paths.index}/{self.uid}/{self.config.paths.document}?{primary_key}'
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/meilisearch/meilisearch-python",
packages=find_packages(),
packages=find_packages(exclude=("tests*",)),
project_urls={"Documentation": "https://docs.meilisearch.com/",},
keywords="search python meilisearch",
platform="any",
Expand All @@ -25,6 +25,7 @@
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# pylint: disable=invalid-name

import meilisearch
from meilisearch.tests import BASE_URL, MASTER_KEY
from tests import BASE_URL, MASTER_KEY


def test_get_client():
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# pylint: disable=invalid-name

import pytest
from meilisearch.tests import wait_for_dump_creation
from tests import wait_for_dump_creation
from meilisearch.errors import MeiliSearchApiError

def test_dump_creation(client, index_with_documents):
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion meilisearch/tests/conftest.py β†’ tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import json
from pytest import fixture

from meilisearch.tests import common
from tests import common
import meilisearch

@fixture(scope='session')
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import requests
import meilisearch
from meilisearch.errors import MeiliSearchApiError
from meilisearch.tests import BASE_URL, MASTER_KEY
from tests import BASE_URL, MASTER_KEY

def test_meilisearch_api_error_no_master_key():
client = meilisearch.Client(BASE_URL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import requests
import meilisearch
from meilisearch.errors import MeiliSearchCommunicationError
from meilisearch.tests import MASTER_KEY
from tests import MASTER_KEY


@patch("requests.post")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import requests
import meilisearch
from meilisearch.errors import MeiliSearchTimeoutError
from meilisearch.tests import BASE_URL, MASTER_KEY
from tests import BASE_URL, MASTER_KEY


@patch("requests.get")
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from meilisearch.client import Client
from meilisearch.errors import MeiliSearchApiError
from meilisearch.index import Index
from meilisearch.tests import BASE_URL, common, MASTER_KEY
from tests import BASE_URL, common, MASTER_KEY

def test_create_index(client):
"""Tests creating an index."""
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 66b1f31

Please sign in to comment.