Commit 638da37e authored by julian.gethmann's avatar julian.gethmann

Rename pandas->pd, bump version number to 0.7.0

Rename `cassandra.pandas` to `cassandra.pd` to avoid issues with imports
(in Python 2)
parent dc575787
......@@ -3,6 +3,10 @@ Changelog
=========
* [TODO] Add the raw PV name option to the command line interface
0.7.0 (2017-10-24)
------------------
- Renamed the `pandas` module to `pd` to avoid troubles with importing in Python 2 vs. Python 3 and tests.
0.6.0 (2017-10-11)
------------------
* Change the `HOSTNAME` and URI schema to match the new Cassandra deployment (see Sebastian Marsching's Mail from October 11, 2017).
......
......@@ -6,7 +6,7 @@ import pkg_resources
try:
__version__ = pkg_resources.get_distribution(__name__).version
except:
except pkg_resources.RequirementParseError:
__version__ = 'unknown'
from . import css_read
......
......@@ -340,7 +340,7 @@ class Cassandra(object):
tmp.timeout = 1
tmp._download_cassandra_data()
ok = True
except:
except TimeoutError:
ok = False
return ok
......
......@@ -240,7 +240,7 @@ def plot_data(timestamps, values):
import matplotlib.pyplot as plt
try:
plt.style.use("kit")
except:
except OSError:
pass
plt.plot(timestamps, values, )
plt.show(block=True)
......
......@@ -4,6 +4,7 @@
:Contact: phd@gethmann.org
:Date: 2017-09-15
.. versionadded:: 0.5.5
.. versionchanged:: 0.7.0
"""
import pandas as pd
......
......@@ -3,7 +3,7 @@
from setuptools import find_packages
from setuptools import setup
__version__ = '0.6.0'
__version__ = '0.7.0'
def readme():
......
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# :title: Unittests for pandas.py
# :title: Unittests for pd.py
# :lastupdate: 2017-09-15
import datetime
import doctest
......@@ -9,10 +9,10 @@ import unittest
import pandas as pd
import cassandra
from cassandra.pandas import pvs2pd
from cassandra.pd import pvs2pd
class CassandraPandasTestCase(unittest.TestCase):
class CassandraPdTestCase(unittest.TestCase):
def setUp(self):
self.start = datetime.datetime(2017, 9, 15, 13, 0, 0)
......@@ -57,8 +57,8 @@ class CassandraPandasTestCase(unittest.TestCase):
if __name__ == "__main__":
# unittest.main()
testSuite = unittest.TestSuite()
testSuite.addTest(unittest.makeSuite(CassandraPandasTestCase))
testSuite.addTest(doctest.DocTestSuite(cassandra.pandas))
testSuite.addTest(unittest.makeSuite(CassandraPdTestCase))
testSuite.addTest(doctest.DocTestSuite(cassandra.pd))
unittest.TextTestRunner(verbosity=2).run(testSuite)
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
......@@ -7,7 +7,7 @@ import doctest
import unittest
import cassandra
from cassandra.pandas import pvs2pd
from cassandra.pd import pvs2pd
class CassandraTestCase(unittest.TestCase):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment