From 461fd9988c269323ec1ed1f22021c082fa81b172 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Einar=20S=2E=20Ids=C3=B8?= <2356425+einarsi@users.noreply.github.com> Date: Tue, 8 Oct 2019 10:15:30 +0200 Subject: [PATCH] Update PI-DAS server and issue warning in README --- changelog.md | 16 ++++++++++++++++ pyims/__init__.py | 2 +- pyims/odbc_handlers.py | 5 ++++- pyims/version.py | 2 +- requirements.txt | 2 +- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/changelog.md b/changelog.md index 767207ff..e6af9f9a 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,19 @@ +# 0.2 +* Major rewrite to accommodate for other types of connections than ODBC in the future. + * Breaking change: It is now necessary to specify imstype when initiating a client. +* Updated to new DAS server address. +* Forced keep_tz=False to suppress FutureWarning in Pandas >= 0.24 +* Fixed reading of digital states from PI. +* Added get_units() and get_descriptions() methods to fetch engineering units and description for +specified tags. +* Enabled tag search by description. +* pyims.__version__ can be used to check package version. + +# 0.0.8 +* Improved documentation +* Added commonly requested documentation, including docstring, for specifying query method for +read_tags. + # 0.0.7 * Fixed bug where timezone was fixed to Europe/Oslo * Discovered that Pandas 0.23 is required. 0.22 causes a weird timezone bug during DST folds when diff --git a/pyims/__init__.py b/pyims/__init__.py index be30dfb7..d77c182e 100644 --- a/pyims/__init__.py +++ b/pyims/__init__.py @@ -1,4 +1,4 @@ from .clients import IMSClient from .odbc_handlers import list_aspen_servers, \ list_pi_servers -from .version import __version__ \ No newline at end of file +from .version import __version__ diff --git a/pyims/odbc_handlers.py b/pyims/odbc_handlers.py index bfb2a1ef..a122d508 100644 --- a/pyims/odbc_handlers.py +++ b/pyims/odbc_handlers.py @@ -210,7 +210,10 @@ def __init__(self, host, port, options={}): self.cursor = None self._max_rows = options.get('max_rows', 100000) # TODO: Find default das_server under HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\PISystem\Analytics\InstallData/AFServer - self._das_server = options.get('das_server', 'ST-W4189.statoil.net') + # It seems that is actually not possible anymore. + self._das_server = options.get('das_server', 'ws3099.statoil.net') + + #print(self._das_server) @staticmethod def generate_connection_string(host, port, das_server): diff --git a/pyims/version.py b/pyims/version.py index 1ae2e4ee..b650ceb0 100644 --- a/pyims/version.py +++ b/pyims/version.py @@ -1 +1 @@ -__version__ = '0.1.2-dev' +__version__ = '0.2' diff --git a/requirements.txt b/requirements.txt index c1c9a813..cca88bf2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,4 @@ pandas>=0.23 tables pyodbc git+https://github.com/dcbark01/PI-Web-API-Client-Python.git -requests_ntlm # Required for PI-Web-API-Client-Python \ No newline at end of file +requests_ntlm # Required for PI-Web-API-Client-Python