-
Notifications
You must be signed in to change notification settings - Fork 185
chore: influxdb_client/client/write: fix data_frame_to_list_of_points #183
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
chore: influxdb_client/client/write: fix data_frame_to_list_of_points #183
Conversation
735c358
to
caba68a
Compare
d2f85a8
to
f4be9f4
Compare
Codecov Report
@@ Coverage Diff @@
## master #183 +/- ##
==========================================
+ Coverage 89.72% 89.81% +0.08%
==========================================
Files 26 26
Lines 1957 1963 +6
==========================================
+ Hits 1756 1763 +7
+ Misses 201 200 -1
Continue to review full report at Codecov.
|
print(f'measurement_name: {measurement_name}') | ||
print(f'keys: {keys}') | ||
print(f'tag columns: {data_frame_tag_columns}') | ||
print(f'lambda p: f"""{{measurement_name}}{tags} {fields} {timestamp}"""') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the print
s meant to stay?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, that's just me debugging. This PR is still a draft as yet.
9da33f0
to
8f03699
Compare
8f03699
to
64df1c7
Compare
Fix the possibility of data corruption by using a much simpler regular expression to fix up the results. Also avoid mutating the DataFrame that's been passed in by making a shallow copy. This changes semantics so that if a column mentioned in `PointSettings` exists in the actual data too, it won't be overridden. Also change the `test_write_data_frame` test, which is essentially benchmarking the `data_frame_to_list_of_points` function, so that it just does that so it can easily be run on a local machine and is independent of network speed. It runs in about 10s, which is comparable to the previous performance.
64df1c7
to
51174a1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for awesome PR - nice code docs, perfect performance 👍
Fix the possibility of data corruption by using a much simpler
regular expression to fix up the results.
Also avoid mutating the DataFrame that's been passed in
by making a shallow copy. This changes semantics
so that if a column mentioned in
PointSettings
existsin the actual data too, it won't be overridden.
Also change the
test_write_data_frame
test, which is essentially benchmarkingthe
data_frame_to_list_of_points
function, so that it just does thatso it can easily be run on a local machine and is independent
of network speed. It runs in about 10s, which is comparable
to the previous performance.
Closes #182
pytest tests
completes successfully