Discipline

class Discipline

Bases: CommonBaseModel

Represents a specific discipline within engineering or scientific fields, organizing associated tools, models, and methodologies.

This class facilitates structured access to and management of discipline-specific resources, enhancing the organization and efficiency of engineering and scientific projects.

name

The name of the discipline, providing a clear identifier for categorization and reference.

Type:

Optional[str]

description

A brief description of the discipline and its scope.

Type:

Optional[str]

tools

A list of tools and models associated with the discipline, detailing the available resources for conducting analyses or simulations.

Type:

Optional[List[ModelDescription]]

metadata

Additional metadata providing further context or details about the discipline and its associated resources.

Type:

Optional[Metadata]

Attributes Summary

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Methods Summary

add_tool(tool)

Add a new tool or model to the discipline, expanding the set of resources available for analysis and design.

validate_name(value)

Validate the 'name' field to ensure it is not empty and contains only alphanumeric characters, underscores, and spaces.

Attributes Documentation

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'allow', 'protected_namespaces': (), 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Methods Documentation

add_tool(tool)

Add a new tool or model to the discipline, expanding the set of resources available for analysis and design.

Parameters:

tool (ModelDescription) – The tool or model to be added.

Return type:

None

classmethod validate_name(value)

Validate the ‘name’ field to ensure it is not empty and contains only alphanumeric characters, underscores, and spaces.

Parameters:

value (str) – The name of the discipline being validated.

Returns:

The validated name.

Raises:

ValueError – If the name is empty, contains invalid characters, or is not a string.

Return type:

str

Methods:

validate_name(value)

Validate the 'name' field to ensure it is not empty and contains only alphanumeric characters, underscores, and spaces.

add_tool(tool)

Add a new tool or model to the discipline, expanding the set of resources available for analysis and design.

Attributes:

__pydantic_setattr_handlers__

__setattr__ handlers.

classmethod validate_name(value)

Validate the ‘name’ field to ensure it is not empty and contains only alphanumeric characters, underscores, and spaces.

Parameters:

value (str) – The name of the discipline being validated.

Returns:

The validated name.

Raises:

ValueError – If the name is empty, contains invalid characters, or is not a string.

Return type:

str

add_tool(tool)

Add a new tool or model to the discipline, expanding the set of resources available for analysis and design.

Parameters:

tool (ModelDescription) – The tool or model to be added.

Return type:

None

__pydantic_setattr_handlers__: ClassVar[Dict[str, Callable[[BaseModel, str, Any], None]]] = {}

__setattr__ handlers. Memoizing the handlers leads to a dramatic performance improvement in __setattr__