hockey-blast-common-lib 0.1.55__py3-none-any.whl → 0.1.56__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.
@@ -104,14 +104,18 @@ class Goal(db.Model):
104
104
  class Human(db.Model):
105
105
  __tablename__ = 'humans'
106
106
  id = db.Column(db.Integer, primary_key=True)
107
- first_name = db.Column(db.String(100))
108
- middle_name = db.Column(db.String(100))
109
- last_name = db.Column(db.String(100))
107
+ # All name components now declared non-nullable at the ORM level. Ensure data cleanup
108
+ # (convert existing NULLs to '') BEFORE applying a DB migration that enforces NOT NULL.
109
+ # middle_name and suffix may be logically "empty" but must not be NULL; use '' for absence.
110
+ first_name = db.Column(db.String(100), nullable=False, default='')
111
+ middle_name = db.Column(db.String(100), nullable=False, default='')
112
+ last_name = db.Column(db.String(100), nullable=False, default='')
113
+ suffix = db.Column(db.String(100), nullable=False, default='')
110
114
  first_date = db.Column(db.Date)
111
115
  last_date = db.Column(db.Date)
112
116
  skater_skill_value = db.Column(db.Float, nullable=True)
113
117
  __table_args__ = (
114
- db.UniqueConstraint('first_name', 'middle_name', 'last_name', name='_human_name_uc'),
118
+ db.UniqueConstraint('first_name', 'middle_name', 'last_name', 'suffix', name='_human_name_uc'),
115
119
  )
116
120
 
117
121
  class HumanAlias(db.Model):
@@ -121,10 +125,11 @@ class HumanAlias(db.Model):
121
125
  first_name = db.Column(db.String(100))
122
126
  middle_name = db.Column(db.String(100))
123
127
  last_name = db.Column(db.String(100))
128
+ suffix = db.Column(db.String(100))
124
129
  first_date = db.Column(db.Date)
125
130
  last_date = db.Column(db.Date)
126
131
  __table_args__ = (
127
- db.UniqueConstraint('human_id', 'first_name', 'middle_name', 'last_name', name='_human_alias_uc'),
132
+ db.UniqueConstraint('human_id', 'first_name', 'middle_name', 'last_name', 'suffix', name='_human_alias_uc'),
128
133
  )
129
134
 
130
135
  class HumanInTTS(db.Model):
@@ -15,7 +15,9 @@ not_human_names = [
15
15
  (None, "Unknown", None),
16
16
  ("Not", None , None),
17
17
  (None , None, "Goalie"),
18
- ("Unassigned",None , None)
18
+ ("Unassigned",None , None),
19
+ # Critical addition - primary cause of 93.4% of roster insertion errors
20
+ ("Not", "Signed", "In")
19
21
  ]
20
22
 
21
23
  def parse_args():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hockey-blast-common-lib
3
- Version: 0.1.55
3
+ Version: 0.1.56
4
4
  Summary: Common library for shared functionality and DB models
5
5
  Author: Pavel Kletskov
6
6
  Author-email: kletskov@gmail.com
@@ -10,9 +10,9 @@ hockey_blast_common_lib/assign_skater_skill.py,sha256=Asq6iRMPsCMDnvuNSd-M3s4Gee
10
10
  hockey_blast_common_lib/db_connection.py,sha256=HvPxDvOj7j5H85RfslGvHVNevfg7mKCd0syJ6NX21mU,1890
11
11
  hockey_blast_common_lib/dump_sample_db.sh,sha256=MY3lnzTXBoWd76-ZlZr9nWsKMEVgyRsUn-LZ2d1JWZs,810
12
12
  hockey_blast_common_lib/h2h_models.py,sha256=0st4xoJO0U6ONfx3BV03BQvHjZE31e_PqZfphAJMoSU,7968
13
- hockey_blast_common_lib/hockey_blast_sample_backup.sql.gz,sha256=hWju95cPNMukwns66g0CTK3XUFShrMDN-FzRjpzqLPQ,4648902
14
- hockey_blast_common_lib/models.py,sha256=NBF0u4wTAwxFe5UaUObFo-L9Az2jLPXbKejtcJRuGQ0,18440
15
- hockey_blast_common_lib/options.py,sha256=alOXCYF7Jmw4Z97ae6tAsDIS0VNideV_-GKJ4-v4Pjo,1689
13
+ hockey_blast_common_lib/hockey_blast_sample_backup.sql.gz,sha256=PAgRoxxkhHCjF4FzEbjFX84hGJyNy8txMWCnF4Eiaac,4648905
14
+ hockey_blast_common_lib/models.py,sha256=JMwQE1QgNkuWuKakxuHIlbEHfk8Z7GAYktCppCWA6LE,18928
15
+ hockey_blast_common_lib/options.py,sha256=rQaLRYYcaxXrpZoXfUpmvsahC23oVGPEOzEpqtthbIQ,1794
16
16
  hockey_blast_common_lib/progress_utils.py,sha256=H_zRFOsb2qQQpGw56wJghZ1nUe_m6zqGeR9hZ33Y1Uo,3229
17
17
  hockey_blast_common_lib/restore_sample_db.sh,sha256=7W3lzRZeu9zXIu1Bvtnaw8EHc1ulHmFM4mMh86oUQJo,2205
18
18
  hockey_blast_common_lib/skills_in_divisions.py,sha256=m-UEwMwn1KM7wOYvDstgsOEeH57M9V6yrkBoghzGYKE,7005
@@ -21,7 +21,7 @@ hockey_blast_common_lib/stats_models.py,sha256=uBNQSqCMXurzS-tD13OoV5WqurYYGHMZM
21
21
  hockey_blast_common_lib/stats_utils.py,sha256=DXsPO4jw8XsdRUN46TGF_IiBAfz3GCIVBswCGp5ELDk,284
22
22
  hockey_blast_common_lib/utils.py,sha256=PduHp6HoI4sfr5HvJfQAaz7170dy5kTFVdIfWvBR-Jg,5874
23
23
  hockey_blast_common_lib/wsgi.py,sha256=y3NxoJfWjdzX3iP7RGvDEer6zcnPyCanpqSgW1BlXgg,779
24
- hockey_blast_common_lib-0.1.55.dist-info/METADATA,sha256=fl85rh700VSbNViKgFuvQFhsvJbJUq3BwYlzQeTzko8,318
25
- hockey_blast_common_lib-0.1.55.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
26
- hockey_blast_common_lib-0.1.55.dist-info/top_level.txt,sha256=wIR4LIkE40npoA2QlOdfCYlgFeGbsHR8Z6r0h46Vtgc,24
27
- hockey_blast_common_lib-0.1.55.dist-info/RECORD,,
24
+ hockey_blast_common_lib-0.1.56.dist-info/METADATA,sha256=mB63Gvv1wgCt1hJAl0lk-97pqp5vgCOCQkFFk5_7SVs,318
25
+ hockey_blast_common_lib-0.1.56.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
26
+ hockey_blast_common_lib-0.1.56.dist-info/top_level.txt,sha256=wIR4LIkE40npoA2QlOdfCYlgFeGbsHR8Z6r0h46Vtgc,24
27
+ hockey_blast_common_lib-0.1.56.dist-info/RECORD,,