yeref 0.24.43__tar.gz → 0.24.45__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yeref
3
- Version: 0.24.43
3
+ Version: 0.24.45
4
4
  Summary: desc-f
5
5
  Author: john smith
6
6
  Dynamic: author
@@ -2,7 +2,7 @@ from setuptools import setup
2
2
 
3
3
  setup(
4
4
  name='yeref',
5
- version='0.24.43',
5
+ version='0.24.45',
6
6
  description='desc-f',
7
7
  author='john smith',
8
8
  packages=['yeref'],
@@ -15926,7 +15926,7 @@ async def upd_user_data(ENT_TID, data, web_app_init_data, PROJECT_USERNAME, BASE
15926
15926
 
15927
15927
 
15928
15928
  # region unit ecomonics
15929
- async def return_view_metrics(bot, PROJECT_USERNAME, EXTRA_D, BASE_P):
15929
+ async def return_activity_metrics(bot, PROJECT_USERNAME, EXTRA_D, BASE_P):
15930
15930
  try:
15931
15931
  schema_name = "USER"
15932
15932
  if PROJECT_USERNAME == 'FereyBotBot':
@@ -15953,6 +15953,7 @@ async def return_view_metrics(bot, PROJECT_USERNAME, EXTRA_D, BASE_P):
15953
15953
  seen_dau = set()
15954
15954
  wallets_set = set()
15955
15955
  users_set = set()
15956
+ pay_set = set()
15956
15957
 
15957
15958
  def process_user_rows(rows, schema_name=""):
15958
15959
  # months = ["2025-06", "2025-07", "2025-08", "2025-09"]
@@ -16043,6 +16044,7 @@ async def return_view_metrics(bot, PROJECT_USERNAME, EXTRA_D, BASE_P):
16043
16044
  last_key = list(last_status.keys())[0]
16044
16045
  if last_key not in ['left', 'kicked']:
16045
16046
  users_set.add(USER_TID)
16047
+ pay_set.add(USER_TID)
16046
16048
  else:
16047
16049
  users_set.add(USER_TID)
16048
16050
 
@@ -16062,16 +16064,22 @@ async def return_view_metrics(bot, PROJECT_USERNAME, EXTRA_D, BASE_P):
16062
16064
  if USER_WALLET:
16063
16065
  metrics_by_month[month_key]["wallets"] += 1
16064
16066
 
16065
- # for tx in USER_TXS:
16066
- # dt_start = tx.get("DT_START", "")
16067
- # amount = int(tx.get("AMOUNT", "0"))
16068
- # dt_tx = datetime.strptime(dt_start, "%d-%m-%Y_%H-%M-%S")
16069
- # month_key = dt_tx.strftime("%Y-%m")
16070
- # metrics_by_month[month_key]["tx"] += 1
16071
- # metrics_by_month[month_key]["tvl"] += amount
16072
-
16073
- metrics_by_month[month_key]["tx"] += len(USER_TXS)
16074
- metrics_by_month[month_key]["pay"] += len(USER_PAYMENTS)
16067
+ for it in USER_TXS:
16068
+ dt_start = it.get("DT_START", "")
16069
+ amount = int(it.get("AMOUNT", "0"))
16070
+ dt_tx = datetime.strptime(dt_start, "%d-%m-%Y_%H-%M-%S")
16071
+ month_key = dt_tx.strftime("%Y-%m")
16072
+ metrics_by_month[month_key]["tx"] += 1
16073
+
16074
+ for it in USER_PAYMENTS:
16075
+ dt_start = it.get("DT_START", "")
16076
+ amount = int(it.get("AMOUNT", "0"))
16077
+ dt_tx = datetime.strptime(dt_start, "%d-%m-%Y_%H-%M-%S")
16078
+ month_key = dt_tx.strftime("%Y-%m")
16079
+ metrics_by_month[month_key]["tx"] += 1
16080
+
16081
+ # metrics_by_month[month_key]["tx"] += len(USER_TXS)
16082
+ # metrics_by_month[month_key]["pay"] += len(USER_PAYMENTS)
16075
16083
 
16076
16084
  if USER_DT:
16077
16085
  dt_obj = datetime.strptime(USER_DT, "%d-%m-%Y_%H-%M-%S")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yeref
3
- Version: 0.24.43
3
+ Version: 0.24.45
4
4
  Summary: desc-f
5
5
  Author: john smith
6
6
  Dynamic: author
File without changes
File without changes
File without changes
File without changes
File without changes