Metadata-Version: 2.1
Name: corebridge
Version: 0.2.0
Summary: Bridge for Stactics AICore
Home-page: https://github.com/fenke/corebridge
Author: Fenke Meijer
Author-email: fenkemeijer@gmail.com
License: Apache Software License 2.0
Keywords: nbdev jupyter notebook python
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: License :: OSI Approved :: Apache Software License
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: python-dateutil
Requires-Dist: pytz
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: scipy
Requires-Dist: scikit-learn
Requires-Dist: fastcore
Provides-Extra: dev
Requires-Dist: python-dateutil ; extra == 'dev'
Requires-Dist: pytz ; extra == 'dev'
Requires-Dist: numpy ; extra == 'dev'
Requires-Dist: pyarrow ; extra == 'dev'
Requires-Dist: pandas ; extra == 'dev'
Requires-Dist: scipy ; extra == 'dev'
Requires-Dist: scikit-learn ; extra == 'dev'
Requires-Dist: fastcore ; extra == 'dev'
Requires-Dist: jupyter ; extra == 'dev'
Requires-Dist: ipywidgets ; extra == 'dev'
Requires-Dist: jupyterlab >4 ; extra == 'dev'
Requires-Dist: jupyter-contrib-nbextensions ; extra == 'dev'
Requires-Dist: jupyterlab-git ; extra == 'dev'
Requires-Dist: jupyterlab-quarto ; extra == 'dev'
Requires-Dist: nbdev ; extra == 'dev'
Requires-Dist: aiohttp ; extra == 'dev'
Requires-Dist: asyncpg ; extra == 'dev'
Requires-Dist: apscheduler ; extra == 'dev'

# corebridge


<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

This package provides functions and classes to run wodan style
processing functions in the Stactics AICore environment.

## Install

``` sh
pip install corebridge
```

## How to use

### Introduction

#### Wodan processing functions

Wodan is a proprietary backend service that applies high performance,
custom analytical processing to timeseries data in the Whysor data and
dashboarding environment.

Each wodan module defines one function that operates as the entry point.
The parameter annotations in this function definition are used to format
data and retrieve parameters from the originating call to the wodan api.
This function is called with data retrieved according to a specification
and with additional parameters as annotated.

A simple function might look like:

``` {python}
import numpy as np

def multiply(data:np.ndarray, multiplier:float=1.0):
    return data * multiplier
    
```

#### AICore modules

For AICore one defines a class, always named `Module` with a constructor
`__init__` and a method `infer`.

This package defines a baseclass to quickly construct a custom `Module`
class that uses a wodan processor function inside the AICore system:

``` {python}
import numpy as np
import corebridge

def multiply(data:np.ndarray, multiplier:float=1.0):
    return data * multiplier

class Module(corebridge.aicorebridge.AICoreModule):
    def __init__(self, save_dir, assets_dir, *args, **kwargs):
        super().__init__(read, save_dir, assets_dir, *args, **kwargs)
    
```

That’s it. Well, you can add parameters to `__init__` that can be used
as hyperparameters and you could override `infer` for the same reason.

``` python
```

    2

## nbdev cycle

- edit
- nbdev_export
- pip install -e ‘.\[dev\]’
- nbdev_test
- nbdev_clean
- nbdev_readme
- nbdev_prepare
- git add .
- 
