Coverage for C: \ Users \ peaco \ OneDrive \ Documents \ GitHub \ mt_metadata \ mt_metadata \ common \ instrument.py: 100%
9 statements
« prev ^ index » next coverage.py v7.13.1, created at 2026-01-10 00:11 -0800
« prev ^ index » next coverage.py v7.13.1, created at 2026-01-10 00:11 -0800
1# =====================================================
2# Imports
3# =====================================================
4from typing import Annotated
6from pydantic import AliasChoices, Field
8from mt_metadata.base import MetadataBase
11# =====================================================
12class Instrument(MetadataBase):
13 id: Annotated[
14 str | None,
15 Field(
16 default="",
17 description="Instrument ID number can be serial number or a designated ID.",
18 validation_alias=AliasChoices("id", "serial"),
19 json_schema_extra={
20 "units": None,
21 "required": False,
22 "examples": ["mt01"],
23 },
24 ),
25 ]
27 manufacturer: Annotated[
28 str | None,
29 Field(
30 default="",
31 description="Who manufactured the instrument.",
32 alias=None,
33 json_schema_extra={
34 "units": None,
35 "required": False,
36 "examples": ["mt gurus"],
37 },
38 ),
39 ]
41 type: Annotated[
42 str | None,
43 Field(
44 default="",
45 description="Description of the instrument type.",
46 alias=None,
47 json_schema_extra={
48 "units": None,
49 "required": False,
50 "examples": ["broadband 32-bit"],
51 },
52 ),
53 ]
55 model: Annotated[
56 str | None,
57 Field(
58 default=None,
59 description="Model version of the instrument.",
60 alias=None,
61 json_schema_extra={
62 "units": None,
63 "required": False,
64 "examples": ["falcon5"],
65 },
66 ),
67 ]
69 name: Annotated[
70 str | None,
71 Field(
72 default=None,
73 description="Standard marketing name of the instrument.",
74 alias=None,
75 json_schema_extra={
76 "units": None,
77 "required": False,
78 "examples": ["falcon5"],
79 },
80 ),
81 ]