Skip to content

Commit bb3f8a6

Browse files
Merge pull request #22 from ChristianTremblay/release/0.9
Release/0.9
2 parents 0bdd615 + 58283ba commit bb3f8a6

46 files changed

Lines changed: 751 additions & 2316 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

MANIFEST

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,6 @@ pyhaystack\client\ops\vendor\__init__.py
4343
pyhaystack\client\ops\vendor\niagara.py
4444
pyhaystack\client\ops\vendor\skyspark.py
4545
pyhaystack\client\ops\vendor\widesky.py
46-
pyhaystack\history\HisRecord.py
47-
pyhaystack\history\__init__.py
48-
pyhaystack\io\__init__.py
49-
pyhaystack\io\haystackPoint.py
50-
pyhaystack\io\haystackRead.py
51-
pyhaystack\io\jsonParser.py
52-
pyhaystack\io\zincParser.py
5346
pyhaystack\server\__init__.py
5447
pyhaystack\util\__init__.py
5548
pyhaystack\util\asyncexc.py

README.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ As stated in the web site
3535

3636
-- Project-Haystack
3737

38+
New implementation
39+
--------------------------
40+
We've been reworking everything from the early version.
41+
Now, pyhaystack is more robust and will be ready for asynchronous development.
42+
3843

3944
.. |build-status| image:: https://travis-ci.org/ChristianTremblay/pyhaystack.svg?branch=master
4045
:target: https://travis-ci.org/ChristianTremblay/pyhaystack

docs/source/README.rst

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,18 @@ pyhaystack |build-status| |coverage| |docs| |Gitter|
33

44
What is this ?
55
--------------
6-
Pyhaystack is a module that allow python programs to connect to a haystack server [project-haystack.org](http://www.project-haystack.org).
6+
Pyhaystack is a module that allow python programs to connect to a haystack server
7+
using semantic data model for buildings (project-haystack_).
8+
9+
Browse a campus, building, floor... find VAV boxes, AHU units, etc. Then extract history
10+
data from them and get the results ready for analysis using pandas or your own database implementation.
711

812
Which clients are implemented ?
913
-------------------------------
1014
Actually, connection can be established with :
1115

1216
* NiagaraAX_ by Tridium
13-
* Widesky_ by VRT
17+
* Widesky_ by VRT_
1418
* Skyspark_ by SkyFoundry
1519

1620
Connection to Niagara AX requires the nHaystack_ module by J2 Innovations
@@ -21,6 +25,10 @@ How do I install pyhaystack ?
2125

2226
pip install pyhaystack
2327

28+
Or you can also git clone the develop branch and use ::
29+
30+
python setup.py install
31+
2432
What is project-haystack ?
2533
--------------------------
2634
As stated in the web site
@@ -35,6 +43,23 @@ As stated in the web site
3543

3644
-- Project-Haystack
3745

46+
New implementation
47+
--------------------------
48+
We've been reworking everything from the early version.
49+
Now, pyhaystack is more robust and will be ready for asynchronous development.
50+
51+
This new implementation has been mostly supported by VRT_ and Servisys_. We are hoping
52+
that more people will join us in our effort to build a well working open-source software
53+
that will open the door of building data analysis to Python users.
54+
55+
Dependency
56+
--------------
57+
Pyhaystack highly depend on hszinc_ which is a special parser for zinc encoded data.
58+
Zinc was created for project-haystack_ as a CSV replacement.
59+
60+
For analysis, we also suggest using Pint_ to deal with units. It will bring a lot of possibilities
61+
to pyhaystack (ex. unit conversion)
62+
3863

3964
.. |build-status| image:: https://travis-ci.org/ChristianTremblay/pyhaystack.svg?branch=master
4065
:target: https://travis-ci.org/ChristianTremblay/pyhaystack
@@ -56,10 +81,18 @@ As stated in the web site
5681

5782
.. _NiagaraAX : https://www.tridium.com/en/products-services/niagaraax
5883

59-
.. _Widesky : http://www.vrt.com.au/component/energy-efficiency
84+
.. _VRT : http://www.vrt.com.au/
85+
86+
.. _Servisys : http://www.servisys.com
87+
88+
.. _Widesky : http://widesky.cloud/
6089

6190
.. _nHaystack : https://bitbucket.org/jasondbriggs/nhaystack
6291

6392
.. _project-haystack : http://www.project-haystack.org
6493

65-
.. _Project Haystack : http://www.project-haystack.org
94+
.. _Project Haystack : http://www.project-haystack.org
95+
96+
.. _Pint : http://pint.readthedocs.io
97+
98+
.. _hszinc : https://github.com/vrtsystems/hszinc

docs/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
'sphinx.ext.ifconfig',
4242
'sphinx.ext.viewcode',
4343
]
44-
44+
autoclass_content = 'both'
4545
# Add any paths that contain templates here, relative to this directory.
4646
templates_path = ['_templates']
4747

@@ -119,7 +119,7 @@
119119

120120
# The theme to use for HTML and HTML Help pages. See the documentation for
121121
# a list of builtin themes.
122-
html_theme = 'bizstyle'
122+
html_theme = 'sphinx_rtd_theme'
123123

124124
# Theme options are theme-specific and customize the look and feel of a theme
125125
# further. For a list of options available for each theme, see the

docs/source/connect.rst

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ Using Niagara AX
88
from pyhaystack.client.niagara import NiagaraHaystackSession
99
session = NiagaraHaystackSession(uri='http://ip:port',
1010
username='user',
11-
password='myPassword')
11+
password='myPassword',
12+
*pint=True)
13+
14+
Note that pint parameter is optionnal and default to False.
1215

1316
Using Widesky
1417
--------------
@@ -19,7 +22,8 @@ Using Widesky
1922
username='user',
2023
password='my_password',
2124
client_id = 'my_id',
22-
client_secret = 'my_secret')
25+
client_secret = 'my_secret'
26+
*pint=True)
2327
2428

2529
Using Skyspark
@@ -30,15 +34,16 @@ Using Skyspark
3034
session = SkysparkHaystackSession(uri='http://ip:port',
3135
username='user',
3236
password='my_password',
33-
project = 'my_project')
37+
project = 'my_project'
38+
*pint=True)
3439
35-
Next
36-
----
40+
On-Demand connection
41+
---------------------
3742
Once the session is initialized, it won't connect until it needs to.
3843
Pyhaystack will benefit from the asynchronous framework and connect on demand.
3944
The session will be connected and the request will be sent to the server.
4045

41-
If when making a request, pyhaystack detects that it has been disconnected,
46+
If, when making a request, pyhaystack detects that it has been disconnected,
4247
it will re-connect automatically.
4348

4449
See next section to know more about requests.

docs/source/his.rst

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
Histories
22
===================
3-
Histories (trend) are accessible using
4-
`his_read_series(self, point, rng, tz=None,series_format=None, callback=None)` function.
5-
6-
::
7-
8-
session.his_read('S.SERVISYS.Bureau-Christian.ZN~2dT', rng='today').result
9-
10-
Histories can be retrive as a zinc grid, Pandas series or Pandas Dataframe.
3+
Histories are a really important part of building data. Pyhaystack allows retrieving histories
4+
as zinc grid, pandas series or pandas Dataframe depending on your needs.
115

126
Range
137
+++++
@@ -37,7 +31,6 @@ Retrieve simple grid
3731
session.his_read('S.SERVISYS.Bureau-Christian.ZN~2dT', rng='today').result
3832

3933

40-
4134
Retrieve a Pandas Series
4235
------------------------
4336
For more details about Pandas : pandas_datastructure_
@@ -47,13 +40,16 @@ For more details about Pandas : pandas_datastructure_
4740

4841
Retrieve a Pandas Dataframe
4942
---------------------------
43+
In the following example, we will retrive all the historical value from 'today' for
44+
all zone temperature sensors.
45+
5046
::
5147

5248
znt = session.find_entity(filter_expr='sensor and zone and temp').result
5349
b = session.his_read_frame(znt, rng= 'today').result
5450
b
5551

56-
will return a dataframe of all entities history
52+
We use ``find_entity`` first, then we call ``his_read_frame`` over the result.
5753

5854
.. _his : http://project-haystack.org/tag/his
5955

docs/source/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ Welcome to pyhaystack's documentation!
1010
How to use it
1111
==================
1212
.. toctree::
13-
:maxdepth: 2
1413

1514
connect
1615
site
1716
tags
1817
his
19-
VRT_SERVISYS
18+
quantity
19+
synchronous
2020

2121
Modules documentation
2222
=====================
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
pyhaystack.client.entity.mixins package
2+
=======================================
3+
4+
Submodules
5+
----------
6+
7+
pyhaystack.client.entity.mixins.equip module
8+
--------------------------------------------
9+
10+
.. automodule:: pyhaystack.client.entity.mixins.equip
11+
:members:
12+
:undoc-members:
13+
:show-inheritance:
14+
15+
pyhaystack.client.entity.mixins.point module
16+
--------------------------------------------
17+
18+
.. automodule:: pyhaystack.client.entity.mixins.point
19+
:members:
20+
:undoc-members:
21+
:show-inheritance:
22+
23+
pyhaystack.client.entity.mixins.site module
24+
-------------------------------------------
25+
26+
.. automodule:: pyhaystack.client.entity.mixins.site
27+
:members:
28+
:undoc-members:
29+
:show-inheritance:
30+
31+
pyhaystack.client.entity.mixins.tz module
32+
-----------------------------------------
33+
34+
.. automodule:: pyhaystack.client.entity.mixins.tz
35+
:members:
36+
:undoc-members:
37+
:show-inheritance:
38+
39+
40+
Module contents
41+
---------------
42+
43+
.. automodule:: pyhaystack.client.entity.mixins
44+
:members:
45+
:undoc-members:
46+
:show-inheritance:
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
pyhaystack.client.entity.models package
2+
=======================================
3+
4+
Submodules
5+
----------
6+
7+
pyhaystack.client.entity.models.haystack module
8+
-----------------------------------------------
9+
10+
.. automodule:: pyhaystack.client.entity.models.haystack
11+
:members:
12+
:undoc-members:
13+
:show-inheritance:
14+
15+
16+
Module contents
17+
---------------
18+
19+
.. automodule:: pyhaystack.client.entity.models
20+
:members:
21+
:undoc-members:
22+
:show-inheritance:
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
pyhaystack.client.entity.ops package
2+
====================================
3+
4+
Submodules
5+
----------
6+
7+
pyhaystack.client.entity.ops.crud module
8+
----------------------------------------
9+
10+
.. automodule:: pyhaystack.client.entity.ops.crud
11+
:members:
12+
:undoc-members:
13+
:show-inheritance:
14+
15+
16+
Module contents
17+
---------------
18+
19+
.. automodule:: pyhaystack.client.entity.ops
20+
:members:
21+
:undoc-members:
22+
:show-inheritance:

0 commit comments

Comments
 (0)