Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DR-98 strings update on new branch #845

Merged
merged 4 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
### Setup

We recommend to create a virtual environment to contribute to the client.
We recommend that you use a virtual environment to contribute to the client.

To create a virtual environment, activate it, and install dependencies, run the following shell code:

Run the following to create a virtual environment, activate it and install dependencies:
```shell
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements-devel.txt
```

The next time you open your shell, you can activate your virtual environment using `source .venv/bin/activate`
To activate your virtual environment, run `source .venv/bin/activate`.

To run local instance of Weaviate, we recommend using Docker (see https://weaviate.io/developers/weaviate/installation/docker-compose).
The newest client versions sometimes require upcoming Weaviate core features. We recommend using Docker (see https://weaviate.io/developers/weaviate/installation/docker-compose) to run a local instance of the `latest Weaviate core <https://hub.docker.com/r/semitechnologies/weaviate/tags>`_ for client development.

#### Installation

To install the library into your virtual environment while in development, we recommend installing it in “edit mode”:
To install a development version of the Python client library in your virtual environment, use “edit mode”:

```shell
pip install -e /PATH/TO/WEAVIATE-PYTHON-CLIENT
Expand All @@ -36,23 +37,24 @@ pip install git+https://github.com/weaviate/weaviate-python-client.git@BRANCH_NA

### Testing

> Note: We use [pytest](https://docs.pytest.org) to write tests, however many older tests use [unittest](https://docs.python.org/3/library/unittest.html). Regardless, the below commands will run all tests.
> Note: We use [pytest](https://docs.pytest.org) to write tests for new client code. However, many older tests use [unittest](https://docs.python.org/3/library/unittest.html). These commands run the `pytest` and `unittest` tests.

There are three kinds of tests:
- Unit tests, that test individual components of the client
- Integration tests, that test the client with a running weaviate instance
- Mock tests, where a weaviate instance is mocked to return specific replies
- Unit tests test individual client components.
- Integration tests use a running weaviate instance to test the client.
- Mock tests simulate a weaviate instance to return specific values.

To run the integration tests,

1. Ensure that you have Docker installed, and then
2. Start the weaviate instances with:
1. Ensure that you have Docker installed.
2. Start the weaviate instances.

```shell
./ci/start_weaviate.sh
```

Then run all tests with
3. Run the tests.

```
pytest integration
pytest mock_tests
Expand All @@ -62,7 +64,7 @@ pytest test
### Linting

> **Note**
> We strongly recommend to use [pre-commit](https://pre-commit.com/) to automatically run all linters locally on each commit. Install on your system and then enable it using `pre-commit install`.
> We strongly recommend using [pre-commit](https://pre-commit.com/) to automatically run all linters locally on each commit. Install `pre-commit` on your system, and then enable it with `pre-commit install`.

We use the following tools to ensure a high code quality:
- black (formatter), run with `black $FOLDER_WITH_CHANGES`
Expand Down
9 changes: 5 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,18 @@ Here are some articles on Weaviate:
Documentation
-------------

- `Documentation <https://weaviate-python-client.readthedocs.io>`_
- More examples can be found at `weaviate.io <https://weaviate.io/developers/weaviate/client-libraries/python>`_.
- `Weaviate Python client overview <https://weaviate.io/developers/weaviate/client-libraries/python>`_.
- `Weaviate documentation <https://weaviate.io/developers/weaviate>`_.
- `Additional reference documentation <https://weaviate-python-client.readthedocs.io>`_

Support
-------

- Use our `Forum <https://forum.weaviate.io>`_ for support or any other question.
- Use our `Slack Channel <https://weaviate.io/slack>`_ for discussions or any other question.
- Use the ``weaviate`` tag on `StackOverflow <https://stackoverflow.com/questions/tagged/weaviate>`_ for questions.
- For bugs and/or problems with the package, submit a GitHub `issue <https://github.com/weaviate/weaviate-python-client/issues>`_.
- For bugs or problems, submit a GitHub `issue <https://github.com/weaviate/weaviate-python-client/issues>`_.

Contributing
------------
To contribute read `How to Contribute <https://github.com/weaviate/weaviate-python-client/blob/main/CONTRIBUTING.md>`_.
To contribute, read `How to Contribute <https://github.com/weaviate/weaviate-python-client/blob/main/CONTRIBUTING.md>`_.
43 changes: 12 additions & 31 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

.. toctree::
:maxdepth: 2

Welcome to Weaviate Python Client's documentation!
==================================================

Expand All @@ -18,17 +21,13 @@ Welcome to Weaviate Python Client's documentation!
:target: https://badge.fury.io/py/weaviate-client
:alt: PyPI version

A python native client for easy interaction with a Weaviate instance.

The client is tested for python 3.8 and higher.
The Python client makes it easy to work with `Weaviate <https://weaviate.io/>`_. The client is tested for python 3.8 and higher.

Visit the official `Weaviate <https://weaviate.io/>`_ website for more information about the Weaviate and how to use it in production.
There are two versions of the Weaviate Python client. The latest version, v4, is redesigned to take advantage of a faster query interface and offers improved programming features. For more information, see:

Check out our `Command Line Interface (CLI) tool <https://pypi.org/project/weaviate-cli/>`_ for interacting with a Weaviate instance directly from your Terminal.


.. contents:: Table of Contents
:depth: 2
- `Python Client v4 overview <https://weaviate.io/developers/weaviate/client-libraries/python>`_
- `Python Client v3 overview <https://weaviate.io/developers/weaviate/client-libraries/python_v3>`_
- `Weaviate feature documentation and examples <https://weaviate.io/developers/weaviate>`_

Articles
--------
Expand All @@ -39,33 +38,15 @@ Here are some articles on Weaviate:
- `Getting Started with Weaviate Python Library <https://towardsdatascience.com/getting-started-with-weaviate-python-client-e85d14f19e4f>`_
- `A sub-50ms neural search with DistilBERT and Weaviate <https://towardsdatascience.com/a-sub-50ms-neural-search-with-distilbert-and-weaviate-4857ae390154>`_


Weaviate Python Library
-----------------------
.. toctree::
:maxdepth: 2
:caption: Contents:

weaviate

Support
-------

- Use our `Slack Channel <https://join.slack.com/t/weaviate/shared_invite/zt-goaoifjr-o8FuVz9b1HLzhlUfyfddhw>`_ for support or any other question.
- Use our `Forum <https://forum.weaviate.io>`_ for support or any other question.
- Use our `Slack Channel <https://weaviate.io/slack>`_ for discussions or any other question.
- Use the ``weaviate`` tag on `StackOverflow <https://stackoverflow.com/questions/tagged/weaviate>`_ for questions.
- For bugs and/or problems with the package submit a Github `issue <https://github.com/weaviate/weaviate-python-client/issues>`_.
- For bugs or problems, submit a GitHub `issue <https://github.com/weaviate/weaviate-python-client/issues>`_.

Changelog
---------
.. toctree::
:maxdepth: 2

changelog

Indices and tables
==================

* :ref:`genindex`
* :ref:`search`

.. * :ref:`modindex`
`Python client releases <https://github.com/weaviate/weaviate-python-client/releases>`_
3 changes: 1 addition & 2 deletions weaviate/connect/v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,7 @@ def _create_sessions(self, auth_client_secret: Optional[AuthCredentials]) -> Non
else:
msg = f""""No login credentials provided. The weaviate instance at {self.url} requires login credentials.

Please check our documentation at https://weaviate.io/developers/weaviate/client-libraries/python#authentication
for more information about how to use authentication."""
For more information, see: https://weaviate.io/developers/weaviate/client-libraries/python#authentication"""

if is_weaviate_domain(self.url):
msg += """
Expand Down
1 change: 0 additions & 1 deletion weaviate/error_msgs.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"multi-threading. To enable built-in multi-threading, set `batch_size` in "
" `client.batch.configure()` to an integer value . See also:"
"https://weaviate.io/developers/weaviate/current/restful-api-references/"
"batch.html#example-request-1"
)


Expand Down
Loading