Skip to content

Commit

Permalink
refactor(client): use lowercase "conjunction" and "unit" in "create_job"
Browse files Browse the repository at this point in the history
  • Loading branch information
graczhual committed Apr 11, 2022
1 parent 526a7e9 commit b13f3a1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions docs/code/basic_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
dataset_client.basic_search.create_job(
title="search example",
description="search description",
conjunction="AND",
unit="FILE",
conjunction="and",
unit="file",
filters=[
(
"category",
Expand Down
8 changes: 4 additions & 4 deletions docs/code/search_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
job = dataset_client.basic_search.create_job(
title="search example",
description="search description",
conjunction="AND",
unit="FILE",
conjunction="and",
unit="file",
filters=[
(
"category",
Expand Down Expand Up @@ -61,8 +61,8 @@
job = dataset_client.basic_search.create_job(
title="search example",
description="search description",
conjunction="AND",
unit="Frame",
conjunction="and",
unit="frame",
filters=[
("sensor", "in", ["CAM_BACK_RIGHT", "CAM_FRONT"]),
("size", ">", 0),
Expand Down
6 changes: 3 additions & 3 deletions docs/source/features/search/basic_search.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ A BasicSearchJob can be created by :func:`~tensorbay.client.version.BasicSearch.
:end-before: """"""

.. note::
``conjunction``: The logical conjunction between search filters, which includes "AND" and "OR".
``conjunction``: The logical conjunction between search filters, which includes "and" and "or".

.. note::
``unit``:The unit of basic search. There are two options:
* "FILE": Get the data that meets search filters;
* "FRAME": If at least one data in a frame meets search filters, all data in the frame will be get. This option only works on fusion dataset.
* "file": Get the data that meets search filters;
* "frame": If at least one data in a frame meets search filters, all data in the frame will be get. This option only works on fusion dataset.

.. note::
``filters``: The list of basic search criteria whose format is (key, operator, value, label_type).
Expand Down
4 changes: 2 additions & 2 deletions tests/test_basic_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ def init_job(dataset_client):
job = dataset_client.basic_search.create_job(
title="basic search job example",
description="search description",
conjunction="AND",
unit="FILE",
conjunction="and",
unit="file",
filters=[
(
"category",
Expand Down

0 comments on commit b13f3a1

Please sign in to comment.