Report¤
Report
dataclass
¤
Report(
id: str,
report_issue_date: date,
measurement_start_date: date,
measurement_stop_date: date,
issuing_laboratory: IssuingLaboratory = IssuingLaboratory(),
technical_procedure: str = "",
entered_by: str = "",
checked_by: str = "",
checked_date: date | None = None,
conditions: Conditions = Conditions(),
acceptance_criteria: AcceptanceCriteria = AcceptanceCriteria(),
cvd_equations: tuple[CVDEquation, ...] = (),
deserialisers: tuple[Deserialised, ...] = (),
equations: tuple[Equation, ...] = (),
files: tuple[File, ...] = (),
tables: tuple[Table, ...] = (),
)
Represents the report element in an equipment register.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The report identification number. |
required |
report_issue_date
|
date
|
The date that the report was issued. |
required |
measurement_start_date
|
date
|
The date that the calibration measurement started. |
required |
measurement_stop_date
|
date
|
The date that the calibration measurement stopped. |
required |
issuing_laboratory
|
IssuingLaboratory
|
Information about the laboratory that issued the calibration report. |
IssuingLaboratory()
|
technical_procedure
|
str
|
The technical procedure(s) that was(were) followed to perform the calibration. |
''
|
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 report is valid. |
Conditions()
|
acceptance_criteria
|
AcceptanceCriteria
|
Acceptance criteria for the calibration report. |
AcceptanceCriteria()
|
cvd_equations
|
tuple[CVDEquation, ...]
|
Calibration data is expressed as Callendar-Van Dusen equations. |
()
|
deserialisers
|
tuple[Deserialised, ...]
|
Calibration data is stored in serialised formats and deserialised. |
()
|
equations
|
tuple[Equation, ...]
|
Calibration data is expressed as equations. |
()
|
files
|
tuple[File, ...]
|
Calibration data is stored in other files (not in the equipment register). |
()
|
tables
|
tuple[Table, ...]
|
Calibration data is stored as Comma Separated Values (CSV) tables. |
()
|
acceptance_criteria
class-attribute
instance-attribute
¤
acceptance_criteria: AcceptanceCriteria = field(
default_factory=AcceptanceCriteria
)
Acceptance criteria for the calibration report.
checked_by
class-attribute
instance-attribute
¤
checked_by: str = ''
The name of the person who checked the information in the <report> element.
checked_date
class-attribute
instance-attribute
¤
checked_date: date | None = None
The date that the information in the <report> element was last checked.
conditions
class-attribute
instance-attribute
¤
conditions: Conditions = field(default_factory=Conditions)
The conditions under which the report is valid.
cvd_equation
property
¤
cvd_equation: CVDEquation
Returns the first item in the cvd_equations tuple.
Raises IndexError if the report does not contain Callendar-Van Dusen equations.
cvd_equations
class-attribute
instance-attribute
¤
cvd_equations: tuple[CVDEquation, ...] = ()
Calibration data is expressed as Callendar-Van Dusen equations.
deserialised
property
¤
deserialised: Deserialised
Returns the first item in the deserialisers tuple.
Raises IndexError if the report does not contain serialised data.
deserialisers
class-attribute
instance-attribute
¤
deserialisers: tuple[Deserialised, ...] = ()
Calibration 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 <report> element in the register.
equation
property
¤
equation: Equation
Returns the first item in the equations tuple.
Raises IndexError if the report does not contain equations.
equations
class-attribute
instance-attribute
¤
Calibration data is expressed as equations.
file
property
¤
file: File
Returns the first item in the files tuple.
Raises IndexError if the report does not contain files.
files
class-attribute
instance-attribute
¤
Calibration data is stored in other files (not in the equipment register).
issuing_laboratory
class-attribute
instance-attribute
¤
issuing_laboratory: IssuingLaboratory = field(default_factory=IssuingLaboratory)
Information about the laboratory that issued the calibration report.
measurement_start_date
instance-attribute
¤
measurement_start_date: date
The date that the calibration measurement started.
measurement_stop_date
instance-attribute
¤
measurement_stop_date: date
The date that the calibration measurement stopped.
table
property
¤
table: Table
Returns the first item in the tables tuple.
Raises IndexError if the report does not contain tables.
tables
class-attribute
instance-attribute
¤
Calibration data is stored as Comma Separated Values (CSV) tables.
technical_procedure
class-attribute
instance-attribute
¤
technical_procedure: str = ''
The technical procedure(s) that was(were) followed to perform the calibration.
from_xml
classmethod
¤
Convert an XML element into a Report instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element
|
Element[str]
|
A report XML element from an equipment register. |
required |
Returns:
| Type | Description |
|---|---|
Report
|
The Report instance. |
Source code in src/msl/equipment/schema.py
1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 | |
to_xml
¤
Convert the Report class into an XML element.
Returns:
| Type | Description |
|---|---|
Element[str]
|
The Report as an XML element. |
Source code in src/msl/equipment/schema.py
1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 | |
IssuingLaboratory
dataclass
¤
Information about the laboratory that issued a calibration report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lab
|
str
|
The name of the laboratory that issued the calibration report. |
''
|
person
|
str
|
The name of a person at the |
''
|
lab
class-attribute
instance-attribute
¤
lab: str = ''
The name of the laboratory that issued the calibration report.
person
class-attribute
instance-attribute
¤
person: str = ''
The name of a person at the laboratory that authorised the report.
from_xml
classmethod
¤
from_xml(element: Element[str]) -> IssuingLaboratory
Convert an XML element into a IssuingLaboratory instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element
|
Element[str]
|
An |
required |
Returns:
| Type | Description |
|---|---|
IssuingLaboratory
|
The IssuingLaboratory instance. |
Source code in src/msl/equipment/schema.py
1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 | |
to_xml
¤
Convert the IssuingLaboratory class into an XML element.
Returns:
| Type | Description |
|---|---|
Element[str]
|
The IssuingLaboratory as an XML element. |
Source code in src/msl/equipment/schema.py
1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 | |