Skip to content

Commit

Permalink
Merge pull request #17 from equinor/add-rest-api
Browse files Browse the repository at this point in the history
Add rest api
  • Loading branch information
einarsi authored Aug 6, 2020
2 parents 8ada0a2 + e6b6a5c commit 45a7053
Show file tree
Hide file tree
Showing 27 changed files with 2,170 additions and 406 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

name: Build

on: [push, pull_request]
on: [push]

jobs:
build:
Expand Down Expand Up @@ -31,5 +31,5 @@ jobs:
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pip install -r test-requirements.txt
pip install pytest
pytest
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ exclude .*
exclude requirements.txt test-requirements.txt environment.yml
exclude azure-pipelines.yml
recursive-exclude tests *
recursive-exclude docs *
recursive-exclude .github *
60 changes: 22 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@

# tagreader-python #
# tagreader-python <!-- omit in toc -->

[![PyPI version](https://badge.fury.io/py/tagreader.svg)](https://badge.fury.io/py/tagreader)
![Build](https://github.com/equinor/tagreader-python/workflows/Build/badge.svg)
[![Build Status](https://dev.azure.com/EIIDS/tagreader/_apis/build/status/equinor.tagreader-python?branchName=master)](https://dev.azure.com/EIIDS/tagreader/_build/latest?definitionId=5&branchName=master)

## Index ##
## Index <!-- omit in toc -->

* [Introduction](#introduction)
* [Requirements](#requirements)
* [Installation](#installation)
* [ODBC Drivers](#odbc-drivers)
* [Uninstallation](#uninstallation)
* [Contributing](#contributing)
* [Usage examples](#usage-examples)
- [Introduction](#introduction)
- [Requirements](#requirements)
- [Installation](#installation)
- [Documentation](#documentation)
- [Contributing](#contributing)

## Introduction ##
## Introduction

Tagreader is a Python package for reading trend data from the OSIsoft PI and Aspen Infoplus.21 IMS systems. Tagreader is
intended to be easy to use, and present as similar as possible interfaces to the backend historians.
Expand All @@ -25,44 +22,31 @@ a way as to allow for other interfaces, e.g. REST APIs, in the future.

Tagreader is based on Pandas for Python, and uses the HDF5 file format to cache results.

## Requirements ##
## Requirements

* Python >= 3.6 with the following packages:
* pandas >= 0.23
* pytables
* pyodbc
* PI ODBC driver and/or Aspen IP.21 SQLPlus ODBC driver
* Microsoft Windows (Sorry. This is due to the proprietary ODBC drivers for OSIsoft PI and Aspen IP.21)
## Installation ##
+ pandas >= 1.0.0
+ pytables
+ pyodbc (if using ODBC connections)
+ requests (if using REST-API connections)
* If using ODBC connections, you must also install proprietary drivers for PI ODBC and/or Aspen IP.21 SQLPlus. These drivers are only available for Microsoft Windows.

## Installation

To install and/or upgrade:
```

```
pip install --upgrade tagreader
```

### ODBC Drivers ###

If you work in Equinor, you can find further information and links to download the drivers on our
[wiki](https://wiki.equinor.com/wiki/index.php/tagreader-python).
If you wish to use ODBC connections to the IMS servers, you will also need some drivers. Check the [manual](docs/manual.md).

If you do not work in Equinor: In order to fetch data from OSIsoft PI or Aspen InfoPlus.21, you need to obtain and
install proprietary ODBC drivers. It is typically not sufficient to install the desktop applications from Aspen or
OSIsoft, since these normally don't come packaged with 64-bit ODBC drivers. Check with your employer/organisation
whether the ODBC drivers are available for you. If not, you may be able to obtain them directly from the vendors.
## Documentation

## Uninstallation ##
There is a [quickstart](docs/quickstart.ipynb) example file that should get you going. Also check out the [manual](docs/manual.md) for more information.

```
pip uninstall tagreader
```

## Contributing ##
## Contributing

All contributions are welcome, including code, bug reports, issues, feature requests, and documentation. The preferred
way of submitting a contribution is to either make an issue on GitHub or by forking the project on GitHub and making a
pull request.

## Usage examples ##

Please see the [quickstart](docs/quickstart.ipynb) example file.
5 changes: 2 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,11 @@ steps:
HTTPS_PROXY: $(var_http_proxy)

- script: |
pip install -r test-requirements.txt
pip install pytest-azurepipelines
pip install pytest pytest-azurepipelines
curl --header "Authorization: token %TOKEN%" --output extratests.zip -L https://github.com/equinor/tagreader-python-extra-tests/archive/master.zip
rmdir /S /Q extratests
unzip -o -j -d extratests extratests.zip */tests/*.py
pytest
pytest tests/ extratests/
displayName: 'pytest'
env:
HTTPS_PROXY: $(var_http_proxy)
Expand Down
Loading

0 comments on commit 45a7053

Please sign in to comment.