yeref 0.24.80__tar.gz → 0.24.81__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.80
3
+ Version: 0.24.81
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.80',
5
+ version='0.24.81',
6
6
  description='desc-f',
7
7
  author='john smith',
8
8
  packages=['yeref'],
@@ -16373,16 +16373,15 @@ async def return_cohort_metrics(bot, PROJECT_USERNAME, EXTRA_D, BASE_P):
16373
16373
  total_lost = 0
16374
16374
  total_start = 0
16375
16375
  for j in range(num_months):
16376
- # для каждой когорты собираем по календарным месяцам
16377
16376
  for i in range(j, num_months - 1):
16378
16377
  start_cnt = counts[i][j]
16379
16378
  next_cnt = counts[i + 1][j]
16380
16379
  if start_cnt > 0:
16381
- lost = start_cnt - next_cnt
16380
+ lost = max(start_cnt - next_cnt, 0)
16382
16381
  total_lost += lost
16383
16382
  total_start += start_cnt
16384
16383
 
16385
- avg_churn = (total_lost / total_start * 100) if total_start else 0
16384
+ avg_churn = (total_lost / total_start) if total_start else 0
16386
16385
 
16387
16386
  path = os.path.join(EXTRA_D, "3_cohort_metrics.csv")
16388
16387
  with open(path, "w", newline="", encoding="utf-8") as f:
@@ -16390,7 +16389,7 @@ async def return_cohort_metrics(bot, PROJECT_USERNAME, EXTRA_D, BASE_P):
16390
16389
  for r in table:
16391
16390
  writer.writerow(r)
16392
16391
  writer.writerow([])
16393
- writer.writerow([f"Churn ~ ×{avg_churn:.0f} monthly"])
16392
+ writer.writerow([f"Churn ~ ×{avg_churn:.2f} monthly"])
16394
16393
 
16395
16394
  thumb = types.FSInputFile(os.path.join(EXTRA_D, "parse.jpg"))
16396
16395
  await bot.send_document(chat_id=my_tid, document=types.FSInputFile(path), thumbnail=thumb)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yeref
3
- Version: 0.24.80
3
+ Version: 0.24.81
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