yeref 0.24.56__tar.gz → 0.24.58__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.56
3
+ Version: 0.24.58
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.56',
5
+ version='0.24.58',
6
6
  description='desc-f',
7
7
  author='john smith',
8
8
  packages=['yeref'],
@@ -16175,8 +16175,6 @@ async def return_unit_metrics(bot, PROJECT_USERNAME, EXTRA_D, BASE_P):
16175
16175
 
16176
16176
  # вход в приложение
16177
16177
  user_dau_dates.add(entry_date)
16178
-
16179
- # остальные посещения
16180
16178
  for m in user_mau:
16181
16179
  day = random.randint(1, 28)
16182
16180
  visit = f"{m}-{day:02}"
@@ -16184,13 +16182,23 @@ async def return_unit_metrics(bot, PROJECT_USERNAME, EXTRA_D, BASE_P):
16184
16182
  if dt_visit >= entry_dt_obj and random.random() < 0.7:
16185
16183
  user_dau_dates.add(visit)
16186
16184
 
16185
+ # статусы (отток) с низкой вероятностью
16186
+ USER_STATUSES = []
16187
+ if random.random() < 0.2: # 10% шанс оттока
16188
+ churn_month = random.choice(valid_months)
16189
+ churn_day = random.randint(1, 28)
16190
+ churn_date = f"{churn_month}-{churn_day:02}"
16191
+ churn_ts = datetime.strptime(churn_date, "%Y-%m-%d").strftime("%d-%m-%Y") + "_23-59-59"
16192
+ USER_STATUSES = [{random.choice(["left", "kicked"]): churn_ts}]
16193
+
16187
16194
  user_dau = sorted(user_dau_dates)
16188
16195
  wallet = f"wallet{random.randint(1, 100)}" if txs else random.choice([f"wallet{random.randint(1, 100)}", ""])
16189
16196
 
16190
16197
  data_users.append((
16191
16198
  random.randint(100000, 999999),
16192
16199
  json.dumps({"USER_WALLET": wallet, "USER_UTM": utm, "USER_DT": entry_dt}),
16193
- json.dumps({"USER_DAU": user_dau, "USER_MAU": user_mau, "USER_TXS": txs, "USER_PAYMENTS": payments})
16200
+ json.dumps({"USER_DAU": user_dau, "USER_MAU": user_mau, "USER_TXS": txs,
16201
+ "USER_PAYMENTS": payments, "USER_STATUSES": USER_STATUSES})
16194
16202
  ))
16195
16203
  print(f"gen {data_users=}")
16196
16204
 
@@ -16289,7 +16297,7 @@ async def return_unit_metrics(bot, PROJECT_USERNAME, EXTRA_D, BASE_P):
16289
16297
  if cmgr_values:
16290
16298
  avg_cmgr = sum(cmgr_values) / len(cmgr_values)
16291
16299
  writer.writerow([])
16292
- writer.writerow([f"Revenue ~ ×{round(1 + avg_cmgr, 2)} monthly average"])
16300
+ writer.writerow([f"Rev ~ ×{round(1 + avg_cmgr, 2)} monthly"])
16293
16301
 
16294
16302
  # отправить файл
16295
16303
  thumb = types.FSInputFile(os.path.join(EXTRA_D, "parse.jpg"))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yeref
3
- Version: 0.24.56
3
+ Version: 0.24.58
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