hockey-blast-common-lib 0.1.57__py3-none-any.whl → 0.1.58__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.
@@ -52,13 +52,14 @@ def calculate_quality_score(avg_max_saves_5sec, avg_max_saves_20sec, peak_max_sa
52
52
  return round(score, 2)
53
53
 
54
54
  def aggregate_scorekeeper_stats(session, aggregation_type, aggregation_id, names_to_filter_out, aggregation_window=None):
55
+ # Only process scorekeeper stats for ALL_ORGS_ID - skip individual organizations
56
+ # This prevents redundant processing when upstream logic calls with all organization IDs
57
+ if aggregation_type == 'org' and aggregation_id != ALL_ORGS_ID:
58
+ return # Do nothing for individual organization IDs
59
+
55
60
  human_ids_to_filter = get_human_ids_by_names(session, names_to_filter_out)
56
61
 
57
62
  if aggregation_type == 'org':
58
- # Only process scorekeeper stats for ALL_ORGS_ID - skip individual organizations
59
- if aggregation_id != ALL_ORGS_ID:
60
- return # Skip processing for individual organization IDs
61
-
62
63
  aggregation_name = "All Orgs"
63
64
  filter_condition = sqlalchemy.true() # No filter for organization
64
65
  print(f"Aggregating scorekeeper stats for {aggregation_name} with window {aggregation_window}...")
@@ -162,7 +163,6 @@ def aggregate_scorekeeper_stats(session, aggregation_type, aggregation_id, names
162
163
  assign_ranks(stats_dict, 'quality_score', reverse_rank=True) # Lower is better (less problematic)
163
164
 
164
165
  # Insert aggregated stats into the appropriate table with progress output
165
- total_items = len(stats_dict)
166
166
  batch_size = 1000
167
167
  for i, (key, stat) in enumerate(stats_dict.items(), 1):
168
168
  aggregation_id, human_id = key
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hockey-blast-common-lib
3
- Version: 0.1.57
3
+ Version: 0.1.58
4
4
  Summary: Common library for shared functionality and DB models
5
5
  Author: Pavel Kletskov
6
6
  Author-email: kletskov@gmail.com
@@ -5,13 +5,13 @@ hockey_blast_common_lib/aggregate_h2h_stats.py,sha256=dC5TcJZGkpIQTiq3z40kOX6EjE
5
5
  hockey_blast_common_lib/aggregate_human_stats.py,sha256=ku42TAjUIj49822noM8fEeB8GS4vFeCCNrLupTWmqzg,26043
6
6
  hockey_blast_common_lib/aggregate_referee_stats.py,sha256=mUcTVQH9K4kwmIfgfGsnh_3AqX6Ia3RjfukkYuQas3I,13938
7
7
  hockey_blast_common_lib/aggregate_s2s_stats.py,sha256=urYN0Q06twwLO-XWGlSMVAVOTVR_D2AWdmoGsxIYHXE,6737
8
- hockey_blast_common_lib/aggregate_scorekeeper_stats.py,sha256=bE7pjSgMi35r9hX6qqsH_r38zJ0DXSr9unb1nyL2Jlw,11722
8
+ hockey_blast_common_lib/aggregate_scorekeeper_stats.py,sha256=dtjJunl5QZb97ypqdrZH9N1MUYZRJvVoswXf0kMeZYA,11794
9
9
  hockey_blast_common_lib/aggregate_skater_stats.py,sha256=pA_2pDOGcJyEywISg2ySG8gFCuoLWwqw6a3Gm2wHLyo,23302
10
10
  hockey_blast_common_lib/assign_skater_skill.py,sha256=Asq6iRMPsCMDnvuNSd-M3s4Gee4kDocP9Eznwju_9kA,2749
11
11
  hockey_blast_common_lib/db_connection.py,sha256=HvPxDvOj7j5H85RfslGvHVNevfg7mKCd0syJ6NX21mU,1890
12
12
  hockey_blast_common_lib/dump_sample_db.sh,sha256=MY3lnzTXBoWd76-ZlZr9nWsKMEVgyRsUn-LZ2d1JWZs,810
13
13
  hockey_blast_common_lib/h2h_models.py,sha256=0st4xoJO0U6ONfx3BV03BQvHjZE31e_PqZfphAJMoSU,7968
14
- hockey_blast_common_lib/hockey_blast_sample_backup.sql.gz,sha256=B7MqFsTHYSi1HTIb5jV7xuIu1TTFlvoeMu7_lC-6n9E,4648905
14
+ hockey_blast_common_lib/hockey_blast_sample_backup.sql.gz,sha256=0XOu7BnMN-skRFuOmPTTOPjCYci9UdAZ2yoIpkngtPg,4648906
15
15
  hockey_blast_common_lib/models.py,sha256=JMwQE1QgNkuWuKakxuHIlbEHfk8Z7GAYktCppCWA6LE,18928
16
16
  hockey_blast_common_lib/options.py,sha256=rQaLRYYcaxXrpZoXfUpmvsahC23oVGPEOzEpqtthbIQ,1794
17
17
  hockey_blast_common_lib/progress_utils.py,sha256=H_zRFOsb2qQQpGw56wJghZ1nUe_m6zqGeR9hZ33Y1Uo,3229
@@ -22,7 +22,7 @@ hockey_blast_common_lib/stats_models.py,sha256=64sUq_iWhNXi_b_V_1INuQ1RusKaTASju
22
22
  hockey_blast_common_lib/stats_utils.py,sha256=DXsPO4jw8XsdRUN46TGF_IiBAfz3GCIVBswCGp5ELDk,284
23
23
  hockey_blast_common_lib/utils.py,sha256=PduHp6HoI4sfr5HvJfQAaz7170dy5kTFVdIfWvBR-Jg,5874
24
24
  hockey_blast_common_lib/wsgi.py,sha256=y3NxoJfWjdzX3iP7RGvDEer6zcnPyCanpqSgW1BlXgg,779
25
- hockey_blast_common_lib-0.1.57.dist-info/METADATA,sha256=JDBDQSrlR8qwho-9RInI8J9XosXE_D5ZlISRqfyhSlU,318
26
- hockey_blast_common_lib-0.1.57.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
27
- hockey_blast_common_lib-0.1.57.dist-info/top_level.txt,sha256=wIR4LIkE40npoA2QlOdfCYlgFeGbsHR8Z6r0h46Vtgc,24
28
- hockey_blast_common_lib-0.1.57.dist-info/RECORD,,
25
+ hockey_blast_common_lib-0.1.58.dist-info/METADATA,sha256=jCXdoBpO5gfR3UZnUelcFJ8XspPWu3VcvYuCt5QlhQ4,318
26
+ hockey_blast_common_lib-0.1.58.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
27
+ hockey_blast_common_lib-0.1.58.dist-info/top_level.txt,sha256=wIR4LIkE40npoA2QlOdfCYlgFeGbsHR8Z6r0h46Vtgc,24
28
+ hockey_blast_common_lib-0.1.58.dist-info/RECORD,,