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

Update apidocs for sphinx-generated documentation, which follows at l… #93

Merged
merged 8 commits into from
Nov 18, 2017

Conversation

rytilahti
Copy link
Owner

@rytilahti rytilahti commented Oct 19, 2017

…ater point. Includes also some slight clean-ups.

Note: marking this as WIP as the sphinx-generated doc part will follow at later point in time. For now this is here up for a review & to wait for fixing a couple of added FIXMEs.

The idea is to tidy up the README.md (and convert to .rst), and have a proper separated documentation.

@@ -282,7 +309,15 @@ def __repr__(self) -> str:


class ConsumableStatus:
"""Container for consumable status information."""
"""Container for consumable status information,
including information about brushes and duration until they should be changed.

Choose a reason for hiding this comment

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

line too long (82 > 79 characters)

return error_codes[self.data[4]]

@property
def complete(self) -> bool:
"""Return True if the cleaning run was complete (e.g. without errors), see also :func:`error`."""

Choose a reason for hiding this comment

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

line too long (105 > 79 characters)

return int(self.data[2])

@property
def ids(self) -> List[int]:
"""A list of available cleaning IDs, see also :class:`CleaningDetails`."""

Choose a reason for hiding this comment

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

line too long (82 > 79 characters)

return self.is_on
# we are not using in_cleaning as it does not seem to work properly.
# return bool(self.data["in_cleaning"])

@property
def is_on(self) -> bool:
"""Return True if cleaning (automatic, manual or spot)."""
"""True if device is currently cleaning (either automatic, manual or spot)."""

Choose a reason for hiding this comment

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

line too long (86 > 79 characters)

return bool(self.data["map_present"])

@property
@deprecated("See is_on")
def in_cleaning(self) -> bool:
"""True if currently cleaning. Please use :func:`is_on` instead of this."""

Choose a reason for hiding this comment

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

line too long (83 > 79 characters)

@@ -161,7 +190,14 @@ def discover(addr: str=None) -> Any:
break

def send(self, command: str, parameters: Any=None, retry_count=3) -> Any:
"""Build and send the given command."""
"""Build and send the given command.
Note that this will implicitly call :func:`do_discover` to do a handshake,

Choose a reason for hiding this comment

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

line too long (82 > 79 characters)

"""Base class for all device implementations.
This is the main class providing the basic protocol handling for devices using
the ``miIO`` protocol.
This class should not be initialized directly but a device-specific class inheriting

Choose a reason for hiding this comment

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

line too long (88 > 79 characters)

return self.data


class Device:
"""Base class for all device implementations."""
"""Base class for all device implementations.
This is the main class providing the basic protocol handling for devices using

Choose a reason for hiding this comment

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

line too long (82 > 79 characters)

tar = self.read_tar(password)
return tar.list()

def pack(self, fname, password=None):
"""Pack given directory `fname`, and encrypt with `password` if given."""

Choose a reason for hiding this comment

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

line too long (81 > 79 characters)

def __init__(self, fname=None):
"""Initializes AndroidBackup.
If `fname` is given, the file will be opened for reading in binary mode.

Choose a reason for hiding this comment

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

line too long (80 > 79 characters)

]

intersphinx_mapping = {'python': ('https://docs.python.org/3.6', None)}

Choose a reason for hiding this comment

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

blank line at end of file

docs/conf.py Outdated
'sphinx.ext.coverage',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',
'sphinx.ext.intersphinx']

Choose a reason for hiding this comment

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

continuation line under-indented for visual indent

'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',

Choose a reason for hiding this comment

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

continuation line under-indented for visual indent

docs/conf.py Outdated
'sphinx_autodoc_typehints',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.viewcode',

Choose a reason for hiding this comment

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

continuation line under-indented for visual indent

]

intersphinx_mapping = {'python': ('https://docs.python.org/3.6', None)}

Choose a reason for hiding this comment

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

blank line at end of file

docs/conf.py Outdated
'sphinx.ext.coverage',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',
'sphinx.ext.intersphinx']

Choose a reason for hiding this comment

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

continuation line under-indented for visual indent

'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',

Choose a reason for hiding this comment

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

continuation line under-indented for visual indent

docs/conf.py Outdated
'sphinx_autodoc_typehints',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.viewcode',

Choose a reason for hiding this comment

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

continuation line under-indented for visual indent

@rytilahti rytilahti changed the title WIP: Update apidocs for sphinx-generated documentation, which follows at l… Update apidocs for sphinx-generated documentation, which follows at l… Oct 21, 2017
@rytilahti rytilahti requested a review from syssi October 21, 2017 22:20
@coveralls
Copy link

coveralls commented Oct 21, 2017

Coverage Status

Coverage decreased (-0.02%) to 34.013% when pulling 4990c1b on apidocs_update into 61874e3 on master.

@syssi
Copy link
Collaborator

syssi commented Oct 24, 2017

I will review the PR this week!

@rytilahti
Copy link
Owner Author

Great, thanks! Running make html inside docs directory generates the documentation, tox -e docs can be used to run the "checks" against the current state.

@coveralls
Copy link

coveralls commented Oct 24, 2017

Coverage Status

Coverage increased (+5.4%) to 39.475% when pulling fd0d68c on apidocs_update into 61874e3 on master.

@coveralls
Copy link

coveralls commented Nov 18, 2017

Coverage Status

Coverage decreased (-0.01%) to 44.998% when pulling d04570a on apidocs_update into bd5e346 on master.

* Add Iterator import
* Remove android_backup documentation as we have moved to use upstream lib
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 44.98% when pulling 1518210 on apidocs_update into bd5e346 on master.

1 similar comment
@coveralls
Copy link

coveralls commented Nov 18, 2017

Coverage Status

Coverage decreased (-0.03%) to 44.98% when pulling 1518210 on apidocs_update into bd5e346 on master.

Repository owner deleted a comment from houndci-bot Nov 18, 2017
Repository owner deleted a comment from houndci-bot Nov 18, 2017
Repository owner deleted a comment from houndci-bot Nov 18, 2017
Repository owner deleted a comment from houndci-bot Nov 18, 2017
Repository owner deleted a comment from houndci-bot Nov 18, 2017
Repository owner deleted a comment from houndci-bot Nov 18, 2017
@coveralls
Copy link

coveralls commented Nov 18, 2017

Coverage Status

Coverage decreased (-0.03%) to 44.98% when pulling 62dfaf8 on apidocs_update into bd5e346 on master.

@rytilahti
Copy link
Owner Author

I will merge this now, we can do adjustments & reviews also after it has been merged (and this allows pointing users to readthedocs for help).

@rytilahti rytilahti merged commit 2c3d26c into master Nov 18, 2017
@rytilahti rytilahti deleted the apidocs_update branch February 5, 2019 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants