wbreport 1.55.8__py2.py3-none-any.whl → 1.55.10rc0__py2.py3-none-any.whl

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.

Potentially problematic release.


This version of wbreport might be problematic. Click here for more details.

@@ -446,7 +446,7 @@ class ReportClass(FactsheetReportMixin, ReportMixin):
446
446
  # Price Timeseries Chart
447
447
  elements.append(
448
448
  get_timeseries_chart(
449
- data=[list(zip(prices.index, prices.net_value))],
449
+ data=[list(zip(prices.index, prices.net_value, strict=False))],
450
450
  width=CONTENT_WIDTH_PAGE1_LEFT - CONTENT_OFFSET,
451
451
  height=4.34 * cm,
452
452
  color=c_product,
@@ -467,7 +467,7 @@ class ReportClass(FactsheetReportMixin, ReportMixin):
467
467
  "<strong>Top 3 Contributors</strong>",
468
468
  "<strong>Bottom 3 Contributors</strong>",
469
469
  ],
470
- data=list(zip(top_3_holdings, top_3_contributors, bottom_3_contributors)),
470
+ data=list(zip(top_3_holdings, top_3_contributors, bottom_3_contributors, strict=False)),
471
471
  width=CONTENT_WIDTH_PAGE1_LEFT,
472
472
  header_row_height=0.85 * cm,
473
473
  data_row_height=0.39 * cm,
@@ -636,7 +636,7 @@ class ReportClass(FactsheetReportMixin, ReportMixin):
636
636
 
637
637
  data = list()
638
638
  categories = list()
639
- for index, row in enumerate(df.itertuples()):
639
+ for row in df.itertuples():
640
640
  data.append(row.weighting * 100)
641
641
  categories.append(f"{row.aggregated_title} ({row.weighting * 100:.1f}%)")
642
642
 
@@ -450,7 +450,7 @@ class ReportClass(FactsheetReportMixin, ReportMixin):
450
450
  # Price Timeseries Chart
451
451
  elements.append(
452
452
  get_timeseries_chart(
453
- data=[list(zip(prices.index, prices.net_value))],
453
+ data=[list(zip(prices.index, prices.net_value, strict=False))],
454
454
  width=CONTENT_WIDTH_PAGE1_LEFT - CONTENT_OFFSET,
455
455
  height=4.34 * cm,
456
456
  color=c_product,
@@ -471,7 +471,7 @@ class ReportClass(FactsheetReportMixin, ReportMixin):
471
471
  "<strong>Top 3 Contributors</strong>",
472
472
  "<strong>Bottom 3 Contributors</strong>",
473
473
  ],
474
- data=list(zip(top_3_holdings, top_3_contributors, bottom_3_contributors)),
474
+ data=list(zip(top_3_holdings, top_3_contributors, bottom_3_contributors, strict=False)),
475
475
  width=CONTENT_WIDTH_PAGE1_LEFT,
476
476
  header_row_height=0.85 * cm,
477
477
  data_row_height=0.39 * cm,
@@ -639,7 +639,7 @@ class ReportClass(FactsheetReportMixin, ReportMixin):
639
639
 
640
640
  data = list()
641
641
  categories = list()
642
- for index, row in enumerate(df.itertuples()):
642
+ for row in df.itertuples:
643
643
  data.append(row.weighting * 100)
644
644
  categories.append(f"{row.aggregated_title} ({row.weighting * 100:.1f}%)")
645
645
 
wbreport/models.py CHANGED
@@ -112,9 +112,9 @@ class ReportClass(WBModel):
112
112
  """
113
113
  if (len(args) == 3 and (class_path := args[2])) or (class_path := kwargs.get("class_path", None)):
114
114
  try:
115
- if ReportClassModule := getattr(importlib.import_module(class_path), "ReportClass", None):
115
+ if class_module := getattr(importlib.import_module(class_path), "ReportClass", None):
116
116
  for method in self.REPORT_CLASS_DEFAULT_METHODS:
117
- setattr(self, method, getattr(ReportClassModule, method))
117
+ setattr(self, method, getattr(class_module, method))
118
118
  except ModuleNotFoundError:
119
119
  for method in self.REPORT_CLASS_DEFAULT_METHODS:
120
120
  setattr(self, method, lambda *a, **k: None)
@@ -9,7 +9,7 @@ def get_data_and_labels_from_df(df, color_palette, percent=True):
9
9
  data = list()
10
10
  colornamepairs = list()
11
11
 
12
- for index, row in enumerate(df.itertuples()):
12
+ for row in df.itertuples():
13
13
  data.append(float(row.weighting))
14
14
 
15
15
  label = f"{row[2]*100:.1f}%" if percent else f"{row[2]:.1f}"
@@ -557,7 +557,7 @@ def generate_report(context):
557
557
 
558
558
  data = list()
559
559
  categories = list()
560
- for index, row in enumerate(df.itertuples()):
560
+ for row in df.itertuples():
561
561
  data.append(row.weighting * 100)
562
562
  categories.append(f"{row.aggregated_title} ({row.weighting*100:.1f}%)")
563
563
 
@@ -567,7 +567,7 @@ def generate_report(context):
567
567
 
568
568
  data = list()
569
569
  categories = list()
570
- for index, row in enumerate(df.itertuples()):
570
+ for row in df.itertuples():
571
571
  data.append(row.weighting * 100)
572
572
  categories.append(f"{row.aggregated_title} ({row.weighting*100:.1f}%)")
573
573
 
@@ -559,7 +559,7 @@ def generate_report(context):
559
559
 
560
560
  data = list()
561
561
  categories = list()
562
- for index, row in enumerate(df.itertuples()):
562
+ for row in df.itertuples():
563
563
  data.append(row.weighting * 100)
564
564
  categories.append(f"{row.aggregated_title} ({row.weighting*100:.1f}%)")
565
565
 
@@ -553,7 +553,7 @@ def generate_report(context):
553
553
 
554
554
  data = list()
555
555
  categories = list()
556
- for index, row in enumerate(df.itertuples()):
556
+ for row in df.itertuples():
557
557
  data.append(row.weighting * 100)
558
558
  categories.append(f"{row.aggregated_title} ({row.weighting*100:.1f}%)")
559
559
 
@@ -4,6 +4,7 @@ import pytest
4
4
  from django.test import override_settings
5
5
  from faker import Faker
6
6
  from wbmailing.models import MassMail
7
+
7
8
  from wbreport.models import ReportVersion
8
9
 
9
10
  fake = Faker()
@@ -2,6 +2,7 @@ import pytest
2
2
  from django.core import mail
3
3
  from django.test import override_settings
4
4
  from wbcore.contrib.authentication.factories import SuperUserFactory
5
+
5
6
  from wbreport.tasks import generate_and_send_current_report_file
6
7
 
7
8
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wbreport
3
- Version: 1.55.8
3
+ Version: 1.55.10rc0
4
4
  Author-email: Christopher Wittlinger <c.wittlinger@stainly.com>
5
5
  License-File: LICENSE
6
6
  Requires-Dist: wbcore
@@ -4,17 +4,17 @@ wbreport/apps.py,sha256=4z2N25hswEAlsJsntASC5iOWUwsqMCL99-gvqBlPGFY,148
4
4
  wbreport/dynamic_preferences_registry.py,sha256=nGT-fS5vN-BSVNyGcJ81ORjiXlOngePRN9hipB9olPw,508
5
5
  wbreport/filters.py,sha256=Q92qUs0_4NvpqWqbs8_D9OLD81herHLuWcZ1sdneZgw,1523
6
6
  wbreport/mixins.py,sha256=bAfMvfPL4YEGfEM8fsX-B_JDnN1spcefOhZU-g30080,5521
7
- wbreport/models.py,sha256=zu13z87tsu9Jm00cRK_vbKVXLscBNVwNazMSdIlXGfI,29696
7
+ wbreport/models.py,sha256=Av6cUk6rbvrWy778mXvrPIWK7lXtBHr0fFjWAz3F5OA,29686
8
8
  wbreport/serializers.py,sha256=k1hrtd8QodqRkM1Ol9MsLjk0n_XZU8qGLRR62EHJCXM,7236
9
9
  wbreport/tasks.py,sha256=O1mcYdOlqnj0lA7K52OszA7OBLClMhuzRm6ZiTcXAOY,2271
10
10
  wbreport/urls.py,sha256=yoIFuuwPCRRjOM0VzMznyMmMQXbSVfdk1l12xZJ7Ecs,1463
11
11
  wbreport/urls_public.py,sha256=oc_gBiKvLqWkSDAm_0yitWgpfEnlh3_hGUugkLrLCLs,370
12
12
  wbreport/defaults/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  wbreport/defaults/factsheets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
- wbreport/defaults/factsheets/base.py,sha256=9dIylgXoUSXdHcspCGm3-TJ8Kei38tJ_6ew3gHoM9M4,41090
14
+ wbreport/defaults/factsheets/base.py,sha256=i-VmUuF4cMyjROUuSkTpAU3XlakbgwYGzLfc3dbRXOY,41100
15
15
  wbreport/defaults/factsheets/menu.py,sha256=NTcUuViV4Q-qkffoA7wMSyxnE4mWPysu3KTKWxFmMCM,4580
16
16
  wbreport/defaults/factsheets/mixins.py,sha256=E0RvxmUpvpG7B7YngBPXJ35eD3nwNandJFzLjj1rNRI,1267
17
- wbreport/defaults/factsheets/multitheme.py,sha256=LHM7tceWP9SJ9E8ChtD7eAq21uWMPdLBolnmgYBDTaw,38488
17
+ wbreport/defaults/factsheets/multitheme.py,sha256=n3FuICWF-m2JvWo04na5v_VoatTHFRrdTb6jzMeA88Q,38496
18
18
  wbreport/factories/__init__.py,sha256=jyD1_R-xc2JPZIaSwtE7zYATdL9NIXIDqTwjLw1MolA,170
19
19
  wbreport/factories/data_classes.py,sha256=Ms9bqG370OQTmE3Kxvt9xay-6lfTnqEA3Sx7zCQKWXw,1487
20
20
  wbreport/factories/reports.py,sha256=nGWa_fS78XGUbS8E35rGl3IJySHLB81ggq-3JllPOx4,2286
@@ -31,7 +31,7 @@ wbreport/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
31
31
  wbreport/pdf/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
32
32
  wbreport/pdf/charts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
33
  wbreport/pdf/charts/legend.py,sha256=D-_-ZLDF7q7KlYLiNYVXHWLs4I-LgV8Ce8lk1sLfbPU,461
34
- wbreport/pdf/charts/pie.py,sha256=EcWTDOv1ZD5Az6MnBt_w5pBXusPBB3zTHlpguBPNjfU,4287
34
+ wbreport/pdf/charts/pie.py,sha256=fIje766qMx3pQ_m4EDO3nzrt87bLFzNKOCwJuJI4Ujs,4269
35
35
  wbreport/pdf/charts/timeseries.py,sha256=dN2N66qg9S3bW9OV8q-Vms3wFxUHhLMnaUnymzTNeWY,2381
36
36
  wbreport/pdf/flowables/risk.py,sha256=KdE5RQU0kPUqZX6mpvqITVxpLFu1uDeA2C5lrtSA0mY,3443
37
37
  wbreport/pdf/flowables/textboxes.py,sha256=BMzlva7WBD5UZ5DD1cwWV5ZPragt61YaJquikDYk7eU,4369
@@ -39,10 +39,10 @@ wbreport/pdf/flowables/themes.py,sha256=Y5LcgSTJDhIZM3uIWAPY68HVMhTY9aY9PDwWsG5_
39
39
  wbreport/pdf/sandbox/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
40
40
  wbreport/pdf/sandbox/run.py,sha256=Vkzp_xVVJHctToS49Uef2Mnpb_5KUOWPxNdTFHOqri8,584
41
41
  wbreport/pdf/sandbox/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
42
- wbreport/pdf/sandbox/templates/basic_factsheet.py,sha256=w_PpPS8rbirkrodgXs538_xOw6aNKGr4GGuVn_XGPPU,33967
43
- wbreport/pdf/sandbox/templates/fund_factsheet.py,sha256=aGf5CfUHAp-kGJfU8tZ3TnEO26re4Sny_G2QCFte4gk,31054
44
- wbreport/pdf/sandbox/templates/long_industry_exposure_factsheet.py,sha256=TnOz_NJLhX7ZT1amnbPkyee719dYug688JGSzVGRaMQ,32684
45
- wbreport/pdf/sandbox/templates/multistrat_factsheet.py,sha256=8-WU-r7x6Yq5v1ml2mUT7e33SUYk7IzKMNXFWuE7Y2k,31481
42
+ wbreport/pdf/sandbox/templates/basic_factsheet.py,sha256=9vROV8WQELykmulecaSe2U5LHMP8D7eH2NXcFka8Zjw,33949
43
+ wbreport/pdf/sandbox/templates/fund_factsheet.py,sha256=xaqZYoIhkXjQwkXAVLZ5TN56YqrLN0JmRvb3GFooNHQ,31036
44
+ wbreport/pdf/sandbox/templates/long_industry_exposure_factsheet.py,sha256=pRCmZ0ohbbI-I-EX08YMKozBso0bo7GuvKphxGVCYwY,32666
45
+ wbreport/pdf/sandbox/templates/multistrat_factsheet.py,sha256=a10jLWAa1LL-0hrQHFaB4nzOmRkL087S0NTVjRlrysQ,31463
46
46
  wbreport/pdf/sandbox/templates/testfile.pdf,sha256=eV55RNFdqxqYzre6mg8EWZoL_cbc_lwPjyTGt1pr1AI,144012
47
47
  wbreport/pdf/tables/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
48
  wbreport/pdf/tables/aggregated_tables.py,sha256=rYikFswLMcaTpW7Em5B5oE1WSItQjkW_MJJTsumRpq8,4763
@@ -52,8 +52,8 @@ wbreport/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
52
52
  wbreport/templatetags/portfolio_tags.py,sha256=N2MC_6iFcUAFDH5Wx5rD1-PVK_Ltq4VPIoq7WL4aXGQ,900
53
53
  wbreport/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
54
54
  wbreport/tests/conftest.py,sha256=oMidAuP41_yxMubUDUpqcsW_YslEq_CyPmfD11CUPhY,745
55
- wbreport/tests/test_models.py,sha256=nCBcCLBylZsFMSgkU6mm4iQdoPVRuS42taCI0pb6Gx4,11292
56
- wbreport/tests/test_tasks.py,sha256=icRtEyAtKfhxyx_oN6cYtkUA4QMaGwEpdKKhc07OPKc,762
55
+ wbreport/tests/test_models.py,sha256=jJ_Am79tf8gX7lUpheV9dhe-rZu7UlOSG5dE3RGcqU8,11293
56
+ wbreport/tests/test_tasks.py,sha256=_u2Ns4w8aHTXrMscodv4lOPhrgV2EkVwMhnEttkwcLM,763
57
57
  wbreport/tests/test_viewsets.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
58
58
  wbreport/tests/tests.py,sha256=j2A1uu5DtGu2w056j0S4O7u2OxylldMPCmr7bbSOvfk,282
59
59
  wbreport/viewsets/__init__.py,sha256=iEgYvZsLxQ3Hhf1hwHVdSD7Dm1OZK1Z6qhvTADqs-oc,322
@@ -64,7 +64,7 @@ wbreport/viewsets/configs/displays.py,sha256=DAuGjJB2OITtgFFSBgAz0_sva0uyRAQ1jEa
64
64
  wbreport/viewsets/configs/endpoints.py,sha256=2k2aPoAo4Nq8czbYWLqz2hBbdgPAOk91GSUCt7twA_E,651
65
65
  wbreport/viewsets/configs/menus.py,sha256=trDZsdjXip8KQ4SY1uIudZWFqwb3rQHIRSU36dzRzy0,269
66
66
  wbreport/viewsets/configs/titles.py,sha256=bAfruj40yHrSUPzuJ7WGlfJDl7NXXKSaTqITPNn4eJA,783
67
- wbreport-1.55.8.dist-info/METADATA,sha256=kOZd2tjYsixzzzlpYjP9tZbO084qTuoZJ9L-YM8Jhvw,186
68
- wbreport-1.55.8.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
69
- wbreport-1.55.8.dist-info/licenses/LICENSE,sha256=jvfVH0SY8_YMHlsJHKe_OajiscQDz4lpTlqT6x24sVw,172
70
- wbreport-1.55.8.dist-info/RECORD,,
67
+ wbreport-1.55.10rc0.dist-info/METADATA,sha256=0-JXplX10eriaS22ATxNBdjvlVuXkHH6-IutYLtniPI,190
68
+ wbreport-1.55.10rc0.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
69
+ wbreport-1.55.10rc0.dist-info/licenses/LICENSE,sha256=jvfVH0SY8_YMHlsJHKe_OajiscQDz4lpTlqT6x24sVw,172
70
+ wbreport-1.55.10rc0.dist-info/RECORD,,