PerformanceCheck¤
PerformanceCheck
dataclass
¤
PerformanceCheck(
completed_date: date,
competency: Competency,
entered_by: str = "",
checked_by: str = "",
checked_date: date | None = None,
conditions: Conditions = Conditions(),
cvd_equations: tuple[CVDEquation, ...] = (),
deserialisers: tuple[Deserialised, ...] = (),
equations: tuple[Equation, ...] = (),
files: tuple[File, ...] = (),
tables: tuple[Table, ...] = (),
)
Represents the performanceCheck element in an equipment register.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
completed_date
|
date
|
The date that the performance check was completed. |
required |
competency
|
Competency
|
The competent people who accomplished the performance check and the technical procedure that was executed. |
required |
entered_by
|
str
|
The name of the person who initially entered the |
''
|
checked_by
|
str
|
The name of the person who checked the information in the |
''
|
checked_date
|
date | None
|
The date that the information in the |
None
|
conditions
|
Conditions
|
The conditions under which the performance check is valid. |
Conditions()
|
cvd_equations
|
tuple[CVDEquation, ...]
|
Performance-check data is expressed as Callendar-Van Dusen equations. |
()
|
deserialisers
|
tuple[Deserialised, ...]
|
Performance-check data is stored in serialised formats and deserialised. |
()
|
equations
|
tuple[Equation, ...]
|
Performance-check data is expressed as equations. |
()
|
files
|
tuple[File, ...]
|
Performance-check data is stored in other files (not in the equipment register). |
()
|
tables
|
tuple[Table, ...]
|
Performance-check data is stored as Comma Separated Values (CSV) tables. |
()
|
checked_by
class-attribute
instance-attribute
¤
checked_by: str = ''
The name of the person who checked the information in the <performanceCheck> element.
checked_date
class-attribute
instance-attribute
¤
checked_date: date | None = None
The date that the information in the <performanceCheck> element was last checked.
competency
instance-attribute
¤
competency: Competency
The competent people who accomplished the performance check and the technical procedure that was executed.
completed_date
instance-attribute
¤
completed_date: date
The date that the performance check was completed.
conditions
class-attribute
instance-attribute
¤
conditions: Conditions = field(default_factory=Conditions)
The conditions under which the performance check is valid.
cvd_equation
property
¤
cvd_equation: CVDEquation
Returns the first item in the cvd_equations tuple.
Raises IndexError if the performance check does not contain Callendar-Van Dusen equations.
cvd_equations
class-attribute
instance-attribute
¤
cvd_equations: tuple[CVDEquation, ...] = ()
Performance-check data is expressed as Callendar-Van Dusen equations.
deserialised
property
¤
deserialised: Deserialised
Returns the first item in the deserialisers tuple.
Raises IndexError if the performance check does not contain serialised data.
deserialisers
class-attribute
instance-attribute
¤
deserialisers: tuple[Deserialised, ...] = ()
Performance-check data is stored in serialised formats and deserialised.
entered_by
class-attribute
instance-attribute
¤
entered_by: str = ''
The name of the person who initially entered the <performanceCheck> element in the register.
equation
property
¤
equation: Equation
Returns the first item in the equations tuple.
Raises IndexError if the performance check does not contain equations.
equations
class-attribute
instance-attribute
¤
Performance-check data is expressed as equations.
file
property
¤
file: File
Returns the first item in the files tuple.
Raises IndexError if the performance check does not contain files.
files
class-attribute
instance-attribute
¤
Performance-check data is stored in other files (not in the equipment register).
table
property
¤
table: Table
Returns the first item in the tables tuple.
Raises IndexError if the performance check does not contain tables.
tables
class-attribute
instance-attribute
¤
Performance-check data is stored as Comma Separated Values (CSV) tables.
from_xml
classmethod
¤
from_xml(element: Element[str]) -> PerformanceCheck
Convert an XML element into a PerformanceCheck instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element
|
Element[str]
|
A performanceCheck XML element from an equipment register. |
required |
Returns:
| Type | Description |
|---|---|
PerformanceCheck
|
The PerformanceCheck instance. |
Source code in src/msl/equipment/schema.py
1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 | |
to_xml
¤
Convert the PerformanceCheck class into an XML element.
Returns:
| Type | Description |
|---|---|
Element[str]
|
The PerformanceCheck as an XML element. |
Source code in src/msl/equipment/schema.py
1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 | |