Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: addition of param and result sections #33

Merged
merged 1 commit into from
Aug 2, 2016

Conversation

hachreak
Copy link
Member

Signed-off-by: Leonardo Rossi leonardo.r@cern.ch

@hachreak hachreak force-pushed the 31_docs branch 5 times, most recently from a17fe11 to 54a9611 Compare July 22, 2016 12:24
@hachreak hachreak added this to the I3B-API-Docs milestone Jul 22, 2016
@hachreak hachreak self-assigned this Jul 22, 2016
@@ -49,7 +49,7 @@

extras_require = {
'docs': [
'Sphinx>=1.4.2',
'Sphinx==1.4.4',
Copy link
Member

@jirikuncar jirikuncar Jul 25, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep it >=1.4.4 and remove :undoc-members: that cause problems with autodoc module (anyway we should not have any undocumented functions/attributes).

@hachreak hachreak force-pushed the 31_docs branch 2 times, most recently from 3d1e4a4 to 99ebeaf Compare July 26, 2016 12:05
@hachreak hachreak changed the title docs: improve documentation docs: addition of param and result sections Jul 26, 2016

Example of bulk indexing:

.. code-block:: python
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hachreak if we present python examples in the docstrings they should be runnable via doctests.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the tests are passing, it means that it's fine? Or I need to do something more?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well the point is that the docstring is not tested so if something changes we will have outdated example.

:param exchange: ``kombu.Exchange`` instance for message queue.
:param queue: ``kombu.Queue`` instance for message queue.
:param routing_key: Routing key for message queue.
:param version_type: Elasticsearch version type. Defaults to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hachreak hachreak force-pushed the 31_docs branch 4 times, most recently from cc7ce56 to bcef1a6 Compare July 29, 2016 13:32
If it fails, return the default values.

:param record: The record object.
:returns: Tuple (index, doc_type)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing .

@@ -223,6 +258,8 @@ def _bulk_op(self, record_id_iterator, op_type, index=None, doc_type=None):
:param record_id_iterator: Iterator that yields record UUIDs.
:param op_type: Indexing operation (one of ``index``, ``create``,
``delete`` or ``update``).
:param index: The Elasticsearch index (Default: ``None``).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you move the dot before (Default ...)?

@hachreak hachreak force-pushed the 31_docs branch 2 times, most recently from f17c083 to 82ecec3 Compare August 2, 2016 08:36
@hachreak
Copy link
Member Author

hachreak commented Aug 2, 2016

ping @jirikuncar


r"""Minimal Flask application example for development.


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too many empty lines?

@jirikuncar
Copy link
Member

@hachreak we can merge the docs improvements. Can you move the example app to separate PR so we have time to check it well? Thanks

* Improves documentation. (addresses inveniosoftware#31)

Signed-off-by: Leonardo Rossi <leonardo.r@cern.ch>
@hachreak
Copy link
Member Author

hachreak commented Aug 2, 2016

ping @jirikuncar

@jirikuncar jirikuncar merged commit fd19168 into inveniosoftware:master Aug 2, 2016
@hachreak hachreak deleted the 31_docs branch September 19, 2016 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants