tunas 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tunas/__init__.py +110 -0
- tunas/_data/__init__.py +0 -0
- tunas/_data/sdif-v3.txt +2698 -0
- tunas/_data/standards-2025-2028.json +24032 -0
- tunas/_parser/__init__.py +0 -0
- tunas/_parser/diagnostics.py +87 -0
- tunas/_parser/fields.py +170 -0
- tunas/_parser/handlers.py +1421 -0
- tunas/_parser/ids.py +15 -0
- tunas/_parser/names.py +23 -0
- tunas/_parser/state.py +42 -0
- tunas/_version.py +1 -0
- tunas/enums.py +267 -0
- tunas/event.py +201 -0
- tunas/exceptions.py +35 -0
- tunas/geography.py +320 -0
- tunas/models.py +397 -0
- tunas/parser.py +62 -0
- tunas/py.typed +0 -0
- tunas/standards.py +104 -0
- tunas/time.py +90 -0
- tunas-0.1.0.dist-info/METADATA +102 -0
- tunas-0.1.0.dist-info/RECORD +25 -0
- tunas-0.1.0.dist-info/WHEEL +4 -0
- tunas-0.1.0.dist-info/licenses/LICENSE +21 -0
tunas/__init__.py
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"""tunas — USA Swimming meet result (.cl2 / SDIF v3) parser library.
|
|
2
|
+
|
|
3
|
+
Parses Hy-Tek SDIF v3 ``.cl2`` files into a clean, well-typed domain model and
|
|
4
|
+
bundles USA Swimming motivational time standards for offline lookups.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from tunas._version import __version__
|
|
10
|
+
from tunas.enums import (
|
|
11
|
+
Affiliation,
|
|
12
|
+
AttachStatus,
|
|
13
|
+
Citizenship,
|
|
14
|
+
Course,
|
|
15
|
+
Ethnicity,
|
|
16
|
+
EventTimeClass,
|
|
17
|
+
FileType,
|
|
18
|
+
MeetType,
|
|
19
|
+
MemberStatus,
|
|
20
|
+
Organization,
|
|
21
|
+
Region,
|
|
22
|
+
RelayLegOrder,
|
|
23
|
+
ResultStatus,
|
|
24
|
+
Season,
|
|
25
|
+
Session,
|
|
26
|
+
Sex,
|
|
27
|
+
SplitType,
|
|
28
|
+
Stroke,
|
|
29
|
+
)
|
|
30
|
+
from tunas.event import Event
|
|
31
|
+
from tunas.exceptions import ParseError, StandardsError, TunasError
|
|
32
|
+
from tunas.geography import LSC, Country, State
|
|
33
|
+
from tunas.models import (
|
|
34
|
+
Club,
|
|
35
|
+
ClubEntryCounts,
|
|
36
|
+
IndividualSwim,
|
|
37
|
+
Meet,
|
|
38
|
+
MeetHost,
|
|
39
|
+
MeetResult,
|
|
40
|
+
Relay,
|
|
41
|
+
RelaySwim,
|
|
42
|
+
SourceFile,
|
|
43
|
+
Split,
|
|
44
|
+
Swim,
|
|
45
|
+
Swimmer,
|
|
46
|
+
SwimmerContact,
|
|
47
|
+
SwimmerRegistration,
|
|
48
|
+
)
|
|
49
|
+
from tunas.parser import IssueKind, ParseReport, ParseWarning, Severity, read_cl2
|
|
50
|
+
from tunas.standards import TimeStandard, all_qualified, qualifies_for, standard_time
|
|
51
|
+
from tunas.time import Time
|
|
52
|
+
|
|
53
|
+
__all__ = [
|
|
54
|
+
"__version__",
|
|
55
|
+
# parsing
|
|
56
|
+
"read_cl2",
|
|
57
|
+
"ParseReport",
|
|
58
|
+
"ParseWarning",
|
|
59
|
+
"Severity",
|
|
60
|
+
"IssueKind",
|
|
61
|
+
# exceptions
|
|
62
|
+
"TunasError",
|
|
63
|
+
"ParseError",
|
|
64
|
+
"StandardsError",
|
|
65
|
+
# models
|
|
66
|
+
"Meet",
|
|
67
|
+
"Club",
|
|
68
|
+
"Swimmer",
|
|
69
|
+
"Swim",
|
|
70
|
+
"MeetResult",
|
|
71
|
+
"IndividualSwim",
|
|
72
|
+
"Relay",
|
|
73
|
+
"RelaySwim",
|
|
74
|
+
"Split",
|
|
75
|
+
"SwimmerContact",
|
|
76
|
+
"SwimmerRegistration",
|
|
77
|
+
"MeetHost",
|
|
78
|
+
"SourceFile",
|
|
79
|
+
"ClubEntryCounts",
|
|
80
|
+
# value types
|
|
81
|
+
"Time",
|
|
82
|
+
"Event",
|
|
83
|
+
# enums
|
|
84
|
+
"Sex",
|
|
85
|
+
"Stroke",
|
|
86
|
+
"Course",
|
|
87
|
+
"Session",
|
|
88
|
+
"AttachStatus",
|
|
89
|
+
"MeetType",
|
|
90
|
+
"Region",
|
|
91
|
+
"EventTimeClass",
|
|
92
|
+
"Organization",
|
|
93
|
+
"FileType",
|
|
94
|
+
"SplitType",
|
|
95
|
+
"ResultStatus",
|
|
96
|
+
"RelayLegOrder",
|
|
97
|
+
"MemberStatus",
|
|
98
|
+
"Season",
|
|
99
|
+
"Ethnicity",
|
|
100
|
+
"Affiliation",
|
|
101
|
+
"Citizenship",
|
|
102
|
+
"LSC",
|
|
103
|
+
"State",
|
|
104
|
+
"Country",
|
|
105
|
+
# standards
|
|
106
|
+
"TimeStandard",
|
|
107
|
+
"qualifies_for",
|
|
108
|
+
"standard_time",
|
|
109
|
+
"all_qualified",
|
|
110
|
+
]
|
tunas/_data/__init__.py
ADDED
|
File without changes
|