Initializing help system before first use

Data Model

All entities in the data model must be declared with the help of type hints for the class attributes.

Parameters

Parameters can be used to configure an Xpress Insight app. When parameters are declared, their name, data type, and default value must be specified. The data type can be omitted if the default value is specified and vice versa. Parameter values are automatically passed from the scenario to Insight app such that their value from the scenario is available in all execution modes. In particular, the parameter values are available the standard load mode. Within the Insight app, the parameters should be treated as run time constants. Some examples include:

import xpressinsight as xi

@xi.AppConfig(name="My First Insight Python App", version=xi.AppVersion(0, 1, 2))
class MyApp(xi.AppBase):

    # Examples where data type is inferred from the default value.
    # Parameter "P" of type "xi.integer" with default value 100.
    P: xi.Param(100)
    # Parameter "DEBUG" of type "xi.boolean" with default value False.
    DEBUG: xi.Param(False)
    # Parameter "PI" of type "xi.real" with default value 3.14.
    PI: xi.Param(3.14)
    # Parameter "STR_PARAM" of type xi.string with default value 'My String Param'.
    STR_PARAM: xi.Param('My String Param')

    # Examples where data type is explicitly given.
    BOOL_PARAM: xi.Param(dtype=xi.boolean)   # Default value False.
    INT_PARAM: xi.Param(dtype=xi.integer)    # Default value 0.
    REAL_PARAM: xi.Param(dtype=xi.real)      # Default value 0.0.
    STRING_PARAM: xi.Param(dtype=xi.string)  # Default value "".

    # TODO: Define execution modes here.

Parameters are typically read-only.

Scalars

Scalar values are used to represent single-valued entities in the data model. Like parameters, when scalars are declared, their name, data type, and default value must be specified. The data type can be omitted if the default value is specified and vice versa. Scalars can either be input values or result values. By default, scalars are treated as input values. Some examples include:

import xpressinsight as xi

@xi.AppConfig(name="My First Insight Python App", version=xi.AppVersion(0, 1, 2))
class MyApp(xi.AppBase):

    # Examples where data type is inferred from the default value.
    # Input scalar "NumFactory" of type "xi.integer" with default value 100.
    NumFactory: xi.Scalar(100, manage=xi.Manage.INPUT)
    # Result scalar "IsOn" of type "xi.boolean" with default value True.
    IsOn: xi.Scalar(True, manage=xi.Manage.RESULT)

    # Examples where data type is explicitly given.
    StringScalar: xi.Scalar(dtype=xi.string)  # Input scalar with default value "".
    RealScalar: xi.Scalar(dtype=xi.real)      # Input scalar with default value 0.0.

    # TODO: Define execution modes here.

General Notes

In the data model, entities may be assigned an alias, which allows to specify a more "user-friendly" label for the entity which will be used in the Insight UI. For example:

MyInteger: xi.Scalar(dtype=xi.integer, alias='My Integer')

An entity MyInteger is declared, but will appear as My Integer in the Insight app UI such as table column headers, entity explorer, etc..

Data Model Classes

boolean
Declare the entity to be (or to contain) boolean (True or False) values. If not specified, the default value is False.
Column
Represent a single column within a DataFrame entity.
Column.__init__
Initializes Column.
DataFrame
Represent a DataFrame entity.
DataFrame.__init__
Initializes DataFrame.
Hidden
Possible values of whether the UI should hide an entity where appropriate.
Index
Represents an index entity. To be used in conjunction with xpressinsight.Series or xpressinsight.DataFrame objects.
Index.__init__
The constructor.
integer
Declare the entity to be (or to contain) integer (whole number) values. The values must able to be represented as 32-bit unsigned values. If not specified, the default value is 0.
Manage
How and whether Insight handles an entity.
Param
Represents a parameter entity. Parameters can be used to configure an Xpress Insight app. When parameters are declared, their name, data type, and default value must be specified. Parameters are typically read-only.
Param.__init__
Initializes Param with the data type or a default value (in which case data type is inferred).
real
Declare the entity to be (or to contain) floating-point (whole number) values. If not specified, the default value is 0.0.
Scalar
Represents a scalar entity.
Scalar.__init__
The constructor.
Series
Represent a Series entity, a declaration of a pandas Series datastructure. Every series must has at least one index.
Series.__init__
Initializes Series.
string
Declare the entity to be (or to contain) string (UTF-8 encoded) values. The length (in bytes) of a string scalar (Scalar or Param) must not exceed 1,000,000 bytes. The length of a string in a container (Index, Series, or DataFrame) must not exceed 250,000 characters If not specified, the default value is "".