Coverage for C: \ Users \ peaco \ OneDrive \ Documents \ GitHub \ mt_metadata \ mt_metadata \ common \ fdsn.py: 100%
10 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 Field
8from mt_metadata.base import MetadataBase
11# =====================================================
12class Fdsn(MetadataBase):
13 id: Annotated[
14 str | None,
15 Field(
16 default=None,
17 description="Given FDSN archive ID name.",
18 alias=None,
19 pattern="^[a-zA-Z0-9._-]*$",
20 json_schema_extra={
21 "units": None,
22 "required": False,
23 "examples": ["MT001"],
24 },
25 ),
26 ]
28 network: Annotated[
29 str | None,
30 Field(
31 default=None,
32 description="Given two character FDSN archive network code. Needs to be 2 alpha numeric characters.",
33 alias=None,
34 pattern="^[a-zA-Z0-9]{2}$",
35 json_schema_extra={
36 "units": None,
37 "required": False,
38 "examples": ["EM"],
39 },
40 ),
41 ]
43 channel_code: Annotated[
44 str | None,
45 Field(
46 default=None,
47 description="Three character FDSN channel code. http://docs.fdsn.org/projects/source-identifiers/en/v1.0/channel-codes.html",
48 alias=None,
49 pattern="^[a-zA-Z0-9]{3}*$",
50 json_schema_extra={
51 "units": None,
52 "required": False,
53 "examples": ["LQN"],
54 },
55 ),
56 ]
58 new_epoch: Annotated[
59 bool | None,
60 Field(
61 default=None,
62 description="Boolean telling if a new epoch needs to be created or not.",
63 alias=None,
64 json_schema_extra={
65 "units": None,
66 "required": False,
67 "examples": ["False"],
68 },
69 ),
70 ]
72 alternate_code: Annotated[
73 str | None,
74 Field(
75 default=None,
76 description="Alternate Code",
77 alias=None,
78 json_schema_extra={
79 "units": None,
80 "required": False,
81 "examples": [
82 "_INT-NON_FDSN",
83 ".UNRESTRICTED",
84 "_US-ALL",
85 "_US-MT",
86 "_US-MT-TA",
87 ],
88 },
89 ),
90 ]
92 alternate_network_code: Annotated[
93 str | None,
94 Field(
95 default=None,
96 description="Alternate Network Code",
97 alias=None,
98 json_schema_extra={
99 "units": None,
100 "required": False,
101 "examples": [
102 "_INT-NON_FDSN",
103 ".UNRESTRICTED",
104 "_US-ALL",
105 "_US-MT",
106 "_US-MT-TA",
107 ],
108 },
109 ),
110 ]