Skip to content

Commit

Permalink
fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianMindee committed Jan 15, 2024
1 parent b562c10 commit a4599ea
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 27 deletions.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
html_static_path = []

# A list of paths that contain extra files not directly related to the documentation.
html_extra_path = ["extras"]
Expand Down
16 changes: 16 additions & 0 deletions docs/parsing/generated.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
----------------
Generated Fields
----------------

Generated Lists
===============
.. autoclass:: mindee.parsing.generated.generated_list
:members:


Generated Objects
=================
.. autoclass:: mindee.parsing.generated.generated_object
:members:

.. autofunction:: mindee.parsing.generated.is_generated_object
1 change: 1 addition & 0 deletions docs/parsing/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ Parsing Utilities
./standard
./common
./custom
./generated

13 changes: 6 additions & 7 deletions docs/product/generated_v1.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
Generated V1
------------

**Sample Code:**

.. literalinclude:: /extras/code_samples/generated_v1_sync.txt
**Sample Code (sync):**

.. literalinclude:: /extras/code_samples/default.txt
:language: Python

.. literalinclude:: /extras/code_samples/generated_v1_async.txt
**Sample Code (async):**

.. literalinclude:: /extras/code_samples/default_async.txt
:language: Python

.. autoclass:: mindee.product.generated.generated_v1.GeneratedV1
Expand All @@ -20,7 +23,3 @@ Generated V1
.. autoclass:: mindee.product.generated.generated_v1.GeneratedV1Page
:members:
:inherited-members:

.. autoclass:: mindee.product.generated.generated_v1.GeneratedV1Prediction
:members:
:inherited-members:
2 changes: 1 addition & 1 deletion docs/product/international_id_v1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ International ID V1

**Sample Code:**

.. literalinclude:: /extras/code_samples/international_id_v1.txt
.. literalinclude:: /extras/code_samples/international_id_v1_async.txt
:language: Python

.. autoclass:: mindee.product.international_id.international_id_v1.InternationalIdV1
Expand Down
25 changes: 8 additions & 17 deletions mindee/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,32 +227,23 @@ def enqueue_and_parse(
"""
Enqueues to an asynchronous endpoint and automatically polls for a response.
:param product_class: The document class to use.
The response object will be instantiated based on this parameter.
:param product_class: The document class to use. The response object will be instantiated based on this parameter.
:param input_source: The document/source file to use.
Has to be created beforehand.
:param input_source: The document/source file to use. Has to be created beforehand.
:param include_words: Whether to include the full text for each page.
This performs a full OCR operation on the server and will increase response time.
:param include_words: Whether to include the full text for each page. This performs a full OCR operation on the server and will increase response time.
:param close_file: Whether to ``close()`` the file after parsing it.
Set to ``False`` if you need to access the file after this operation.
:param close_file: Whether to ``close()`` the file after parsing it. Set to ``False`` if you need to access the file after this operation.
:param page_options: If set, remove pages from the document as specified.
This is done before sending the file to the server.
It is useful to avoid page limitations.
:param page_options: If set, remove pages from the document as specified. This is done before sending the file to the server. It is useful to avoid page limitations.
:param cropper: Whether to include cropper results for each page.
This performs a cropping operation on the server and will increase response time.
:param cropper: Whether to include cropper results for each page. This performs a cropping operation on the server and will increase response time.
:param endpoint: For custom endpoints, an endpoint has to be given.
:param initial_delay_sec: Delay between each polling attempts
This should not be shorter than 4 seconds.
:param initial_delay_sec: Delay between each polling attempts This should not be shorter than 4 seconds.
:param delay_sec: Delay between each polling attempts
This should not be shorter than 2 seconds.
:param delay_sec: Delay between each polling attempts This should not be shorter than 2 seconds.
:param max_retries: Total amount of polling attempts.
"""
Expand Down
2 changes: 1 addition & 1 deletion mindee/product/generated/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from mindee.product.generated.generated_v1 import (
GeneratedV1,
GeneratedV1Document,
GeneratedV1Page,
GeneratedV1Page
)

0 comments on commit a4599ea

Please sign in to comment.