Source code for microprobe.model

# Copyright 2011-2021 IBM Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
""":mod:`microprobe.model` package

"""

# Futures

# Built-in modules

# Third party modules

# Own modules
from __future__ import absolute_import
from microprobe.utils.logger import get_logger

# Local modules


# Constants
LOG = get_logger(__name__)
__all__ = ["GenericModel"]

# Functions


# Classes
[docs] class GenericModel(object): """GenericModel Class Base class to represent different types of models. """
[docs] def __init__(self, name: str, description: str): """ :param name: :param description: """ super(GenericModel, self).__init__() self._name = name self._description = description
@property def name(self): """Name of the model (:class:`str`).""" return self._name @property def description(self): """Description of the model (:class:`str`).""" return self._description def __str__(self): """x.__str__() <==> str(x)""" return "%s(%s, %s)" % ( self.__class__.__name__, self.name, self.description )