Skip to content

Commit

Permalink
Black all files
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkkul committed Nov 7, 2022
1 parent 7cbf547 commit d744381
Show file tree
Hide file tree
Showing 74 changed files with 3,764 additions and 4,323 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Check out our `Command Line Interface (CLI) tool <https://pypi.org/project/weavi
Articles
--------

Here are some articles on Weaviate:
Here are some articles on Weaviate:

- `Semantic Search Queries Return More Informed Results <https://hackernoon.com/semantic-search-queries-return-more-informed-results-nr5335nw>`_
- `Getting Started with Weaviate Python Library <https://towardsdatascience.com/getting-started-with-weaviate-python-client-e85d14f19e4f>`_
Expand Down
12 changes: 6 additions & 6 deletions docs/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ Add new modules/sub-packages to the documentation

All the pages of the documentation are contained in this folder and have the extension ``.rst``.

To add a new module/sub-packages just add another file with the name corresponding to its path. See the examples of the ``.rst`` files.
Add the newly created ``.rst`` page to the appropriate existing package.
To add a new module/sub-packages just add another file with the name corresponding to its path. See the examples of the ``.rst`` files.
Add the newly created ``.rst`` page to the appropriate existing package.

For example is the new module has the path ``weaviate/new_module.py``, the new ``.rst`` file should be ``weaviate.new_module.rst``.
For example is the new module has the path ``weaviate/new_module.py``, the new ``.rst`` file should be ``weaviate.new_module.rst``.
Then add ``weaviate.new_module`` to the ``weaviate.rst`` file, under the **Subpackages**, along with the existing sub-packages.

The ``.rst`` file can be generated using ``sphinx-apidoc --module-first -f -o . ../PATH_TO_THE_MODULE`` (for the case above ``PATH_TO_THE_MODULE=weaviate/new_module.py``).
You can edit the newly generated file to match the existing formats, or adjust it to your liking.

Also the ``.rst`` file can be created manually. You can get the inspiration from the existing modules/sub-packages ``.rst`` files.

Here is a link to a ``.rst`` `cheat sheet <https://github.com/ralsina/rst-cheatsheet/blob/master/rst-cheatsheet.rst>`_.
Here is a link to a ``.rst`` `cheat sheet <https://github.com/ralsina/rst-cheatsheet/blob/master/rst-cheatsheet.rst>`_.
Another useful information about ``sphinx.ext.autodoc`` can be found `here <https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html>`_.
For more information on ``Sphinx`` visit the official `website <https://www.sphinx-doc.org/en/master/index.html>`_.

Expand All @@ -32,10 +32,10 @@ Make the documentation locally
| In order to build the HTML documentation locally run:
.. code-block:: bash
make html # from the 'docs' directory
| The HTML files can be found in the generated `_build` directory.
| The HTML files can be found in the generated `_build` directory.
| If you want to view the HTML documentation run the following command:
.. code-block:: bash
Expand Down
32 changes: 16 additions & 16 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ This minor version includes:
)
- Multi-threading :class:`~weaviate.batch.Batch` import:
- |
- |
Now it is possible to import data using multi-threading. The number of threads can be set using the new argument ``num_workers`` in
:meth:`~weaviate.batch.Batch.configure` and :meth:`~weaviate.batch.Batch.__call__`, defaults to `1` ( Use with care to not overload your weaviate instance.).
- |
New argument ``connection_error_retries`` to retry on ``ConnectionError`` that can be set in :meth:`~weaviate.batch.Batch.configure` and :meth:`~weaviate.batch.Batch.__call__`
or using the property getter/setter: ``client.batch.connection_error_retries`` to get the value and ``client.batch.connection_error_retries = 5`` to set the value.
- |
New method :meth:`~weaviate.batch.Batch.start` to create a ``BatchExecutor`` (``ThreadExecutor``). This method does NOT need to be called if using the
New method :meth:`~weaviate.batch.Batch.start` to create a ``BatchExecutor`` (``ThreadExecutor``). This method does NOT need to be called if using the
:class:`~weaviate.batch.Batch` in a context manager (``with``). Also it is idempotent.
- |
New method :meth:`~weaviate.batch.Batch.shutdown` to shutdown the existing ``BatchExecutor`` (``ThreadExecutor``) to release any resources that it is holding once the
Expand Down Expand Up @@ -59,7 +59,7 @@ This minor version includes:
- Adds base Weaviate Exception :class:`~weaviate.exceptions.WeaviateBaseError`.
- Adds ability to set proxies. Can be set at :class:`~weaviate.client.Client` initialization by using the new ``proxies`` or ``trust_env`` arguments.
- :class:`~weaviate.batch.crud_batch.Batch` creates UUIDs (UUIDv4) for all added objects that do not have one at client side (fixes data duplication on Batch retries).
- Adds new methods for :class:`~weaviate.wcs.WCS` for instances that have authentication enabled:
- Adds new methods for :class:`~weaviate.wcs.WCS` for instances that have authentication enabled:
- :meth:`~weaviate.wcs.WCS.get_users_of_cluster` to get users (emails) for all the users that have access to the created Weaviate instance.
- :meth:`~weaviate.wcs.WCS.add_user_to_cluster` to add users (email) to the created Weaviate instance.
- :meth:`~weaviate.wcs.WCS.remove_user_from_cluster` to remove user (email) from the created Weaviate instance.
Expand All @@ -70,13 +70,13 @@ This minor version includes:

- New function in :func:`~weaviate.util.check_batch_result` used to print errors from batch creation.

- New function argument ``class_name`` for :func:`~weaviate.util.generate_local_beacon`, used ONLY with Weaviate Server version >= ``1.14.0``
- New function argument ``class_name`` for :func:`~weaviate.util.generate_local_beacon`, used ONLY with Weaviate Server version >= ``1.14.0``
(defaults to ``None`` for backwards compatibility).

- | :func:`~weaviate.util.check_batch_result` is the default ``callback`` function for :class:`~weaviate.batch.Batch`
- | :func:`~weaviate.util.check_batch_result` is the default ``callback`` function for :class:`~weaviate.batch.Batch`
(:meth:`~weaviate.batch.Batch.configure` and :meth:`~weaviate.batch.Batch.__call__`) (instead of ``None``).

- | New method argument ``to_object_class_name`` for :meth:`~weaviate.batch.Batch.add_reference`, used ONLY with Weaviate Server version >= ``1.14.0``
- | New method argument ``to_object_class_name`` for :meth:`~weaviate.batch.Batch.add_reference`, used ONLY with Weaviate Server version >= ``1.14.0``
(defaults to ``None`` for backwards compatibility).

- Support for ``distance`` in GraphQL filters (only with Weaviate server >= ``1.14.0``).
Expand All @@ -87,7 +87,7 @@ This minor version includes:
- Deprecation Warning if Weaviate Server version >= 1.14.0 and ``class_name`` is ``None`` OR if Weaviate Server version < 1.14.0 and ``class_name`` is NOT ``None``.

- For :class:`~weaviate.data.references.Reference`:
- | New method arguments ``from_class_name`` and ``to_class_name`` (``to_class_names`` for :meth:`~weaviate.data.references.Reference.update`) for
- | New method arguments ``from_class_name`` and ``to_class_name`` (``to_class_names`` for :meth:`~weaviate.data.references.Reference.update`) for
:meth:`~weaviate.data.references.Reference.add`, :meth:`~weaviate.data.references.Reference.delete`,
:meth:`~weaviate.data.references.Reference.update`, used ONLY with Weaviate Server version >= ``1.14.0`` (defaults to ``None`` for backwards compatibility).
- Deprecation Warning if Weaviate Server version >= 1.14.0 and ``class_name`` is ``None`` OR if Weaviate Server version < 1.14.0 and ``class_name`` is NOT ``None``.
Expand All @@ -112,13 +112,13 @@ This minor version contains functionality for the new features introduced in Wea

- | New :class:`~weaviate.gql.get.GetBuilder` method :meth:`~weaviate.gql.get.GetBuilder.with_sort` that allows sorting data on a particular field/s.

- | New :class:`~weaviate.gql.aggregate.AggregateBuilder` method :meth:`~weaviate.gql.aggregate.AggregateBuilder.with_near_text` that allows to
- | New :class:`~weaviate.gql.aggregate.AggregateBuilder` method :meth:`~weaviate.gql.aggregate.AggregateBuilder.with_near_text` that allows to
aggregate data that is matching ``nearText`` filter.

- | New :class:`~weaviate.gql.aggregate.AggregateBuilder` method :meth:`~weaviate.gql.aggregate.AggregateBuilder.with_near_object` that allows to
- | New :class:`~weaviate.gql.aggregate.AggregateBuilder` method :meth:`~weaviate.gql.aggregate.AggregateBuilder.with_near_object` that allows to
aggregate data that is matching ``nearObject`` filter.

- | New :class:`~weaviate.gql.aggregate.AggregateBuilder` method :meth:`~weaviate.gql.aggregate.AggregateBuilder.with_near_vector` that allows to
- | New :class:`~weaviate.gql.aggregate.AggregateBuilder` method :meth:`~weaviate.gql.aggregate.AggregateBuilder.with_near_vector` that allows to
aggregate data that is matching ``nearVector`` filter.

Version 3.4.2
Expand All @@ -141,7 +141,7 @@ Version 3.4.0
Version 3.3.3
-------------
| This patch version fixes the nearImage filter requests.
| This patch version fixes the nearImage filter requests.
Version 3.3.2
-------------
Expand All @@ -153,13 +153,13 @@ Version 3.3.1
Version 3.3.0
-------------
| This minor version adds a new :meth:`~weaviate.gql.get.GetBuilder.with_offset` for the ``Get`` queries. This method should be used
| This minor version adds a new :meth:`~weaviate.gql.get.GetBuilder.with_offset` for the ``Get`` queries. This method should be used
with the :meth:`~weaviate.gql.get.GetBuilder.with_limit`. This new feature (introduced in weaviate version ``1.8.0``) allows to
use pagination functionality with the ``Get`` queries. The ``offset`` represents the start index of the objects to be returned,
and the number of objects is specified by the :meth:`~weaviate.gql.get.GetBuilder.with_limit` method.
| For example, to list the
first ten results, set ``limit: 10``. Then, to "display the second page of 10", set ``offset: 10, limit: 10`` and so on. E.g.
first ten results, set ``limit: 10``. Then, to "display the second page of 10", set ``offset: 10, limit: 10`` and so on. E.g.
to show the 9th page of 10 results, set ``offset: 80, limit: 10`` to effectively display results 81-90.
Version 3.2.5
Expand Down Expand Up @@ -380,7 +380,7 @@ Version 3.1.1
- Fixes in :class:`~weaviate.wcs.WCS` class:
- | Make :class:`~weaviate.wcs.WCS`'s methods' argument ``cluster_name`` case insensitive (lowercased inside the method) to match Weaviate Cloud Service'
naming convention, this fixes the error when Weaviate Cloud Service lowercases the ``cluster_name`` but the users are not aware of this and get the exception
`KeyError`.
`KeyError`.

Version 3.1.0
-------------
Expand Down Expand Up @@ -413,7 +413,7 @@ Version 3.0.0
- ``WCS`` class is moved from the ``weaviate.tools`` to the new module ``weaviate.wcs``
- ``weaviate.tools.generate_uuid`` is REMOVED.
- :func:`weaviate.util.generate_uuid5` is ADDED.
- | New :class:`~weaviate.batch.Batch` class implementation to replace the old one. This implementation uses the ``BatchRequest``
- | New :class:`~weaviate.batch.Batch` class implementation to replace the old one. This implementation uses the ``BatchRequest``
objects under the hood, which means that there is no need to create ``BatchRequest``'s anymore. This new class implementation
allows 3 different batch creations methods: `manual`, `auto-create` and `auto-create` with dynamic batching.
See the :class:`~weaviate.batch.Batch` documentation for more information.
Expand Down
21 changes: 11 additions & 10 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@

import os
import sys
sys.path.insert(0, os.path.abspath('..'))

sys.path.insert(0, os.path.abspath(".."))
from weaviate import __version__

# -- Project information -----------------------------------------------------

project = 'Weaviate Python Client'
copyright = '2021, SeMI Technology'
author = 'SeMI Technology'
project = "Weaviate Python Client"
copyright = "2021, SeMI Technology"
author = "SeMI Technology"

# The full version, including alpha/beta/rc tags
release = __version__
Expand All @@ -31,23 +32,23 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.autosectionlabel',
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
"sphinx.ext.autosectionlabel",
]

# Make sure the target is unique
autosectionlabel_prefix_document = True

autoclass_content = 'both'
autoclass_content = "both"

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]


# -- Options for HTML output -------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Check out our `Command Line Interface (CLI) tool <https://pypi.org/project/weavi
Articles
--------

Here are some articles on weaviate:
Here are some articles on weaviate:

- `Semantic Search Queries Return More Informed Results <https://hackernoon.com/semantic-search-queries-return-more-informed-results-nr5335nw>`_
- `Getting Started with Weaviate Python Library <https://towardsdatascience.com/getting-started-with-weaviate-python-client-e85d14f19e4f>`_
Expand Down
6 changes: 3 additions & 3 deletions integration/people_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
{
"class": "Association",
"description": "A legal body that consists of a set of juristic persons. All juristic persons in a group are deliberate members.",
"moduleConfig":
"moduleConfig":
{
"text2vec-contextionary":
{
Expand All @@ -104,7 +104,7 @@
"dataType": [
"Person", "Association"
],
"moduleConfig":
"moduleConfig":
{
"text2vec-contextionary":
{
Expand All @@ -118,7 +118,7 @@
"dataType": [
"string"
],
"moduleConfig":
"moduleConfig":
{
"text2vec-contextionary":
{
Expand Down
Loading

0 comments on commit d744381

Please sign in to comment.