hockey-blast-common-lib 0.1.58__tar.gz → 0.1.60__tar.gz
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.
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/PKG-INFO +1 -1
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/hockey_blast_common_lib/aggregate_scorekeeper_stats.py +23 -14
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/hockey_blast_common_lib/hockey_blast_sample_backup.sql.gz +0 -0
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/hockey_blast_common_lib/models.py +13 -0
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/hockey_blast_common_lib.egg-info/PKG-INFO +1 -1
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/setup.py +1 -1
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/MANIFEST.in +0 -0
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/README.md +0 -0
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/hockey_blast_common_lib/__init__.py +0 -0
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/hockey_blast_common_lib/aggregate_all_stats.py +0 -0
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/hockey_blast_common_lib/aggregate_goalie_stats.py +0 -0
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/hockey_blast_common_lib/aggregate_h2h_stats.py +0 -0
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/hockey_blast_common_lib/aggregate_human_stats.py +0 -0
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/hockey_blast_common_lib/aggregate_referee_stats.py +0 -0
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/hockey_blast_common_lib/aggregate_s2s_stats.py +0 -0
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/hockey_blast_common_lib/aggregate_skater_stats.py +0 -0
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/hockey_blast_common_lib/assign_skater_skill.py +0 -0
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/hockey_blast_common_lib/db_connection.py +0 -0
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/hockey_blast_common_lib/dump_sample_db.sh +0 -0
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/hockey_blast_common_lib/h2h_models.py +0 -0
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/hockey_blast_common_lib/options.py +0 -0
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/hockey_blast_common_lib/progress_utils.py +0 -0
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/hockey_blast_common_lib/restore_sample_db.sh +0 -0
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/hockey_blast_common_lib/skills_in_divisions.py +0 -0
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/hockey_blast_common_lib/skills_propagation.py +0 -0
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/hockey_blast_common_lib/stats_models.py +0 -0
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/hockey_blast_common_lib/stats_utils.py +0 -0
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/hockey_blast_common_lib/utils.py +0 -0
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/hockey_blast_common_lib/wsgi.py +0 -0
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/hockey_blast_common_lib.egg-info/SOURCES.txt +0 -0
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/hockey_blast_common_lib.egg-info/dependency_links.txt +0 -0
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/hockey_blast_common_lib.egg-info/requires.txt +0 -0
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/hockey_blast_common_lib.egg-info/top_level.txt +0 -0
- {hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/setup.cfg +0 -0
@@ -203,20 +203,29 @@ def run_aggregate_scorekeeper_stats():
|
|
203
203
|
session = create_session("boss")
|
204
204
|
human_id_to_debug = None
|
205
205
|
|
206
|
-
#
|
207
|
-
#
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
206
|
+
# Get all org_id present in the Organization table (following goalie stats pattern)
|
207
|
+
# Individual org calls will be skipped by early exit, only ALL_ORGS_ID will process
|
208
|
+
from hockey_blast_common_lib.models import Organization
|
209
|
+
org_ids = session.query(Organization.id).all()
|
210
|
+
org_ids = [org_id[0] for org_id in org_ids]
|
211
|
+
|
212
|
+
# Add ALL_ORGS_ID to the list so it gets processed
|
213
|
+
org_ids.append(ALL_ORGS_ID)
|
214
|
+
|
215
|
+
for org_id in org_ids:
|
216
|
+
if human_id_to_debug is None:
|
217
|
+
org_name = "All Organizations" if org_id == ALL_ORGS_ID else session.query(Organization.organization_name).filter(Organization.id == org_id).scalar() or f"org_id {org_id}"
|
218
|
+
org_progress = create_progress_tracker(3, f"Processing scorekeeper stats for {org_name}")
|
219
|
+
aggregate_scorekeeper_stats(session, aggregation_type='org', aggregation_id=org_id, names_to_filter_out=not_human_names)
|
220
|
+
org_progress.update(1)
|
221
|
+
aggregate_scorekeeper_stats(session, aggregation_type='org', aggregation_id=org_id, names_to_filter_out=not_human_names, aggregation_window='Weekly')
|
222
|
+
org_progress.update(2)
|
223
|
+
aggregate_scorekeeper_stats(session, aggregation_type='org', aggregation_id=org_id, names_to_filter_out=not_human_names, aggregation_window='Daily')
|
224
|
+
org_progress.update(3)
|
225
|
+
else:
|
226
|
+
aggregate_scorekeeper_stats(session, aggregation_type='org', aggregation_id=org_id, names_to_filter_out=not_human_names)
|
227
|
+
aggregate_scorekeeper_stats(session, aggregation_type='org', aggregation_id=org_id, names_to_filter_out=not_human_names, aggregation_window='Weekly')
|
228
|
+
aggregate_scorekeeper_stats(session, aggregation_type='org', aggregation_id=org_id, names_to_filter_out=not_human_names, aggregation_window='Daily')
|
220
229
|
|
221
230
|
if __name__ == "__main__":
|
222
231
|
run_aggregate_scorekeeper_stats()
|
Binary file
|
{hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/hockey_blast_common_lib/models.py
RENAMED
@@ -152,6 +152,19 @@ class HumansInLevels(db.Model):
|
|
152
152
|
db.UniqueConstraint('levels_monthly_id', 'human_id', name='_levels_monthly_human_uc'),
|
153
153
|
)
|
154
154
|
|
155
|
+
class HumanPrivacyOptOut(db.Model):
|
156
|
+
__tablename__ = 'human_privacy_opt_outs'
|
157
|
+
id = db.Column(db.Integer, primary_key=True)
|
158
|
+
first_name = db.Column(db.String(100), nullable=False)
|
159
|
+
middle_name = db.Column(db.String(100), nullable=False, default='')
|
160
|
+
last_name = db.Column(db.String(100), nullable=False)
|
161
|
+
suffix = db.Column(db.String(100), nullable=False, default='')
|
162
|
+
opt_out_date = db.Column(db.DateTime, nullable=False, default=db.func.current_timestamp())
|
163
|
+
notes = db.Column(db.Text, nullable=True)
|
164
|
+
__table_args__ = (
|
165
|
+
db.UniqueConstraint('first_name', 'middle_name', 'last_name', 'suffix', name='_privacy_optout_name_uc'),
|
166
|
+
)
|
167
|
+
|
155
168
|
class League(db.Model):
|
156
169
|
__tablename__ = 'leagues'
|
157
170
|
id = db.Column(db.Integer, primary_key=True)
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
2
2
|
|
3
3
|
setup(
|
4
4
|
name='hockey-blast-common-lib', # The name of your package
|
5
|
-
version='0.1.
|
5
|
+
version='0.1.60',
|
6
6
|
description='Common library for shared functionality and DB models',
|
7
7
|
author='Pavel Kletskov',
|
8
8
|
author_email='kletskov@gmail.com',
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/hockey_blast_common_lib/options.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/hockey_blast_common_lib/utils.py
RENAMED
File without changes
|
{hockey_blast_common_lib-0.1.58 → hockey_blast_common_lib-0.1.60}/hockey_blast_common_lib/wsgi.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|