Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

add ping method to the client #409

Merged
merged 8 commits into from
Nov 16, 2017
Merged

add ping method to the client #409

merged 8 commits into from
Nov 16, 2017

Conversation

pmenglund
Copy link
Contributor

a method to invoke the /ping endpoint so it is easy to verify connectivity

@@ -410,6 +410,18 @@ def write_points(self,
retention_policy=retention_policy,
tags=tags, protocol=protocol)

def ping(self):
"""Check connectivity to influxdb
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor thing, but summary should end in a period and influxdb replaced with InfluxDB, so that it will be in the same style as other docstrings. Also, there should be a blank line after the summary line (PEP 257). Otherwise, having this method would be really useful in my opinion 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I'll fix that

"""

Copy link
Contributor

Choose a reason for hiding this comment

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

Blank line should be after the summary line (i.e. the first line of the docstring), before the description. In PEP 257 no blank lines allowed after the method's docstring. Also, please note that PEP 257 requires that the first line of the docstring ends with the period.
On the other side, there are currently quite many inconsistencies in the client's docstrings and tox does not check code for PEP 257. May be all these inconsistencies should be revised in a separate PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Doh! I'll fix that, and create an issue for fixing pep257 in the remaining files

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Created #415

Copy link
Contributor

@smolse smolse left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@xginn8 xginn8 left a comment

Choose a reason for hiding this comment

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

squash down into one commit and this looks good! thank you!

xginn8
xginn8 previously approved these changes Nov 15, 2017
Copy link
Collaborator

@xginn8 xginn8 left a comment

Choose a reason for hiding this comment

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

looks good, thanks for contributing!

@xginn8 xginn8 merged commit 16c02ec into influxdata:master Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants