quasardb 3.14.1.dev5__tar.gz → 3.14.1.dev6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of quasardb might be problematic. Click here for more details.

Files changed (66) hide show
  1. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/PKG-INFO +1 -1
  2. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/quasardb.egg-info/PKG-INFO +1 -1
  3. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/quasardb.egg-info/SOURCES.txt +2 -0
  4. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/setup.py +1 -17
  5. quasardb-3.14.1.dev6/tests/test_compaction.py +24 -0
  6. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_logging.py +1 -1
  7. quasardb-3.14.1.dev6/tests/test_metrics.py +68 -0
  8. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/LICENSE.md +0 -0
  9. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/README.md +0 -0
  10. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/quasardb/__init__.py +0 -0
  11. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/quasardb/extensions/__init__.py +0 -0
  12. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/quasardb/extensions/writer.py +0 -0
  13. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/quasardb/firehose.py +0 -0
  14. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/quasardb/numpy/__init__.py +0 -0
  15. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/quasardb/pandas/__init__.py +0 -0
  16. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/quasardb/pool.py +0 -0
  17. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/quasardb/stats.py +0 -0
  18. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/quasardb/table_cache.py +0 -0
  19. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/quasardb.egg-info/dependency_links.txt +0 -0
  20. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/quasardb.egg-info/not-zip-safe +0 -0
  21. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/quasardb.egg-info/requires.txt +0 -0
  22. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/quasardb.egg-info/top_level.txt +0 -0
  23. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/setup.cfg +0 -0
  24. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_basic.py +0 -0
  25. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_batch_inserter.py +0 -0
  26. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_bench_pinned_writer.py +0 -0
  27. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_blob.py +0 -0
  28. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_buf_size.py +0 -0
  29. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_connection.py +0 -0
  30. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_continuous.py +0 -0
  31. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_convert.py +0 -0
  32. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_double.py +0 -0
  33. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_entry.py +0 -0
  34. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_error.py +0 -0
  35. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_examples.py +0 -0
  36. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_expiry.py +0 -0
  37. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_firehose.py +0 -0
  38. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_getTimeout.py +0 -0
  39. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_info.py +0 -0
  40. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_integer.py +0 -0
  41. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_node.py +0 -0
  42. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_numpy.py +0 -0
  43. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_options.py +0 -0
  44. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_pandas.py +0 -0
  45. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_pandas_benchmark.py +0 -0
  46. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_perf.py +0 -0
  47. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_pool.py +0 -0
  48. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_prefix.py +0 -0
  49. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_query.py +0 -0
  50. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_query_find.py +0 -0
  51. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_setCompression.py +0 -0
  52. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_setMaxCardinality.py +0 -0
  53. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_setTimeout.py +0 -0
  54. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_stats.py +0 -0
  55. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_string.py +0 -0
  56. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_suffix.py +0 -0
  57. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_table.py +0 -0
  58. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_table_blob.py +0 -0
  59. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_table_double.py +0 -0
  60. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_table_int64.py +0 -0
  61. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_table_reader.py +0 -0
  62. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_table_string.py +0 -0
  63. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_table_timestamp.py +0 -0
  64. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_tag.py +0 -0
  65. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_timestamp.py +0 -0
  66. {quasardb-3.14.1.dev5 → quasardb-3.14.1.dev6}/tests/test_writer.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: quasardb
3
- Version: 3.14.1.dev5
3
+ Version: 3.14.1.dev6
4
4
  Summary: Python API for quasardb
5
5
  Home-page: https://www.quasardb.net/
6
6
  Author: quasardb SAS
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: quasardb
3
- Version: 3.14.1.dev5
3
+ Version: 3.14.1.dev6
4
4
  Summary: Python API for quasardb
5
5
  Home-page: https://www.quasardb.net/
6
6
  Author: quasardb SAS
@@ -22,6 +22,7 @@ tests/test_batch_inserter.py
22
22
  tests/test_bench_pinned_writer.py
23
23
  tests/test_blob.py
24
24
  tests/test_buf_size.py
25
+ tests/test_compaction.py
25
26
  tests/test_connection.py
26
27
  tests/test_continuous.py
27
28
  tests/test_convert.py
@@ -35,6 +36,7 @@ tests/test_getTimeout.py
35
36
  tests/test_info.py
36
37
  tests/test_integer.py
37
38
  tests/test_logging.py
39
+ tests/test_metrics.py
38
40
  tests/test_node.py
39
41
  tests/test_numpy.py
40
42
  tests/test_options.py
@@ -21,7 +21,7 @@ from setuptools.command.install import install
21
21
  from pkg_resources import get_build_platform
22
22
  from wheel.bdist_wheel import bdist_wheel as old_bdist_wheel
23
23
 
24
- qdb_version = "3.14.1.dev5"
24
+ qdb_version = "3.14.1.dev6"
25
25
 
26
26
  # package_modules are our 'extra' files. Our cmake configuration copies our QDB_API_LIB
27
27
  # into our source directory, and by adding this to `package_modules` we tell setuptools to
@@ -59,19 +59,6 @@ class CMakeBuild(build_ext):
59
59
  for ext in self.extensions:
60
60
  self.build_extension(ext)
61
61
 
62
- def find_osx_sysroot(self):
63
- # Override sysroot, because otherwise bdist (setuptools) will set it to the latest SDK.
64
- # Cf. https://github.com/pypa/setuptools/blob/eb75ea6eb827acf1be6c350850b350de7b500efd/setuptools/_distutils/unixccompiler.py#L326-L350 # noqa
65
-
66
- # Paths can be different depending on XCode version installed:
67
- # /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk
68
- # /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.sdk
69
- sdk = '10.14'
70
- out = subprocess.check_output(
71
- ['xcrun', '--sdk', 'macosx' + sdk, '--show-sdk-path'])
72
- print(out.decode().strip())
73
- return out.decode().strip()
74
-
75
62
  def build_extension(self, ext):
76
63
  self.do_build_extension(ext)
77
64
 
@@ -88,9 +75,6 @@ class CMakeBuild(build_ext):
88
75
  '-DQDB_PY_VERSION=' + qdb_version
89
76
  ]
90
77
 
91
- if platform.system() == "Darwin":
92
- cmake_args += ['-DCMAKE_OSX_SYSROOT:PATH=' + self.find_osx_sysroot()]
93
-
94
78
  # If certain environment variables are set, we pass them along
95
79
  # to cmake. This allows for greater flexibility for an end-user
96
80
  # to configure builds.
@@ -0,0 +1,24 @@
1
+ # pylint: disable=C0103,C0111,C0302,W0212
2
+ import datetime
3
+
4
+ import pytest
5
+ import quasardb
6
+
7
+
8
+ def test_can_compact_full_and_abort(qdbd_connection):
9
+ try:
10
+ qdbd_connection.compact_full()
11
+ finally:
12
+ qdbd_connection.compact_abort()
13
+ qdbd_connection.wait_for_compaction()
14
+
15
+ def test_can_get_compaction_progress(qdbd_connection):
16
+ try:
17
+ qdbd_connection.compact_full()
18
+
19
+ progress = qdbd_connection.compact_progress()
20
+ assert progress > 0 and progress <= 100
21
+
22
+ finally:
23
+ qdbd_connection.compact_abort()
24
+ qdbd_connection.wait_for_compaction()
@@ -31,7 +31,7 @@ def test_native_logging_output(blob_entry, random_blob, caplog):
31
31
 
32
32
  assert found(caplog.records)
33
33
 
34
-
34
+ @pytest.mark.skip(reason="TODO: Should only be enabled for CMAKE_BUILD_TYPE=Debug")
35
35
  def test_invalid_utf8_logs_qdb3361(qdbd_connection, caplog):
36
36
  caplog.set_level(logging.DEBUG)
37
37
 
@@ -0,0 +1,68 @@
1
+ # pylint: disable=C0103,C0111,C0302,W0212
2
+
3
+ import quasardb
4
+ import quasardb.pandas as qdbpd
5
+
6
+ from quasardb import metrics
7
+ import pytest
8
+
9
+ def test_clear_metrics(qdbd_connection):
10
+ metrics.clear()
11
+
12
+ totals = metrics.totals()
13
+ assert len(totals) == 0
14
+
15
+ def test_scoped_measure(qdbd_connection):
16
+
17
+ with metrics.Measure() as measure:
18
+ scoped = measure.get()
19
+ assert len(scoped) == 0
20
+
21
+
22
+ def test_batch_push_metrics(qdbpd_write_fn, df_with_table, qdbd_connection):
23
+ (_, _, df, table) = df_with_table
24
+
25
+ with metrics.Measure() as measure:
26
+ assert len(measure.get()) == 0
27
+ qdbpd_write_fn(df, qdbd_connection, table)
28
+
29
+ m = measure.get()
30
+ assert len(m) > 0
31
+
32
+ assert "qdb_batch_push" in m
33
+ assert m['qdb_batch_push'] > 0
34
+
35
+ def test_query_metrics(qdbpd_write_fn, df_with_table, qdbd_connection):
36
+ (_, _, df, table) = df_with_table
37
+ qdbpd_write_fn(df, qdbd_connection, table)
38
+
39
+ with metrics.Measure() as measure:
40
+ assert len(measure.get()) == 0
41
+
42
+ qdbpd.query(qdbd_connection, "select * from \"{}\"".format(table.get_name()))
43
+
44
+ m = measure.get()
45
+ assert len(m) > 0
46
+
47
+ assert "qdb_query" in m
48
+ assert m['qdb_query'] > 0
49
+
50
+ def test_accumulating_metrics_within_scope(qdbpd_write_fn, df_with_table, qdbd_connection):
51
+ (_, _, df, table) = df_with_table
52
+ qdbpd_write_fn(df, qdbd_connection, table)
53
+
54
+ with metrics.Measure() as measure:
55
+ assert len(measure.get()) == 0
56
+
57
+ # First query
58
+ qdbpd.query(qdbd_connection, "select * from \"{}\"".format(table.get_name()))
59
+
60
+ m1 = measure.get()
61
+ assert m1['qdb_query'] > 0
62
+
63
+ # Second query
64
+ qdbpd.query(qdbd_connection, "select * from \"{}\"".format(table.get_name()))
65
+ m2 = measure.get()
66
+
67
+ # The crux of the test, we expect this metric to accumulate
68
+ assert m2['qdb_query'] > m1['qdb_query']
File without changes
File without changes