Skyworker AI Processor
Project description
Skyworker Processor: {processor_name}
Template repository for the Skyworker AI Processor
Requirements
Python >= 3.6
pip
venv (recommended)
Usage
- Clone this repository
- Update todos in setup.py file
- Update todos in skyworker_processor/__init__.py file
- Define your logic in skyworker_processor/core/processor.py module's
process
function
The return value of skyworker_processor.process()
function should be the pandas.DataFrame
object with following columns:
measurement
- Measurement Namevalue
- Calculated Value
and the index of each row should be the unique timestamp.
Example
import pandas as pd
from datetime import datetime
time_series = [
{
"timestamp": 1628150400,
"measurement": "Electricity Price",
"value": 0.23,
},
{
"timestamp": 1628236800,
"measurement": "Electricity Price",
"value": 0.25,
}
]
data_frame = pd.DataFrame(time_series)
# Set "timestamp" column as index.
data_frame.index = data_frame["timestamp"]
# Compose "time" column from the "timestamp"
data_frame["time"] = data_frame["timestamp"].map(datetime.fromtimestamp)
del data_frame["timestamp"]
Build & Publish
Build and Publish is a part of the CI/CD pipeline, but you can publish your package manually:
# Check the package.
$ python setup.py check
# Build the package.
$ python setup.py sdist
# Publish the package.
$ twine upload dist/*
Changelog
Please see CHANGELOG for details.
Authors
- Temuri Takalandze - Author and Maintainer
License
Copyright © 2021 Omedia.
Released under the Other/Proprietary License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for skyworker_dev_petroleum_price_random-0.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cac43cfad3c1f56770cddc1fc11af7c102da45eb8f8128d0f1d43789d35dd769 |
|
MD5 | 8334386145dca183eb6bb2e1f18726e7 |
|
BLAKE2b-256 | b0d27667cffc462050a1dd68b536fcbe39a3eda630f1f0253695c874aa470f49 |