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

Add Example for sending information to DB via UDP #648

Merged
merged 6 commits into from
Apr 10, 2019
Merged

Add Example for sending information to DB via UDP #648

merged 6 commits into from
Apr 10, 2019

Conversation

shantanoo-desai
Copy link
Contributor

@shantanoo-desai shantanoo-desai commented Oct 4, 2018

Due to lack of documentation for UDP, this example
provides basic usage of sending information points
via UDP. The code structure followed is similar, if
not same as other examples in the examples directory.

Locally tested with:
InfluxDB v1.6.1 on Windows10 and influxdb-python v5.0.0
and should not break anything

Things To do

  • Update Documentation

This PR addresses #646 #647

Signed-off-by: Shantanoo shantanoo.desai@gmail.com

 Due to lack of documentation for UDP, this example
 provides basic usage of sending information points
 via UDP. The code structure followed is similar, if
 not same as other examples in the `examples` directory.

 Locally tested with:
 InfluxDB v1.6.1 on Windows10 and influxdb-python v5.0.0
 and should not break anything

Signed-off-by: Shantanoo <shantanoo.desai@gmail.com>
@shantanoo-desai
Copy link
Contributor Author

@aviau Any suggestions on how to overcome the failed tests?

@aviau
Copy link
Collaborator

aviau commented Oct 22, 2018

It looks like travis's pypy plugin is broken. I would probably merge a PR that disables pypy for now.

@shantanoo-desai
Copy link
Contributor Author

Should I change the .travis.yml file or will this be done by someone else?

@aviau
Copy link
Collaborator

aviau commented Oct 22, 2018

Yes, someone should do it.

That would be in a separate pull request.

@nevmerzhitsky
Copy link

Please finish the task

- This commit adds the `tutorial_udp.py`'s Documentation
  to the existing documentation sourcecode.

Signed-off-by: Shantanoo <shantanoo.desai@gmail.com>
- Travis Build 1500.37 failed for:
  `Python3.6 and TOX_ENV=pep257`
- Improve Docstring within code to overcome build error

Signed-off-by: Shantanoo <shantanoo.desai@gmail.com>
@shantanoo-desai
Copy link
Contributor Author

@nevmerzhitsky @aviau @xginn8 Travis tests have passed on the documentations. I however want to address that during the tox -e docs I came across three warnings, where the docstring one core file (client.py) has some linting errors.
And also a Warning html_static_path entry error which stems from docs/sources/conf.py.

I have already resolved the Issue and wanted to know if this should be on a different PR or should I push the code here?

@shantanoo-desai
Copy link
Contributor Author

@xginn8 The changes you requested were already addressed in the PR. The ports for UDP is 8089 which is by default and also according to the Docs. Everything else in the code is in accordance with the other examples.

@xginn8
Copy link
Collaborator

xginn8 commented Apr 7, 2019

@xginn8 The changes you requested were already addressed in the PR. The ports for UDP is 8089 which is by default and also according to the Docs. Everything else in the code is in accordance with the other examples.

@shantanoo-desai I think it makes more sense to pass the UDP port as an arg, rather than the TCP port used to connect to InfluxDB. You can omit the hostname and TCP port altogether if you want to make it more clear.

Also, please push any other fixes unrelated to this example in a separate PR.

- Instead of providing arguments of HTTP InfluxDB,
  provide UDP Port as argument
- Improve the Comments to distinguish between different
  UDP Ports (e.g. 8089(default) saves to `udp1` and 8090
  saves to `udp2` databases respectively

Signed-off-by: Shantanoo <shantanoo.desai@gmail.com>
@shantanoo-desai
Copy link
Contributor Author

@xginn8 As mentioned, I have improved the tutorial_udp.py file. All tests have passed. I mentioned the changes where I pass udp_port information as Argument for the example.

@xginn8 xginn8 merged commit d5d1249 into influxdata:master Apr 10, 2019
@xginn8
Copy link
Collaborator

xginn8 commented Apr 10, 2019

thanks for contributing @shantanoo-desai!!

LloydW93 pushed a commit to bbc/influxdb-python that referenced this pull request Apr 15, 2019
Due to lack of documentation for UDP, this example
provides basic usage of sending information points
via UDP. The code structure followed is similar, if
not same as other examples in the `examples` directory.

Signed-off-by: Shantanoo <shantanoo.desai@gmail.com>
tux-00 pushed a commit to tux-00/influxdb-python that referenced this pull request Apr 24, 2019
Due to lack of documentation for UDP, this example
provides basic usage of sending information points
via UDP. The code structure followed is similar, if
not same as other examples in the `examples` directory.

Signed-off-by: Shantanoo <shantanoo.desai@gmail.com>
@Gnoale
Copy link

Gnoale commented Sep 12, 2019

Too bad this part of the updated docs seems not to have been integrated into the online doc : https://influxdb-python.readthedocs.io/en/latest/examples.html

@shantanoo-desai
Copy link
Contributor Author

@xginn8 Is there something I need to do to show this example on the Docs? I think I executed all necessary steps in the PR for Sphinx

@xginn8
Copy link
Collaborator

xginn8 commented Sep 12, 2019

@shantanoo-desai I'll take a look as to why it hasn't updated yet, thanks for the tip

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants