Skip to main content

EDK

The EDK (ELARA Development Kit) is a CLI, API, and development libraries to create, develop and deploy ELARA solutions.

Installation#

The EDK package can be installed with npm:

$ npm install -g @elaraai/edk

Usage#

The EDK can be used either as the CLI, API or as the development libraries.

CLI Usage#

Once the EDK is installed globally, the CLI can be invoked from the command line, for example to read the EDK help:

$ edk --helpUsage: edk [options] [command]
Options:  -V, --version                  output the version number  -h, --help                     display help for command
Commands:  init [options]                 initialise a new ELARA project  add                            add an asset to the project  remove [options] <asset>       remove an asset from the project  links [options] <asset>        show the directly linked assets in a project  list [options]                 list the assets in the project  update [options]               update the assets in the project  build [options]                build the schema from assets  deploy [options] <deployment>  deploy the assets in a project  help [command]                 display help for command

API Usage#

The api modules may be imported and applied within Typescript projects:

import * as edk from '@elaraai/edk'// create a simple application to create a project, add a datasource, build and deployconst project_dir = 'path_to_workspace'async function run() {     // create a project     let project_config = await edk.init({          name: 'A project',          dir: project_dir      })      // add a deployment     project_config = edk.addDeployment({         dir: project_dir,         server: 'https://server_url',         name: 'test',         config: project_config     })      // add a datasource to the project     project_config = edk.addRangeDataSource({         name: "Datasource",         dir: project_dir,         def_dir: 'src/sources',         config: project_config,         start: 1.5,         stop: 1000,         step: 2.3     });      // build the schema     let build = edk.buildSchema({          dir: project_dir,          config: project_config      });     if(build === false) {         //...     }      // deploy the schema     let deploy = await edk.deploySchema({          dir: project_dir,          config: project_config,          deployment: 'test'      });     if(deploy === false) {         //...     }} run()

Library Usage#

The library modules may be imported and applied within EDK project assets:

import { ApplicationPlugin, WeatherPlugin, HolidaysPlugin, Environment, EnvironmentVariable } from '@elaraai/edk/lib'
export default ApplicationPlugin({    name: 'Weather & Holidays',    schemas: {       Weather: WeatherPlugin(),       Holidays: HolidaysPlugin(),    ),    users: [        User({            email: 'admin@domain.com'            name: 'Admin',            password: Environment('ADMIN_PASSWORD'),            is_disabled: false,            is_admin: true        })    ],    env: [        EnvironmentVariable({ name: 'ADMIN_PASSWORD' })     ]})

Documentation#

We provide the following detailed documentation:

License#

The EDK is licensed under the EDK Licence version LICENSE-1.04, the full version of the EDK Licence is available here.

Release Notes#

The following release notes summarise changes accross edk, edk-io package, edk-examples.

  • Version 3.x.x

    • edk/lib:
      - Application:    - Added `GroupCombinedVisual` to visualise a combination column and line chart on a shared numeric y axes.    - Added `VisualList` to allow secondary charts to be shown on a page using drag and drop into existing `PanelVisual` objects    - Added `powered`, `ApplicationIcon` and updates to `ApplicationColors` for customised styling of UI.    - Add improved UI view download, filtering and sorting- Structure:    - Add `Settable``Property` to facilitate event based single-value properties.    - Remove `predict` predicate in `Process`, `Resource` and `Agent` entities, to automate seperation of deterministic trajectories from probabilistic trajectories in simulation.    - Improve status output for `Optimization`- Plugin:        - Added `OptimizationPlugin` to diagnose state and progress of `Optimization`.        - Added `OptionsPipelinePlugin` to create a pipeline flattening `Option`, `Value` and `Function` property values across defined scenarios.        - Added `PredictionPlugin` to diagnose state and progress of `Prediction`.
      -edk/io:
      - Store:    - Added `skip` paramater to skip a number of rows for `top`.    - Added `list`, `size` and `top` commands to enable interaction with the file store.
    • edk-examples:
      • Added customisation of Application and VisualList to Visual Example in edk-examples.
      • Update all examples with removal of predict predicate in Process, Resource and Agent entities.
  • Version 2.x.x

    • edk
      • Added edk add visual command to manage visual assets.
      • Added edk build speed improvements.
      • Added edk links command to view the relationships to a specificed project asset.
      • Seperated input/ouput (including detection) related edk functionality into edk-io package.
      • Added handling of uri schema to edk add datasource and edk-io detect.
      • Added version command to view currently installed version of edk-io and edk.
    • edk/lib:
      • Pipeline:
        • Added DistributionOperation to generate grouped distributions in a Pipeline.
        • Added OffsetOperation to select expressions from sorted offset rows in a Pipeline.
      • Structure:
        • Add explicit date configuration for SingleEvent and MultipleEvent.
      • Application:
        • Added RowPivotVisual to visualise ordered structs in a dense pivot grid.
        • Improve UI and visual styling
        • Improved Layout and Axis definition and helper functions.
        • Added RowRidgelineVisual to visualise high resolution stacked ridgeline charts.
        • Added z_overlap to RowRidgelineVisual and GroupRidgelineVisual to control of z vertical cutoff.
        • Added key to GroupLineVisual to generate nested lines.
        • Improved Layout and Axis definition and helper functions.
      • Datasource:
        • Added uri schema to DataSource for generalised specification of the following protocols: ftp://, sftp://, http://, https://, mssql://, file://.
      • Schema:
        • Seperate Visual into root of schema object.
      • Plugin:
          - Added `ScenarioFlattenPlugin` to transpose multiple `Scenario` rows into value `Expression`s per `Scenario`.  - Added `TimeBoundsPlugin` to calculate the temporal range accross multiple `Table`s.
    • edk-examples:
      • Update Visual Example in edk-examples to demonstrate RowPivotVisual.
      • Added Large Example in edk-examples to demonstrate simulation for large problems.
      • Added Queue Example in edk-examples to demonstrate optimisation of service orientated work.
      • Added Event Example in edk-examples to demonstrate explicit event dates in simulation.
      • Added Manual Example in edk-examples to demonstrate practical use of manual options.
      • Update Pipeline Example in edk-examples to demonstrate OffsetOperation and DistributionOperation.
      • Initial publish of edk-examples.
  • Version 1.x.x

    • Initial public release