Skip to content

feat: resolve issues #158, #160, #163, #164#169

Merged
BigBen-7 merged 1 commit intoLead-Studios:mainfrom
TomikeDS:feat/issues-158-160-163-164
Mar 26, 2026
Merged

feat: resolve issues #158, #160, #163, #164#169
BigBen-7 merged 1 commit intoLead-Studios:mainfrom
TomikeDS:feat/issues-158-160-163-164

Conversation

@TomikeDS
Copy link
Copy Markdown
Contributor

Description

Closes #164
closes #158
closes #160
closes #163


Checklist

  • This PR closes an open issue (linked above)
  • Tests added or updated for all changed behaviour
  • Coverage is maintained or improved
  • Docs updated if endpoints or config options changed (docs/api-reference.md, docs/etl-pipeline.md)
  • black, isort, and mypy pass locally
  • CI is green

…#163, Lead-Studios#164

- Lead-Studios#164: Centralise DB engine into src/db.py singleton with pool_size=5,
  max_overflow=10, pool_timeout=30, pool_recycle=1800; add POOL_SIZE and
  POOL_MAX_OVERFLOW env vars; replace all scattered create_engine calls in
  analytics/models.py, etl/__init__.py, and report_service.py; add
  GET /health/db endpoint returning pool stats.

- Lead-Studios#158: Extend SearchEventsRequest with min_price, max_price, max_capacity
  fields; update extract_keywords to detect price-intent NLP signals (free,
  cheap, affordable → max_price; premium, VIP → min_price); update
  filter_events_by_keywords to apply price and capacity filters with explicit
  params overriding NLP hints.

- Lead-Studios#160: Add AnalyticsService.get_trending_events(limit, hours) querying
  ticket_scans by scan velocity in the last 24 h, joined with
  event_sales_summary for names; 10-minute in-memory cache; expose via
  GET /events/trending?limit=10.

- Lead-Studios#163: Add diff_etl_output(event_rows, daily_rows) helper in etl/__init__.py
  comparing transformed rows against current Postgres data and returning
  would_insert/would_update/unchanged counts; expose via admin-only
  GET /etl/diff with async 202 fallback for slow extracts (>5 s).

- Tests: test_db_pooling.py, test_search_filters.py, test_trending_events.py,
  test_etl_diff.py covering all new features.
@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 26, 2026

@TomikeDS Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@BigBen-7 BigBen-7 merged commit a79cd27 into Lead-Studios:main Mar 26, 2026
4 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants