Skip to content

Commit e4fc9d3

Browse files
committed
Show more docs content
1 parent 896c2c5 commit e4fc9d3

File tree

6 files changed

+27
-17
lines changed

6 files changed

+27
-17
lines changed

docs/source/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
html_show_copyright = False
7777
html_show_sphinx = False
7878
html_show_sourcelink = False
79+
autoclass_content = 'both'
7980

8081
html_theme_options = {
8182
'show_powered_by': 'false',

docs/source/index.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ Reference
1515
---------
1616

1717
.. automodule:: vws
18+
:undoc-members:
19+
:members:
20+
21+
.. automodule:: vws.include_target_data
22+
:undoc-members:
1823
:members:
1924

2025
.. toctree::

spelling_private_dict.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
AuthenticationFailure
22
BadImage
33
ImageTooLarge
4+
MaxNumResultsOutOfRange
45
MetadataTooLarge
56
ProjectInactive
67
TargetNameExist

src/vws/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@
33
"""
44

55
from ._version import get_versions
6-
from .query import CloudRecoIncludeTargetData, CloudRecoService
6+
from .query import CloudRecoService
77
from .vws import VWS
88

99
__all__ = [
1010
'CloudRecoService',
11-
'CloudRecoIncludeTargetData',
1211
'VWS',
1312
]
1413

src/vws/include_target_data.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"""
2+
Tools for managing ``CloudRecoService.query``'s ``include_target_data``.
3+
"""
4+
5+
from enum import Enum
6+
7+
8+
class CloudRecoIncludeTargetData(Enum):
9+
"""
10+
Options for the ``include_target_data`` parameter of foo.
11+
"""
12+
13+
TOP = 'top'
14+
NONE = 'none'
15+
ALL = 'all'

src/vws/query.py

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,18 @@
33
"""
44

55
import io
6-
from enum import Enum
76
from typing import Any, Dict, List
87
from urllib.parse import urljoin
98

109
import requests
1110
from urllib3.filepost import encode_multipart_formdata
1211

1312
from ._authorization import authorization_header, rfc_1123_date
13+
from .include_target_data import CloudRecoIncludeTargetData
1414
from ._result_codes import raise_for_result_code
1515
from .exceptions import MaxNumResultsOutOfRange
1616

1717

18-
class CloudRecoIncludeTargetData(Enum):
19-
"""
20-
Options for the ``include_target_data`` parameter of
21-
``CloudRecoService.query``.
22-
"""
23-
24-
TOP = 'top'
25-
NONE = 'none'
26-
ALL = 'all'
27-
28-
2918
class CloudRecoService:
3019
"""
3120
An interface to the Vuforia Cloud Recognition Web APIs.
@@ -52,7 +41,7 @@ def query(
5241
image: io.BytesIO,
5342
max_num_results: int = 1,
5443
include_target_data:
55-
CloudRecoIncludeTargetData = CloudRecoIncludeTargetData.TOP,
44+
'CloudRecoIncludeTargetData' = CloudRecoIncludeTargetData.TOP,
5645
) -> List[Dict[str, Any]]:
5746
"""
5847
Use the Vuforia Web Query API to make an Image Recognition Query.
@@ -71,8 +60,8 @@ def query(
7160
none (return no target_data), all (for all matched targets)".
7261
7362
Raises:
74-
MaxNumResultsOutOfRange: ``max_num_results`` is not within the
75-
range (1, 50).
63+
~vws.exceptions.MaxNumResultsOutOfRange: `max_num_results`` is not
64+
within the range (1, 50).
7665
7766
Returns:
7867
An ordered list of target details of matching targets.

0 commit comments

Comments
 (0)