swimstroke 0.1.3__py3-none-any.whl → 0.1.5__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.
swimstroke/helpers.py CHANGED
@@ -154,12 +154,11 @@ def populate_heats(event):
154
154
  return event
155
155
 
156
156
  def get_lanes(meetinfo):
157
- if 'teams' in meetinfo:
157
+ if 'entries' in meetinfo:
158
158
  lanes = []
159
- for team in meetinfo['teams']:
160
- for entry in team['entries']:
161
- if entry['lane'] is not None and entry['lane'] not in lanes:
162
- lanes.append(entry['lane'])
159
+ for entry in meetinfo['entries']:
160
+ if entry['lane'] is not None and entry['lane'] not in lanes:
161
+ lanes.append(entry['lane'])
163
162
  lanes.sort()
164
163
  return lanes
165
164
  else:
swimstroke/hy3.py CHANGED
@@ -136,10 +136,14 @@ def load(fo):
136
136
  # good way to figure out which is what
137
137
  seed_time = record[42:50].decode('latin').strip()
138
138
  #print("possible seed time",seed_time)
139
- seed_time_ms = int(seed_time.replace('.',''),10)*10
140
- if seed_time_ms == 0:
141
- seed_time_ms = None
139
+ if seed_time and seed_time != "NT":
140
+ seed_time_ms = int(seed_time.replace('.',''),10)*10
141
+ if seed_time_ms == 0:
142
+ seed_time_ms = None
143
+ seed_time = None
144
+ else:
142
145
  seed_time = None
146
+ seed_time_ms = None
143
147
 
144
148
  cur_entry = {
145
149
  "event_index":event_num_str,
swimstroke/yaml.py CHANGED
@@ -10,14 +10,6 @@ def load(fo):
10
10
  if fieldname in ydata:
11
11
  meetinfo[fieldname] = str(ydata[fieldname]).strip()
12
12
 
13
-
14
-
15
- #teams = {}
16
- #swimmers_by_team_and_name = {}
17
-
18
- #for team in ydata['teams']:
19
- # teams[team['short_name']] = {"short_name":team['short_name'],"name":team['name'],"entries":[],"swimmers":[]}
20
-
21
13
  if 'events' in ydata:
22
14
  meetinfo['events'] = []
23
15
  for event in ydata['events']:
@@ -104,6 +96,8 @@ def load(fo):
104
96
 
105
97
  eldata['time_ms'] = swimtime_strtoms(e['time']) if 'time' in e else int(e['time_ms'])
106
98
 
99
+ # at the moment, we don't support loading entries from YAML, but we could. this was old code below
100
+ # that was unused and didn't get updated to the new schema
107
101
  """ for entry in event['entries']:
108
102
  swimmer_codes = []
109
103
  for swimmer in entry['swimmers']:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: swimstroke
3
- Version: 0.1.3
3
+ Version: 0.1.5
4
4
  License-File: LICENSE
5
5
  Requires-Dist: PyYAML >=6.0.1
6
6
 
@@ -0,0 +1,14 @@
1
+ swimstroke/__init__.py,sha256=HyRSzghNy1qExTdycvl7MsVvwQ7vi3FtqUQbobhepRo,78
2
+ swimstroke/__main__.py,sha256=d0ln2BGuqyjDIB2OOmZEA4lOjPAjHARuzuo1_WomNZU,1212
3
+ swimstroke/ev3.py,sha256=Ma1TsRQAop7wQNoeRBdKBZuQyuRpq08OYzdS7dr_llI,3579
4
+ swimstroke/helpers.py,sha256=v74U9SnSVhrvYdJLZO0kqZcPJHruKo8eiJaZRtXh0uc,6478
5
+ swimstroke/hy3.py,sha256=_nQfsv94TEGrQWQN1IeusWo13AfhJih0xZyQuYgWI2Y,15667
6
+ swimstroke/scb.py,sha256=ow-T4Ou6jC7PQdphARncM7T0hIzj20prD-C9JVBU6Y8,4307
7
+ swimstroke/sd3.py,sha256=JMYeTOk66YJInRReB3KMFyB1JKnX69sCHdC2_Ey2ypg,47
8
+ swimstroke/util.py,sha256=5Xfvfngv9T47U_7gddiPw80pHtTAlhomW40JUGDS2iI,1244
9
+ swimstroke/yaml.py,sha256=4qPS58tBF5u2VOn59o-Z2q5xzfpBOw_APZ2ybMrrxKw,6855
10
+ swimstroke-0.1.5.dist-info/LICENSE,sha256=ua_EyrQ3shMEJAhfgGjSeK_mFf6AIT-QiFG2lQfsntY,1103
11
+ swimstroke-0.1.5.dist-info/METADATA,sha256=RQEpoOMg2wk4z4r22Fhst3314HLCSDSqpn8kQvOgR6k,107
12
+ swimstroke-0.1.5.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
13
+ swimstroke-0.1.5.dist-info/top_level.txt,sha256=C15CTf7t6T4k83ycljKbwYVziBgz5vqOBEYdK8Y6FfY,11
14
+ swimstroke-0.1.5.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (70.1.1)
2
+ Generator: setuptools (75.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,14 +0,0 @@
1
- swimstroke/__init__.py,sha256=HyRSzghNy1qExTdycvl7MsVvwQ7vi3FtqUQbobhepRo,78
2
- swimstroke/__main__.py,sha256=d0ln2BGuqyjDIB2OOmZEA4lOjPAjHARuzuo1_WomNZU,1212
3
- swimstroke/ev3.py,sha256=Ma1TsRQAop7wQNoeRBdKBZuQyuRpq08OYzdS7dr_llI,3579
4
- swimstroke/helpers.py,sha256=QA_GTUqVM7mYa_-n33e2AymBv76faV9_IGsNsv78GPw,6523
5
- swimstroke/hy3.py,sha256=KwhRFHS0T81NrvWF22ek9kdiCWbN4bHJViPqVIV4HO8,15500
6
- swimstroke/scb.py,sha256=ow-T4Ou6jC7PQdphARncM7T0hIzj20prD-C9JVBU6Y8,4307
7
- swimstroke/sd3.py,sha256=JMYeTOk66YJInRReB3KMFyB1JKnX69sCHdC2_Ey2ypg,47
8
- swimstroke/util.py,sha256=5Xfvfngv9T47U_7gddiPw80pHtTAlhomW40JUGDS2iI,1244
9
- swimstroke/yaml.py,sha256=KEZcsiMsq7TtWyxzZ06dzSm-oXJbipfKOybNNPmK8xE,6900
10
- swimstroke-0.1.3.dist-info/LICENSE,sha256=ua_EyrQ3shMEJAhfgGjSeK_mFf6AIT-QiFG2lQfsntY,1103
11
- swimstroke-0.1.3.dist-info/METADATA,sha256=66Ae9c2E2yBYG4tbRiEGpy6vhDgOmY1p2bjASjuqvA8,107
12
- swimstroke-0.1.3.dist-info/WHEEL,sha256=mguMlWGMX-VHnMpKOjjQidIo1ssRlCFu4a4mBpz1s2M,91
13
- swimstroke-0.1.3.dist-info/top_level.txt,sha256=C15CTf7t6T4k83ycljKbwYVziBgz5vqOBEYdK8Y6FfY,11
14
- swimstroke-0.1.3.dist-info/RECORD,,