Skip to content

Commit 7dcea78

Browse files
committed
Merge branch 'docrun-pre-commit' of github.com:VWS-Python/vws-python into docrun-pre-commit
2 parents 1ed7e80 + 5113f9d commit 7dcea78

File tree

2 files changed

+34
-33
lines changed

2 files changed

+34
-33
lines changed

README.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ Getting Started
2626
2727
from vws import VWS, CloudRecoService
2828
29-
server_access_key = '[server-access-key]'
30-
server_secret_key = '[server-secret-key]'
31-
client_access_key = '[client-access-key]'
32-
client_secret_key = '[client-secret-key]'
29+
server_access_key = "[server-access-key]"
30+
server_secret_key = "[server-secret-key]"
31+
client_access_key = "[client-access-key]"
32+
client_secret_key = "[client-secret-key]"
3333
3434
vws_client = VWS(
3535
server_access_key=server_access_key,
@@ -39,10 +39,10 @@ Getting Started
3939
client_access_key=client_access_key,
4040
client_secret_key=client_secret_key,
4141
)
42-
name = 'my_image_name'
42+
name = "my_image_name"
4343
44-
image = pathlib.Path('high_quality_image.jpg')
45-
with image.open(mode='rb') as my_image_file:
44+
image = pathlib.Path("high_quality_image.jpg")
45+
with image.open(mode="rb") as my_image_file:
4646
target_id = vws_client.add_target(
4747
name=name,
4848
width=1,

docs/source/index.rst

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ See the :doc:`api-reference` for full usage details.
2222
2323
from vws import VWS, CloudRecoService
2424
25-
server_access_key = '[server-access-key]'
26-
server_secret_key = '[server-secret-key]'
27-
client_access_key = '[client-access-key]'
28-
client_secret_key = '[client-secret-key]'
25+
server_access_key = "[server-access-key]"
26+
server_secret_key = "[server-secret-key]"
27+
client_access_key = "[client-access-key]"
28+
client_secret_key = "[client-secret-key]"
2929
3030
vws_client = VWS(
3131
server_access_key=server_access_key,
@@ -36,19 +36,20 @@ See the :doc:`api-reference` for full usage details.
3636
client_secret_key=client_secret_key,
3737
)
3838
import uuid
39-
name = 'my_image_name' + uuid.uuid4().hex
40-
41-
image = pathlib.Path('high_quality_image.jpg')
42-
with image.open(mode='rb') as my_image_file:
43-
target_id = vws_client.add_target(
44-
name=name,
45-
width=1,
46-
image=my_image_file,
47-
active_flag=True,
48-
application_metadata=None,
49-
)
50-
vws_client.wait_for_target_processed(target_id=target_id)
51-
matching_targets = cloud_reco_client.query(image=my_image_file)
39+
40+
name = "my_image_name" + uuid.uuid4().hex
41+
42+
image = pathlib.Path("high_quality_image.jpg")
43+
with image.open(mode="rb") as my_image_file:
44+
target_id = vws_client.add_target(
45+
name=name,
46+
width=1,
47+
image=my_image_file,
48+
active_flag=True,
49+
application_metadata=None,
50+
)
51+
vws_client.wait_for_target_processed(target_id=target_id)
52+
matching_targets = cloud_reco_client.query(image=my_image_file)
5253
5354
assert matching_targets[0].target_id == target_id
5455
a = 1
@@ -84,15 +85,15 @@ To write unit tests for code which uses this library, without using your Vuforia
8485
client_secret_key=database.client_secret_key,
8586
)
8687
87-
image = pathlib.Path('high_quality_image.jpg')
88-
with image.open(mode='rb') as my_image_file:
89-
target_id = vws_client.add_target(
90-
name="example_image_name",
91-
width=1,
92-
image=my_image_file,
93-
application_metadata=None,
94-
active_flag=True,
95-
)
88+
image = pathlib.Path("high_quality_image.jpg")
89+
with image.open(mode="rb") as my_image_file:
90+
target_id = vws_client.add_target(
91+
name="example_image_name",
92+
width=1,
93+
image=my_image_file,
94+
application_metadata=None,
95+
active_flag=True,
96+
)
9697
9798
There are some differences between the mock and the real Vuforia.
9899
See https://vws-python-mock.readthedocs.io/en/latest/differences-to-vws.html for details.

0 commit comments

Comments
 (0)