Skip to content

Commit b6bc76f

Browse files
committed
make release-tag: Merge branch 'main' into stable
2 parents 135ab6f + 7716d74 commit b6bc76f

File tree

10 files changed

+133
-16
lines changed

10 files changed

+133
-16
lines changed

.github/workflows/tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
runs-on: ${{ matrix.os }}
2929
strategy:
3030
matrix:
31-
python-version: ["3.8", "3.9", "3.10", "3.11"]
31+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
3232
os: [ubuntu-latest, macos-latest]
3333
steps:
3434
- uses: actions/checkout@v1
@@ -45,7 +45,7 @@ jobs:
4545
runs-on: ${{ matrix.os }}
4646
strategy:
4747
matrix:
48-
python-version: ["3.8", "3.9", "3.10", "3.11"]
48+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
4949
os: [ubuntu-latest, macos-latest, windows-latest]
5050
steps:
5151
- uses: actions/checkout@v1
@@ -62,7 +62,7 @@ jobs:
6262
runs-on: ${{ matrix.os }}
6363
strategy:
6464
matrix:
65-
python-version: ["3.8", "3.9", "3.10", "3.11"]
65+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
6666
os: [ubuntu-latest, macos-latest, windows-latest]
6767
steps:
6868
- uses: actions/checkout@v1
@@ -73,4 +73,4 @@ jobs:
7373
- name: Install package and dependencies
7474
run: pip install invoke .[test]
7575
- name: make test-tutorials
76-
run: make test-tutorials
76+
run: make test-tutorials

HISTORY.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# History
22

3+
## 0.0.4 – 2024-03-07
4+
5+
Supporting vibrations entityset and python 3.12
6+
7+
* Add python 3.12 - [Issue #23](https://github.com/signals-dev/Zephyr/issues/23) by @sarahmish
8+
* Fix doc test - [Issue #22](https://github.com/signals-dev/Zephyr/issues/22) by @sarahmish
9+
* Create vibrations entityset - [Issue #22](https://github.com/signals-dev/Zephyr/issues/22) by @sarahmish @SaraPido
10+
11+
312
## 0.0.3 - 2024-03-12
413

514
SigPro supporting python 3.9, 3.10, and 3.11

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ to wind farm data.
5858

5959
## Requirements
6060

61-
**Zephyr** has been developed and runs on Python 3.6 and 3.7.
61+
**Zephyr** has been developed and runs on Python 3.8, 3.9, 3.10, 3.11 and 3.12.
6262

6363
Also, although it is not strictly required, the usage of a [virtualenv](
6464
https://virtualenv.pypa.io/en/latest/) is highly recommended in order to avoid interfering

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
# Add any Sphinx extension module names here, as strings. They can be
3232
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
3333
extensions = [
34-
'm2r',
34+
'm2r2',
3535
'nbsphinx',
3636
'sphinx.ext.autodoc',
3737
'sphinx.ext.githubpages',
@@ -80,7 +80,7 @@
8080
#
8181
# This is also used if you do content translation via gettext catalogs.
8282
# Usually you set "language" from the command line for these cases.
83-
language = None
83+
language = 'en'
8484

8585
# List of patterns, relative to source directory, that match files and
8686
# directories to ignore when looking for source files.

notebooks/data/vibrations.csv

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
COD_ELEMENT,signal_id,timestamp,xvalues,yvalues
2+
0,S1,2022-01-02 13:21:01,"[2022-01-02 13:21:01, 2022-01-02 13:41:01, 2022-01-02 14:01:01]","[0.5, 0.4, 0.2]"
3+
0,S2,2022-03-08 11:00:00,"[2022-03-08 11:00:00, 2022-03-08 11:10:00, 2022-03-08 11:20:00]","[10, 10, 9]"
4+
1,S1,2022-01-02 13:21:01,"[2022-01-02 13:21:01, 2022-01-02 13:41:01, 2022-01-02 14:01:01]","[0.9, 0.95, 0.8]"
5+
1,S2,2022-03-08 11:00:00,"[2022-03-08 11:00:00, 2022-03-08 11:10:00, 2022-03-08 11:20:00]","[15, 11, 9]"

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.0.3
2+
current_version = 0.0.4.dev1
33
commit = True
44
tag = True
55
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<candidate>\d+))?

setup.py

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,25 @@
4747
'watchdog>=0.8.3,<0.11',
4848

4949
# docs
50-
'm2r>=0.2.0,<0.3',
50+
'docutils>=0.12,<0.18',
51+
'lxml_html_clean>=0.2.2',
52+
'm2r2>=0.2.5,<0.3',
5153
'nbsphinx>=0.5.0,<0.7',
52-
'Sphinx>=1.7.1,<3',
54+
'Sphinx>=3,<3.3',
5355
'sphinx_rtd_theme>=0.2.4,<0.5',
5456
'autodocsumm>=0.1.10',
5557
'mistune>=0.7,<2',
56-
'Jinja2<3.1',
57-
58+
'Jinja2>=2,<3.1',
59+
60+
# fails on Sphinx < v3.4
61+
'alabaster<=0.7.12',
62+
# fails on Sphins < v5.0
63+
'sphinxcontrib-applehelp<1.0.8',
64+
'sphinxcontrib-devhelp<1.0.6',
65+
'sphinxcontrib-htmlhelp<2.0.5',
66+
'sphinxcontrib-serializinghtml<1.1.10',
67+
'sphinxcontrib-qthelp<1.0.7',
68+
5869
# style check
5970
'flake8>=3.7.7,<4',
6071
'isort>=4.3.4,<5',
@@ -87,6 +98,7 @@
8798
'Programming Language :: Python :: 3.9',
8899
'Programming Language :: Python :: 3.10',
89100
'Programming Language :: Python :: 3.11',
101+
'Programming Language :: Python :: 3.12',
90102
],
91103
description='Prediction engineering methods for Draco.',
92104
entry_points={
@@ -107,11 +119,11 @@
107119
keywords='zephyr Draco Prediction Engineering',
108120
name='zephyr-ml',
109121
packages=find_packages(include=['zephyr_ml', 'zephyr_ml.*']),
110-
python_requires='>=3.8,<3.12',
122+
python_requires='>=3.8,<3.13',
111123
setup_requires=setup_requires,
112124
test_suite='tests',
113125
tests_require=tests_require,
114126
url='https://github.com/sintel-dev/zephyr',
115-
version='0.0.3',
127+
version='0.0.4.dev1',
116128
zip_safe=False,
117129
)

zephyr_ml/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
__author__ = 'MIT Data To AI Lab'
66
__email__ = '[email protected]'
7-
__version__ = '0.0.3'
7+
__version__ = '0.0.4.dev1'
88

99
import os
1010

zephyr_ml/entityset.py

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from itertools import chain
2+
13
import featuretools as ft
24

35
from zephyr_ml.metadata import get_mapped_kwargs
@@ -73,10 +75,47 @@ def create_scada_entityset(dfs, new_kwargs_mapping=None):
7375
return es
7476

7577

78+
def create_vibrations_entityset(dfs, new_kwargs_mapping=None):
79+
'''Generate an entityset for Vibrations data datasets
80+
81+
Args:
82+
data_paths (dict): Dictionary mapping entity names ('alarms', 'notifications',
83+
'stoppages', 'work_orders', 'vibrations', 'turbines') to the pandas
84+
dataframe for that entity. Optionally 'pidata' and 'scada' can be included.
85+
'''
86+
entities = ['vibrations']
87+
88+
pidata_kwargs, scada_kwargs = {}, {}
89+
if 'pidata' in dfs:
90+
pidata_kwargs = get_mapped_kwargs('pidata', new_kwargs_mapping)
91+
entities.append('pidata')
92+
if 'scada' in dfs:
93+
pidata_kwargs = get_mapped_kwargs('scada', new_kwargs_mapping)
94+
entities.append('scada')
95+
96+
entity_kwargs = {
97+
**pidata_kwargs,
98+
**scada_kwargs,
99+
**get_mapped_kwargs('vibrations', new_kwargs_mapping),
100+
}
101+
_validate_data(dfs, entities, entity_kwargs)
102+
103+
es = _create_entityset(dfs, 'vibrations', entity_kwargs)
104+
es.id = 'Vibrations data'
105+
106+
return es
107+
108+
76109
def _validate_data(dfs, es_type, es_kwargs):
77110
'''Validate data by checking for required columns in each entity
78111
'''
79-
entities = set(['alarms', 'stoppages', 'work_orders', 'notifications', 'turbines', es_type])
112+
if not isinstance(es_type, list):
113+
es_type = [es_type]
114+
115+
entities = set(chain(
116+
['alarms', 'stoppages', 'work_orders', 'notifications', 'turbines', *es_type]
117+
))
118+
80119
if set(dfs.keys()) != entities:
81120
missing = entities.difference(set(dfs.keys()))
82121
extra = set(dfs.keys()).difference(entities)

zephyr_ml/metadata.py

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,58 @@
126126
'TIMESTAMP': 'datetime',
127127
'COD_ELEMENT': 'categorical'
128128
}
129+
},
130+
'vibrations': {
131+
'index': '_index',
132+
'make_index': True,
133+
'time_index': 'timestamp',
134+
'logical_types': {
135+
'COD_ELEMENT': 'categorical',
136+
'turbine_id': 'categorical',
137+
'signal_id': 'categorical',
138+
'timestamp': 'datetime',
139+
'sensorName': 'categorical',
140+
'sensorType': 'categorical',
141+
'sensorSerial': 'integer_nullable',
142+
'siteName': 'categorical',
143+
'turbineName': 'categorical',
144+
'turbineSerial': 'integer_nullable',
145+
'configurationName': 'natural_language',
146+
'softwareVersion': 'categorical',
147+
'rpm': 'double',
148+
'rpmStatus': 'natural_language',
149+
'duration': 'natural_language',
150+
'condition': 'categorical',
151+
'maskTime': 'datetime',
152+
'Mask Status': 'natural_language',
153+
'System Serial': 'categorical',
154+
'WPS-ActivePower-Average': 'double',
155+
'WPS-ActivePower-Minimum': 'double',
156+
'WPS-ActivePower-Maximum': 'double',
157+
'WPS-ActivePower-Deviation': 'double',
158+
'WPS-ActivePower-StartTime': 'datetime',
159+
'WPS-ActivePower-StopTime': 'datetime',
160+
'WPS-ActivePower-Counts': 'natural_language',
161+
'Measured RPM': 'double',
162+
'WPS-ActivePower': 'double',
163+
'WPS-Gearoiltemperature': 'double',
164+
'WPS-GeneratorRPM': 'double',
165+
'WPS-PitchReference': 'double',
166+
'WPS-RotorRPM': 'double',
167+
'WPS-Windspeed': 'double',
168+
'WPS-YawAngle': 'double',
169+
'overload warning': 'categorical',
170+
'bias warning': 'categorical',
171+
'bias voltage': 'double',
172+
'xValueOffset': 'double',
173+
'xValueDelta': 'double',
174+
'xValueUnit': 'categorical',
175+
'yValueUnit': 'categorical',
176+
'TotalCount-RPM0': 'double',
177+
'TotalCount-RPM1': 'double',
178+
'TotalCount-RPM2': 'double',
179+
'TotalCount-RPM3': 'double'
180+
}
129181
}
130182
}
131183

0 commit comments

Comments
 (0)