src.pydasa.core.setup#

Configuration module for PyDASA Dimensional Analysis parameters. Provides type-safe, immutable configuration using Enums and frozen dataclasses.

Its key features are:
  • Type-safe Enum definitions for frameworks, categories, and modes

  • Immutable configuration via frozen dataclass with singleton pattern

  • Backward compatibility with legacy dict-based access

Supported Frameworks:
  • PHYSICAL: Traditional physical dimensional framework.

  • COMPUTATION: Computer science dimensional framework.

  • SOFTWARE: Software architecture dimensional framework.

  • CUSTOM: User-defined dimensional framework.

Supported Variable Categories:
  • IN: Input variables influencing the system.

  • OUT: Output variables representing analysis results.

  • CTRL: Control variables constraining the system.

Supported Analysis Modes:
  • SYM: Analysis for symbolic processable Parameters (e.g., ‘x + y’).

  • NUM: Analysis for numeric Variables (e.g., 1.0, 2.5).

NOTE: in the future the enum should be configurated via external files (e.g., JSON, YAML) to allow user customization.

IMPORTANT
  • Based on the theory from H. Görtler, Dimensionalanalyse: Eine Theoririe der physikalischen Dimensionen mit Anwendungen

Attributes#

PYDASA_CFG

Singleton instance of PyDASAConfig for accessing global configuration.

Classes#

Frameworks

Enumerator for Fundamental Dimensional Units (FDUs) frameworks/domains supported in PyDASA.

VarCardinality

Enumerator for Variable cardinality used to classify variables in the dimensional matrix.

CoefCardinality

Enumerator for Dimensionless Coefficient/Numbers/Groups (DC/DN/DG) cardinality used to classify dimensionless coefficients in formulas and equations in **PyDASA.

AnaliticMode

Enumerator for the sensitivity analysis modes used to specify the type of analysis performed on variables, coefficients, or functions in PyDASA.

SimulationMode

Enumerator for simulation modes used to specify sample generation strategy (distribution-based or data-based) in PyDASA.

PyDASAConfig

Singleton class for PyDASA configuration. It uses dataclass decorator to freeze the data.

Module Contents#

class src.pydasa.core.setup.Frameworks#

Bases: str, enum.Enum

Enumerator for Fundamental Dimensional Units (FDUs) frameworks/domains supported in PyDASA.

Inherits from:
  • str: To allow string comparison and representation.

  • Enum: To define enumeration members.

Initialize self. See help(type(self)) for accurate signature.

PHYSICAL = 'PHYSICAL'#
COMPUTATION = 'COMPUTATION'#
SOFTWARE = 'SOFTWARE'#
CUSTOM = 'CUSTOM'#
property description: str#

Get the human-readable description of the dimensional frameworks/domains.

Returns:

Human-readable framework’s description.

Return type:

str

class src.pydasa.core.setup.VarCardinality#

Bases: str, enum.Enum

Enumerator for Variable cardinality used to classify variables in the dimensional matrix.

Inherits from:
  • str (class): Python native str class.

  • Enum (class): Python native Enum class.

Initialize self. See help(type(self)) for accurate signature.

IN = 'IN'#
OUT = 'OUT'#
CTRL = 'CTRL'#
property description: str#

Get the human-readable description of the variable cardinality.

Returns:

Human-readable variable cardinality description.

Return type:

str

class src.pydasa.core.setup.CoefCardinality#

Bases: str, enum.Enum

Enumerator for Dimensionless Coefficient/Numbers/Groups (DC/DN/DG) cardinality used to classify dimensionless coefficients in formulas and equations in **PyDASA.

Inherits from:
  • str (class): Python native str class.

  • Enum (class): Python native Enum class.

Initialize self. See help(type(self)) for accurate signature.

COMPUTED = 'COMPUTED'#
DERIVED = 'DERIVED'#
property description: str#

Get the human-readable description of the coefficient cardinality.

Returns:

Human-readable coefficient cardinality description.

Return type:

str

class src.pydasa.core.setup.AnaliticMode#

Bases: str, enum.Enum

Enumerator for the sensitivity analysis modes used to specify the type of analysis performed on variables, coefficients, or functions in PyDASA.

Inherits from:
  • str (class): Python native str class.

  • Enum (class): Python native Enum class.

Initialize self. See help(type(self)) for accurate signature.

SYM = 'SYM'#
NUM = 'NUM'#
property description: str#
Return type:

str

class src.pydasa.core.setup.SimulationMode#

Bases: str, enum.Enum

Enumerator for simulation modes used to specify sample generation strategy (distribution-based or data-based) in PyDASA.

Inherits from:
  • str (class): Python native str class.

  • Enum (class): Python native Enum class.

Initialize self. See help(type(self)) for accurate signature.

DIST = 'DIST'#
DATA = 'DATA'#
property description: str#
Return type:

str

class src.pydasa.core.setup.PyDASAConfig#

Singleton class for PyDASA configuration. It uses dataclass decorator to freeze the data.

_instance: ClassVar[PyDASAConfig | None] = None#

Singleton instance of PyDASAConfig.

SPT_FDU_FWKS: dict#

Supported Fundamental Dimensional Units (FDUs) frameworks and their configurations.

classmethod get_instance()#

Get the singleton instance of PyDASAConfig for accessing the global configuration.

Returns:

Singleton instance of PyDASAConfig.

Return type:

PyDASAConfig

property frameworks: tuple[Frameworks, Ellipsis]#

Get PyDASA supported frameworks.

Returns:

Tuple of supported Frameworks.

Return type:

tuple[Frameworks, …]

property parameter_cardinality: tuple[VarCardinality, Ellipsis]#

Get PyDASA supported variable cardinalities.

Returns:

Tuple of supported VarCardinality.

Return type:

tuple[VarCardinality, …]

property coefficient_cardinality: tuple[CoefCardinality, Ellipsis]#

Get PyDASA supported coefficient cardinalities.

Returns:

Tuple of supported CoefCardinality.

Return type:

tuple[CoefCardinality, …]

property analitic_modes: tuple[AnaliticMode, Ellipsis]#

Get PyDASA supported analysis modes.

Returns:

Tuple of supported AnaliticMode.

Return type:

tuple[AnaliticMode, …]

property simulation_modes: tuple[SimulationMode, Ellipsis]#

Get PyDASA supported simulation modes.

Returns:

Tuple of supported SimulationMode.

Return type:

tuple[SimulationMode, …]

src.pydasa.core.setup.PYDASA_CFG: PyDASAConfig#

Singleton instance of PyDASAConfig for accessing global configuration.