src.pydasa.workflows.basic#
Base class for common attributes and methods shared across all workflow PyDASA workflow management.
- Classes:
WorkflowBase: Base class for all workflow orchestrators with common analysis components and validation methods.
Attributes#
accepts Variable instances or dicts. |
|
accepts Coefficient instances or dicts. |
|
accepts framework strings, Schema objects, or FDU definitions. |
Classes#
WorkflowBase Base class for PyDASA workflow orchestrators. Provides common attributes and validation methods shared across: |
Module Contents#
- src.pydasa.workflows.basic.Variables#
accepts Variable instances or dicts.
- Type:
Type hint for variables input
- src.pydasa.workflows.basic.Coefficients#
accepts Coefficient instances or dicts.
- Type:
Type hint for coefficients input
- src.pydasa.workflows.basic.FDUs#
accepts framework strings, Schema objects, or FDU definitions.
- Type:
Type hint for schema input
- class src.pydasa.workflows.basic.WorkflowBase#
- WorkflowBase Base class for PyDASA workflow orchestrators. Provides common attributes and validation methods shared across:
AnalysisEngine: Dimensional analysis workflow (phenomena.py)
SensitivityAnalysis: Sensitivity analysis workflow (influence.py)
MonteCarloSimulation: Monte Carlo experiments workflow (practical.py)
- _coefficients#
All coefficients in the model.
- Type:
Dict[str, Coefficient]
- _variables: Dict[str, pydasa.elements.parameter.Variable]#
All variables in the workflow.
- _schema: pydasa.dimensional.vaschy.Schema | None = None#
Dimensional framework schema for the workflow. After __post_init__, this will always be a Schema instance.
- _coefficients: Dict[str, pydasa.dimensional.buckingham.Coefficient]#
Generated coefficients in the workflow.
- _convert_to_objects(data, tgt_cls)#
_convert_to_objects() Converts dictionary values to target class instances (Variable or Coefficient). Accepts either existing instances or dicts to convert.
- Parameters:
- Raises:
ValueError – If any value is neither the target class nor a dict.
- Returns:
Dictionary with values converted to target class instances.
- Return type:
Dict[str, Any]
- _convert_to_schema(val)#
- _convert_to_schema() Converts various schema input formats to a Schema instance. Accepts:
str: Framework name (e.g., “PHYSICAL”), load known schema
Schema: Direct Schema instance
Dict: Complete Schema dict or single FDU definition
List[Dict]: Multiple FDU definitions for CUSTOM framework
- property variables: Dict[str, pydasa.elements.parameter.Variable]#
variables Get the variable dictionary.
- property schema: pydasa.dimensional.vaschy.Schema | None#
schema Get the dimensional framework schema.
- Returns:
Schema instance or None.
- Return type:
Optional[Schema]
- property coefficients: Dict[str, pydasa.dimensional.buckingham.Coefficient]#
coefficients Get the coefficient dictionary.
- Returns:
Copy of coefficients dictionary.
- Return type:
Dict[str, Coefficient]
- property is_solved: bool#
is_solved Check if the workflow is finished.
- Returns:
True if solved, False otherwise.
- Return type:
- reset()#
reset Reset the workflow state while preserving input configuration. Clears coefficients, results, and solved state.
- Return type:
None
- clear()#
clear() Clear all workflow attributes, including variables, coefficients, results, and solved state.
- Return type:
None
- to_dict()#
to_dict() Convert the workflow instance to a dictionary representation, handling nested Schema, Variable, and Coefficient objects.
- Returns:
Dictionary representation of the workflow.
- Return type:
Dict[str, Any]
- classmethod from_dict(data)#
from_dict() Create workflow instance from dictionary representation, converting dicts back to Variable, Coefficient, and Schema objects as needed.
- Parameters:
data (Dict[str, Any]) – Dictionary representation of the workflow.
- Returns:
Workflow instance created from the dictionary.
- Return type: