From 2d03803f73c2e4a387bab08cef3ddd73a028de9a Mon Sep 17 00:00:00 2001 From: cstbgansanay Date: Fri, 25 Nov 2016 14:53:05 +0100 Subject: [PATCH 01/20] pandas .to_datetime() is deprecated as of 0.19.0 See http://pandas.pydata.org/pandas-docs/version/0.19.1/whatsnew.html#deprecations --- influxdb/_dataframe_client.py | 8 ++++++-- influxdb/influxdb08/dataframe_client.py | 7 ++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/influxdb/_dataframe_client.py b/influxdb/_dataframe_client.py index 0341a41d..5f81e4c8 100644 --- a/influxdb/_dataframe_client.py +++ b/influxdb/_dataframe_client.py @@ -273,8 +273,12 @@ def _convert_dataframe_to_lines(self, }.get(time_precision, 1) # Make array of timestamp ints - time = ((dataframe.index.to_datetime().values.astype(int) / - precision_factor).astype(int).astype(str)) + if isinstance(dataframe.index, pd.tseries.period.PeriodIndex): + time = ((dataframe.index.to_timestamp().values.astype(int) / + precision_factor).astype(int).astype(str)) + else: + time = ((pd.to_datetime(dataframe.index).values.astype(int) / + precision_factor).astype(int).astype(str)) # If tag columns exist, make an array of formatted tag keys and values if tag_columns: diff --git a/influxdb/influxdb08/dataframe_client.py b/influxdb/influxdb08/dataframe_client.py index 28173e6e..ba302af8 100644 --- a/influxdb/influxdb08/dataframe_client.py +++ b/influxdb/influxdb08/dataframe_client.py @@ -132,7 +132,12 @@ def _convert_dataframe_to_json(self, dataframe, name, time_precision='s'): isinstance(dataframe.index, pd.tseries.index.DatetimeIndex)): raise TypeError('Must be DataFrame with DatetimeIndex or \ PeriodIndex.') - dataframe.index = dataframe.index.to_datetime() + + if isinstance(dataframe.index, pd.tseries.period.PeriodIndex): + dataframe.index = dataframe.index.to_timestamp() + else: + dataframe.index = pd.to_datetime(dataframe.index) + if dataframe.index.tzinfo is None: dataframe.index = dataframe.index.tz_localize('UTC') dataframe['time'] = [self._datetime_to_epoch(dt, time_precision) From 46ea348cd23caa80cae21b399c784a1cf2e4052d Mon Sep 17 00:00:00 2001 From: cstbgansanay Date: Fri, 25 Nov 2016 16:20:28 +0100 Subject: [PATCH 02/20] pandas 0.19.x breaks python 3.3 compatibility --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 868fe5cc..c33c5ceb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,8 @@ env: # Disabling py32 tests until the following issue is fixed: # pip 8.x breaks python 3.2 compatibility # https://github.com/pypa/pip/issues/3390 - - TOX_ENV=py33 +# - TOX_ENV=py33 +# pandas 0.19.x breaks python 3.3 compatibility - TOX_ENV=py34 - TOX_ENV=pypy - TOX_ENV=pypy3 From 6fa77d1b59d2a4a5746f2170cd6d4763bf6572dc Mon Sep 17 00:00:00 2001 From: cstbgansanay Date: Fri, 25 Nov 2016 16:39:03 +0100 Subject: [PATCH 03/20] pypy3 - pip requires Python >= 2.6 or >= 3.3 Using Python 3.4 for Travis build --- .travis.yml | 5 +++++ tox.ini | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c33c5ceb..3fa49f38 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,8 @@ language: python +python: + - "2.7" + - "3.4" + - "pypy3" addons: apt: packages: @@ -17,6 +21,7 @@ env: - TOX_ENV=docs - TOX_ENV=flake8 - TOX_ENV=coverage + install: - pip install tox - pip install coveralls diff --git a/tox.ini b/tox.ini index ddc15514..cbf11814 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,8 @@ [tox] -envlist = py34, py27, pypy, flake8 +envlist = py34, py27, pypy, pypy3, flake8 + +[tox:travis] +3.4 = py34, pypy3 [testenv] passenv = INFLUXDB_PYTHON_INFLUXD_PATH From 9c7878b5c957cfa14a8b119f9ac6b5da19a44b0c Mon Sep 17 00:00:00 2001 From: cstbgansanay Date: Fri, 25 Nov 2016 17:03:42 +0100 Subject: [PATCH 04/20] Use 'language' syntax for Travis CI configuration --- .travis.yml | 20 +++++++++++--------- tox.ini | 4 ++-- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3fa49f38..de353569 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,25 +2,26 @@ language: python python: - "2.7" - "3.4" + - "pypy" - "pypy3" addons: apt: packages: - wget -env: - - TOX_ENV=py27 +#env: +# - TOX_ENV=py27 # - TOX_ENV=py32 # Disabling py32 tests until the following issue is fixed: # pip 8.x breaks python 3.2 compatibility # https://github.com/pypa/pip/issues/3390 # - TOX_ENV=py33 # pandas 0.19.x breaks python 3.3 compatibility - - TOX_ENV=py34 - - TOX_ENV=pypy - - TOX_ENV=pypy3 - - TOX_ENV=docs - - TOX_ENV=flake8 - - TOX_ENV=coverage +# - TOX_ENV=py34 +# - TOX_ENV=pypy +# - TOX_ENV=pypy3 +# - TOX_ENV=docs +# - TOX_ENV=flake8 +# - TOX_ENV=coverage install: - pip install tox @@ -32,7 +33,8 @@ script: - export INFLUXDB_PYTHON_INFLUXD_PATH=$(pwd)/influxdb_install/usr/bin/influxd - travis_wait 30 tox -e $TOX_ENV after_success: - - if [ "$TOX_ENV" == "coverage" ] ; then coveralls; fi + - sphinx-build -b html docs/source docs/build + - coveralls notifications: email: false diff --git a/tox.ini b/tox.ini index cbf11814..05399647 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py34, py27, pypy, pypy3, flake8 +#envlist = py34, py27, pypy, pypy3, flake8 [tox:travis] 3.4 = py34, pypy3 @@ -9,7 +9,7 @@ passenv = INFLUXDB_PYTHON_INFLUXD_PATH setenv = INFLUXDB_PYTHON_SKIP_SERVER_TESTS=False deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt - py27,py32,py33,py34,py26: pandas + py27,py32,py34,py26: pandas # Only install pandas with non-pypy interpreters commands = nosetests -v --with-doctest {posargs} From e7374c1ab05b50edf42554472c36ce1724469c53 Mon Sep 17 00:00:00 2001 From: cstbgansanay Date: Fri, 25 Nov 2016 17:05:47 +0100 Subject: [PATCH 05/20] Fix silly error --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index de353569..0d502523 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,7 +31,7 @@ install: - dpkg -x influxdb*.deb influxdb_install script: - export INFLUXDB_PYTHON_INFLUXD_PATH=$(pwd)/influxdb_install/usr/bin/influxd - - travis_wait 30 tox -e $TOX_ENV + - tox after_success: - sphinx-build -b html docs/source docs/build - coveralls From 7c25919b29fc30715950070d25f5f28b599597dd Mon Sep 17 00:00:00 2001 From: cstbgansanay Date: Sat, 26 Nov 2016 11:45:37 +0100 Subject: [PATCH 06/20] Define new test matrix --- .travis.yml | 40 +++++++++++++++++++--------------------- tox.ini | 3 --- 2 files changed, 19 insertions(+), 24 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0d502523..bfe82b2a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,27 +1,26 @@ language: python -python: - - "2.7" - - "3.4" - - "pypy" - - "pypy3" + addons: apt: packages: - wget -#env: -# - TOX_ENV=py27 -# - TOX_ENV=py32 -# Disabling py32 tests until the following issue is fixed: -# pip 8.x breaks python 3.2 compatibility -# https://github.com/pypa/pip/issues/3390 -# - TOX_ENV=py33 -# pandas 0.19.x breaks python 3.3 compatibility -# - TOX_ENV=py34 -# - TOX_ENV=pypy -# - TOX_ENV=pypy3 -# - TOX_ENV=docs -# - TOX_ENV=flake8 -# - TOX_ENV=coverage + +matrix: + include: + - python: 2.7 + env: TOX_ENV=py27 + - python: pypy + env: TOX_ENV=pypy + - python: 3.4 + env: TOX_ENV=py34 + - python: pypy3 + env: TOX_ENV=pypy3 + - python: 2.7 + env: TOX_ENV=docs + - python: 3.4 + env: TOX_ENV=flake8 + - python: 3.4 + env: TOX_ENV=coverage install: - pip install tox @@ -33,8 +32,7 @@ script: - export INFLUXDB_PYTHON_INFLUXD_PATH=$(pwd)/influxdb_install/usr/bin/influxd - tox after_success: - - sphinx-build -b html docs/source docs/build - - coveralls + - if [ "$TOX_ENV" == "coverage" ] ; then coveralls; fi notifications: email: false diff --git a/tox.ini b/tox.ini index 05399647..b898be2b 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,6 @@ [tox] #envlist = py34, py27, pypy, pypy3, flake8 -[tox:travis] -3.4 = py34, pypy3 - [testenv] passenv = INFLUXDB_PYTHON_INFLUXD_PATH setenv = INFLUXDB_PYTHON_SKIP_SERVER_TESTS=False From 4efa005da6307bce180ff4fdd7069a802ce9f53a Mon Sep 17 00:00:00 2001 From: cstbgansanay Date: Sat, 26 Nov 2016 12:11:25 +0100 Subject: [PATCH 07/20] Fix build language environments for pypy, pypy3 --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index bfe82b2a..2ab126ab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,13 +9,13 @@ matrix: include: - python: 2.7 env: TOX_ENV=py27 - - python: pypy + - python: 2.7 env: TOX_ENV=pypy - python: 3.4 env: TOX_ENV=py34 - - python: pypy3 + - python: 3.4 env: TOX_ENV=pypy3 - - python: 2.7 + - python: 3.4 env: TOX_ENV=docs - python: 3.4 env: TOX_ENV=flake8 From 698f05b9eaff3b05a2fd18f2898d7c64c06325c4 Mon Sep 17 00:00:00 2001 From: cstbgansanay Date: Mon, 28 Nov 2016 11:25:06 +0100 Subject: [PATCH 08/20] Display error logs for pypy builds --- .travis.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2ab126ab..acd706b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,11 +9,11 @@ matrix: include: - python: 2.7 env: TOX_ENV=py27 - - python: 2.7 + - python: pypy env: TOX_ENV=pypy - python: 3.4 env: TOX_ENV=py34 - - python: 3.4 + - python: pypy3 env: TOX_ENV=pypy3 - python: 3.4 env: TOX_ENV=docs @@ -31,6 +31,11 @@ install: script: - export INFLUXDB_PYTHON_INFLUXD_PATH=$(pwd)/influxdb_install/usr/bin/influxd - tox +after_failure: + - cat /home/travis/build/influxdata/influxdb-python/.tox/coverage/log/coverage-0.log + - cat /home/travis/build/influxdata/influxdb-python/.tox/coverage/log/coverage-1.log + - cat /home/travis/build/influxdata/influxdb-python/.tox/docs/log/docs-0.log + - cat /home/travis/build/influxdata/influxdb-python/.tox/flake8/log/flake8-0.log after_success: - if [ "$TOX_ENV" == "coverage" ] ; then coveralls; fi notifications: From 9c9e21c41f4cbcb4c7976fd6cc83fdf39a86aeb0 Mon Sep 17 00:00:00 2001 From: cstbgansanay Date: Mon, 28 Nov 2016 12:55:32 +0100 Subject: [PATCH 09/20] Test newer versions of pypy and pypy3 --- .travis.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index acd706b7..4b524d63 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,13 +8,9 @@ addons: matrix: include: - python: 2.7 - env: TOX_ENV=py27 - - python: pypy - env: TOX_ENV=pypy + - python: pypy-5.3.1 - python: 3.4 - env: TOX_ENV=py34 - - python: pypy3 - env: TOX_ENV=pypy3 + - python: pypy3.3-5.2-alpha1 - python: 3.4 env: TOX_ENV=docs - python: 3.4 @@ -31,11 +27,6 @@ install: script: - export INFLUXDB_PYTHON_INFLUXD_PATH=$(pwd)/influxdb_install/usr/bin/influxd - tox -after_failure: - - cat /home/travis/build/influxdata/influxdb-python/.tox/coverage/log/coverage-0.log - - cat /home/travis/build/influxdata/influxdb-python/.tox/coverage/log/coverage-1.log - - cat /home/travis/build/influxdata/influxdb-python/.tox/docs/log/docs-0.log - - cat /home/travis/build/influxdata/influxdb-python/.tox/flake8/log/flake8-0.log after_success: - if [ "$TOX_ENV" == "coverage" ] ; then coveralls; fi notifications: From 60c3ca310896bedffb42a157bc10f0703cc373b8 Mon Sep 17 00:00:00 2001 From: cstbgansanay Date: Mon, 28 Nov 2016 13:28:56 +0100 Subject: [PATCH 10/20] Try to fix calls to coverage/docs/flake8 --- .travis.yml | 6 +++++- tox.ini | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4b524d63..f53e6552 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,9 +8,13 @@ addons: matrix: include: - python: 2.7 + env: TOX_ENV=py27 - python: pypy-5.3.1 + env: TOX_ENV=pypy - python: 3.4 + env: TOX_ENV=py34 - python: pypy3.3-5.2-alpha1 + env: TOX_ENV=pypy3 - python: 3.4 env: TOX_ENV=docs - python: 3.4 @@ -26,7 +30,7 @@ install: - dpkg -x influxdb*.deb influxdb_install script: - export INFLUXDB_PYTHON_INFLUXD_PATH=$(pwd)/influxdb_install/usr/bin/influxd - - tox + - tox -e $TOX_ENV after_success: - if [ "$TOX_ENV" == "coverage" ] ; then coveralls; fi notifications: diff --git a/tox.ini b/tox.ini index b898be2b..856a4717 100644 --- a/tox.ini +++ b/tox.ini @@ -1,12 +1,12 @@ [tox] -#envlist = py34, py27, pypy, pypy3, flake8 +envlist = py27, py34, pypy, pypy3, flake8, coverage, docs [testenv] passenv = INFLUXDB_PYTHON_INFLUXD_PATH setenv = INFLUXDB_PYTHON_SKIP_SERVER_TESTS=False deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt - py27,py32,py34,py26: pandas + py27,py34: pandas # Only install pandas with non-pypy interpreters commands = nosetests -v --with-doctest {posargs} From c5fe28ae87c827901403fc6df26a49f4861279d0 Mon Sep 17 00:00:00 2001 From: gansanay Date: Mon, 28 Nov 2016 14:49:30 +0100 Subject: [PATCH 11/20] Test setting VERSION --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index f53e6552..e0ecfe44 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,6 +29,7 @@ install: - wget https://dl.influxdata.com/influxdb/releases/influxdb_0.13.0_amd64.deb - dpkg -x influxdb*.deb influxdb_install script: + - if [ "$TOX_ENV" == "pypy3" ] ; then export VERSION=pypy3.3-5.2-alpha1; fi - export INFLUXDB_PYTHON_INFLUXD_PATH=$(pwd)/influxdb_install/usr/bin/influxd - tox -e $TOX_ENV after_success: From 68dd91025ac7f8ba27b881d0e126585a33859a5a Mon Sep 17 00:00:00 2001 From: gansanay Date: Mon, 28 Nov 2016 15:08:22 +0100 Subject: [PATCH 12/20] Acknowledging the issue in Travis-CI https://github.com/travis-ci/travis-ci/issues/6304 Commenting out pypy3 test --- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index e0ecfe44..20a6d8cc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,8 +13,10 @@ matrix: env: TOX_ENV=pypy - python: 3.4 env: TOX_ENV=py34 - - python: pypy3.3-5.2-alpha1 - env: TOX_ENV=pypy3 +# An issue in travis-ci prevents this case from running +# Link to issue: https://github.com/travis-ci/travis-ci/issues/6304 +# - python: pypy3.3-5.2-alpha1 +# env: TOX_ENV=pypy3 - python: 3.4 env: TOX_ENV=docs - python: 3.4 @@ -29,7 +31,6 @@ install: - wget https://dl.influxdata.com/influxdb/releases/influxdb_0.13.0_amd64.deb - dpkg -x influxdb*.deb influxdb_install script: - - if [ "$TOX_ENV" == "pypy3" ] ; then export VERSION=pypy3.3-5.2-alpha1; fi - export INFLUXDB_PYTHON_INFLUXD_PATH=$(pwd)/influxdb_install/usr/bin/influxd - tox -e $TOX_ENV after_success: From 2750d083527037fe776c72f57fc78013ab7261cc Mon Sep 17 00:00:00 2001 From: gansanay Date: Tue, 29 Nov 2016 12:56:02 +0100 Subject: [PATCH 13/20] Get InfluxDB 1.1.0 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 20a6d8cc..1dd2c78d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ install: - pip install tox - pip install coveralls - mkdir influxdb_install - - wget https://dl.influxdata.com/influxdb/releases/influxdb_0.13.0_amd64.deb + - wget https://dl.influxdata.com/influxdb/releases/influxdb_1.1.0_amd64.deb - dpkg -x influxdb*.deb influxdb_install script: - export INFLUXDB_PYTHON_INFLUXD_PATH=$(pwd)/influxdb_install/usr/bin/influxd From 7c3d204d07d3757fc42ea1aa7b97e58a20a9b70f Mon Sep 17 00:00:00 2001 From: gansanay Date: Tue, 29 Nov 2016 13:12:56 +0100 Subject: [PATCH 14/20] Default retetion policy name and duration unit have changed in InfluxDB --- .../server_tests/client_test_with_server.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/influxdb/tests/server_tests/client_test_with_server.py b/influxdb/tests/server_tests/client_test_with_server.py index 86faf204..9b273eb4 100644 --- a/influxdb/tests/server_tests/client_test_with_server.py +++ b/influxdb/tests/server_tests/client_test_with_server.py @@ -431,8 +431,8 @@ def test_default_retention_policy(self): rsp = self.cli.get_list_retention_policies() self.assertEqual( [ - {'name': 'default', - 'duration': '0', + {'name': 'autogen', + 'duration': '0s', 'replicaN': 1, 'shardGroupDuration': u'168h0m0s', 'default': True} @@ -447,11 +447,11 @@ def test_create_retention_policy_default(self): self.assertEqual( [ - {'duration': '0', + {'duration': '0s', 'default': False, 'replicaN': 1, 'shardGroupDuration': u'168h0m0s', - 'name': 'default'}, + 'name': 'autogen'}, {'duration': '24h0m0s', 'default': True, 'replicaN': 1, @@ -471,11 +471,11 @@ def test_create_retention_policy(self): rsp = self.cli.get_list_retention_policies() self.assertEqual( [ - {'duration': '0', + {'duration': '0s', 'default': True, 'replicaN': 1, 'shardGroupDuration': u'168h0m0s', - 'name': 'default'}, + 'name': 'autogen'}, {'duration': '24h0m0s', 'default': False, 'replicaN': 1, @@ -494,11 +494,11 @@ def test_alter_retention_policy(self): rsp = self.cli.get_list_retention_policies() self.assertEqual( [ - {'duration': '0', + {'duration': '0s', 'default': True, 'replicaN': 1, 'shardGroupDuration': u'168h0m0s', - 'name': 'default'}, + 'name': 'autogen'}, {'duration': '96h0m0s', 'default': False, 'replicaN': 1, From cb295197d9c85d06857bef7d03f5964bb3a35f3a Mon Sep 17 00:00:00 2001 From: gansanay Date: Tue, 29 Nov 2016 13:23:11 +0100 Subject: [PATCH 15/20] Default retention name and policy duration, again --- .../server_tests/client_test_with_server.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/influxdb/tests/server_tests/client_test_with_server.py b/influxdb/tests/server_tests/client_test_with_server.py index 9b273eb4..01bd345b 100644 --- a/influxdb/tests/server_tests/client_test_with_server.py +++ b/influxdb/tests/server_tests/client_test_with_server.py @@ -514,11 +514,11 @@ def test_alter_retention_policy(self): rsp = self.cli.get_list_retention_policies() self.assertEqual( [ - {'duration': '0', + {'duration': '0s', 'default': True, 'replicaN': 1, 'shardGroupDuration': u'168h0m0s', - 'name': 'default'}, + 'name': 'autogen'}, {'duration': '96h0m0s', 'default': False, 'replicaN': 4, @@ -534,11 +534,11 @@ def test_alter_retention_policy(self): rsp = self.cli.get_list_retention_policies() self.assertEqual( [ - {'duration': '0', + {'duration': '0s', 'default': False, 'replicaN': 1, 'shardGroupDuration': u'168h0m0s', - 'name': 'default'}, + 'name': 'autogen'}, {'duration': '96h0m0s', 'default': True, 'replicaN': 4, @@ -558,11 +558,11 @@ def test_alter_retention_policy_invalid(self): rsp = self.cli.get_list_retention_policies() self.assertEqual( [ - {'duration': '0', + {'duration': '0s', 'default': True, 'replicaN': 1, 'shardGroupDuration': u'168h0m0s', - 'name': 'default'}, + 'name': 'autogen'}, {'duration': '24h0m0s', 'default': False, 'replicaN': 1, @@ -580,11 +580,11 @@ def test_drop_retention_policy(self): rsp = self.cli.get_list_retention_policies() self.assertEqual( [ - {'duration': '0', + {'duration': '0s', 'default': True, 'replicaN': 1, 'shardGroupDuration': u'168h0m0s', - 'name': 'default'} + 'name': 'autogen'} ], rsp ) From 6c921a977bd88007bca2c1871d4015307ee40613 Mon Sep 17 00:00:00 2001 From: gansanay Date: Tue, 29 Nov 2016 15:44:36 +0100 Subject: [PATCH 16/20] Altering retention policy doesn't change shard group duration --- .../tests/server_tests/client_test_with_server.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/influxdb/tests/server_tests/client_test_with_server.py b/influxdb/tests/server_tests/client_test_with_server.py index 01bd345b..ae9e86fa 100644 --- a/influxdb/tests/server_tests/client_test_with_server.py +++ b/influxdb/tests/server_tests/client_test_with_server.py @@ -468,6 +468,9 @@ def test_create_retention_policy_default(self): def test_create_retention_policy(self): self.cli.create_retention_policy('somename', '1d', 1) + # NB: creating a retention policy without specifying shard group duration + # leads to a shard group duration of 1 hour + # See https://docs.influxdata.com/influxdb/v1.1/query_language/database_management/#retention-policy-management rsp = self.cli.get_list_retention_policies() self.assertEqual( [ @@ -491,6 +494,7 @@ def test_alter_retention_policy(self): # Test alter duration self.cli.alter_retention_policy('somename', 'db', duration='4d') + # NB: altering retention policy doesn't change shard group duration rsp = self.cli.get_list_retention_policies() self.assertEqual( [ @@ -502,7 +506,7 @@ def test_alter_retention_policy(self): {'duration': '96h0m0s', 'default': False, 'replicaN': 1, - 'shardGroupDuration': u'24h0m0s', + 'shardGroupDuration': u'1h0m0s', 'name': 'somename'} ], rsp @@ -511,6 +515,7 @@ def test_alter_retention_policy(self): # Test alter replication self.cli.alter_retention_policy('somename', 'db', replication=4) + # NB: altering retention policy doesn't change shard group duration rsp = self.cli.get_list_retention_policies() self.assertEqual( [ @@ -522,7 +527,7 @@ def test_alter_retention_policy(self): {'duration': '96h0m0s', 'default': False, 'replicaN': 4, - 'shardGroupDuration': u'24h0m0s', + 'shardGroupDuration': u'1h0m0s', 'name': 'somename'} ], rsp @@ -531,6 +536,7 @@ def test_alter_retention_policy(self): # Test alter default self.cli.alter_retention_policy('somename', 'db', default=True) + # NB: altering retention policy doesn't change shard group duration rsp = self.cli.get_list_retention_policies() self.assertEqual( [ @@ -542,7 +548,7 @@ def test_alter_retention_policy(self): {'duration': '96h0m0s', 'default': True, 'replicaN': 4, - 'shardGroupDuration': u'24h0m0s', + 'shardGroupDuration': u'1h0m0s', 'name': 'somename'} ], rsp From 103899e15916a9e58615fc25d0f795823c0df6a3 Mon Sep 17 00:00:00 2001 From: gansanay Date: Tue, 29 Nov 2016 15:49:47 +0100 Subject: [PATCH 17/20] Fix styling --- influxdb/tests/server_tests/client_test_with_server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/influxdb/tests/server_tests/client_test_with_server.py b/influxdb/tests/server_tests/client_test_with_server.py index ae9e86fa..d81054c9 100644 --- a/influxdb/tests/server_tests/client_test_with_server.py +++ b/influxdb/tests/server_tests/client_test_with_server.py @@ -468,9 +468,9 @@ def test_create_retention_policy_default(self): def test_create_retention_policy(self): self.cli.create_retention_policy('somename', '1d', 1) - # NB: creating a retention policy without specifying shard group duration + # NB: creating a retention policy without specifying + # shard group duration # leads to a shard group duration of 1 hour - # See https://docs.influxdata.com/influxdb/v1.1/query_language/database_management/#retention-policy-management rsp = self.cli.get_list_retention_policies() self.assertEqual( [ From 56a7326c434ef36ec9a44820dfab878a13a21471 Mon Sep 17 00:00:00 2001 From: gansanay Date: Tue, 29 Nov 2016 16:03:37 +0100 Subject: [PATCH 18/20] Fix coverage link in README --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index d3a8d775..08349c53 100644 --- a/README.rst +++ b/README.rst @@ -12,7 +12,7 @@ InfluxDB-Python is a client for interacting with InfluxDB_. Maintained by @aviau :alt: Documentation Status .. image:: https://img.shields.io/coveralls/influxdata/influxdb-python.svg - :target: https://coveralls.io/r/influxdata/influxdb-python + :target: https://coveralls.io/github/gansanay/influxdb-python :alt: Coverage .. _readme-about: From 11c01666b5172f602f7a82f25fc151f5c323845d Mon Sep 17 00:00:00 2001 From: gansanay Date: Tue, 29 Nov 2016 16:04:20 +0100 Subject: [PATCH 19/20] Put initial coverage link back --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 08349c53..d3a8d775 100644 --- a/README.rst +++ b/README.rst @@ -12,7 +12,7 @@ InfluxDB-Python is a client for interacting with InfluxDB_. Maintained by @aviau :alt: Documentation Status .. image:: https://img.shields.io/coveralls/influxdata/influxdb-python.svg - :target: https://coveralls.io/github/gansanay/influxdb-python + :target: https://coveralls.io/r/influxdata/influxdb-python :alt: Coverage .. _readme-about: From 3370b8468da6a322061f04212b5f3e9d6387f7af Mon Sep 17 00:00:00 2001 From: gansanay Date: Tue, 29 Nov 2016 16:09:48 +0100 Subject: [PATCH 20/20] Update README: v1.1.0 is the recommended version of InfluxDB --- README.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index d3a8d775..a88ce0f2 100644 --- a/README.rst +++ b/README.rst @@ -22,10 +22,10 @@ InfluxDB is an open-source distributed time series database, find more about Inf .. _installation: -InfluxDB v0.8.X users -===================== +InfluxDB pre v1.1.0 users +========================= -InfluxDB 0.9 was released and it is the new recommended version. However, InfluxDB 0.8.x users may still use the legacy client by using ``from influxdb.influxdb08 import InfluxDBClient`` instead. +InfluxDB 1.1.0 was released and it is the new recommended version. InfluxDB 0.8.x users may still use the legacy client by using ``from influxdb.influxdb08 import InfluxDBClient`` instead. Installation ============