wbreport 1.55.10rc0__tar.gz → 1.56.1__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.
Potentially problematic release.
This version of wbreport might be problematic. Click here for more details.
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/PKG-INFO +1 -1
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/defaults/factsheets/base.py +1 -1
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/defaults/factsheets/multitheme.py +1 -1
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/pdf/charts/legend.py +1 -1
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/pdf/charts/pie.py +2 -1
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/pdf/charts/timeseries.py +1 -1
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/pdf/sandbox/templates/basic_factsheet.py +9 -8
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/pdf/sandbox/templates/fund_factsheet.py +8 -7
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/pdf/sandbox/templates/long_industry_exposure_factsheet.py +8 -7
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/pdf/sandbox/templates/multistrat_factsheet.py +5 -4
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/pdf/tables/aggregated_tables.py +2 -2
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/.gitignore +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/LICENSE +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/pyproject.toml +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/__init__.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/admin.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/apps.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/defaults/__init__.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/defaults/factsheets/__init__.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/defaults/factsheets/menu.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/defaults/factsheets/mixins.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/dynamic_preferences_registry.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/factories/__init__.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/factories/data_classes.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/factories/reports.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/filters.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/fixtures/wbreport.yaml +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/migrations/0001_initial_squashed_squashed_0007_report_key.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/migrations/0008_alter_report_file_content_type.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/migrations/0009_alter_report_color_palette.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/migrations/0010_auto_20240103_0947.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/migrations/0011_auto_20240207_1629.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/migrations/0012_reportversion_lock.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/migrations/0013_alter_reportversion_context.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/migrations/0014_alter_reportcategory_options_and_more.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/migrations/__init__.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/mixins.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/models.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/pdf/__init__.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/pdf/charts/__init__.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/pdf/flowables/risk.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/pdf/flowables/textboxes.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/pdf/flowables/themes.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/pdf/sandbox/__init__.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/pdf/sandbox/run.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/pdf/sandbox/templates/__init__.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/pdf/sandbox/templates/testfile.pdf +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/pdf/tables/__init__.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/pdf/tables/data_tables.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/serializers.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/tasks.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/templates/__init__.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/templatetags/__init__.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/templatetags/portfolio_tags.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/tests/__init__.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/tests/conftest.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/tests/test_models.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/tests/test_tasks.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/tests/test_viewsets.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/tests/tests.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/urls.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/urls_public.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/viewsets/__init__.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/viewsets/configs/__init__.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/viewsets/configs/buttons.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/viewsets/configs/displays.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/viewsets/configs/endpoints.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/viewsets/configs/menus.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/viewsets/configs/titles.py +0 -0
- {wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/viewsets/viewsets.py +0 -0
|
@@ -199,7 +199,7 @@ class ReportClass(FactsheetReportMixin, ReportMixin):
|
|
|
199
199
|
return template.render(context)
|
|
200
200
|
|
|
201
201
|
@classmethod
|
|
202
|
-
def generate_file(cls, context):
|
|
202
|
+
def generate_file(cls, context): # noqa: C901
|
|
203
203
|
debug = False
|
|
204
204
|
# Product Data
|
|
205
205
|
# Main Feature table as dictionary
|
|
@@ -199,7 +199,7 @@ class ReportClass(FactsheetReportMixin, ReportMixin):
|
|
|
199
199
|
return template.render(context)
|
|
200
200
|
|
|
201
201
|
@classmethod
|
|
202
|
-
def generate_file(cls, context):
|
|
202
|
+
def generate_file(cls, context): # noqa: C901
|
|
203
203
|
debug = False
|
|
204
204
|
|
|
205
205
|
main_features_dict = context["information_table"]["Main Features"]
|
|
@@ -4,7 +4,7 @@ from reportlab.lib.colors import transparent
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
class CustomLegend(Legend):
|
|
7
|
-
def _defaultSwatch(self, x, thisy, dx, dy, fillColor, strokeWidth, strokeColor):
|
|
7
|
+
def _defaultSwatch(self, x, thisy, dx, dy, fillColor, strokeWidth, strokeColor): # noqa: N803, N802
|
|
8
8
|
return Circle(
|
|
9
9
|
x,
|
|
10
10
|
thisy + dx / 2,
|
|
@@ -2,6 +2,7 @@ from reportlab.graphics.charts.piecharts import Pie
|
|
|
2
2
|
from reportlab.graphics.shapes import Drawing
|
|
3
3
|
from reportlab.lib import colors
|
|
4
4
|
from reportlab.lib.units import cm
|
|
5
|
+
|
|
5
6
|
from wbreport.pdf.charts.legend import CustomLegend
|
|
6
7
|
|
|
7
8
|
|
|
@@ -9,7 +10,7 @@ def get_data_and_labels_from_df(df, color_palette, percent=True):
|
|
|
9
10
|
data = list()
|
|
10
11
|
colornamepairs = list()
|
|
11
12
|
|
|
12
|
-
for row in df.itertuples():
|
|
13
|
+
for index, row in enumerate(df.itertuples()):
|
|
13
14
|
data.append(float(row.weighting))
|
|
14
15
|
|
|
15
16
|
label = f"{row[2]*100:.1f}%" if percent else f"{row[2]:.1f}"
|
|
@@ -17,7 +17,7 @@ class LogScaleTimeSeriesPlot(LinePlot):
|
|
|
17
17
|
super().__init__()
|
|
18
18
|
|
|
19
19
|
class CustomYAxis(LogYValueAxis):
|
|
20
|
-
def _calcTickPositions(self):
|
|
20
|
+
def _calcTickPositions(self): # noqa: N802
|
|
21
21
|
return self._calcStepAndTickPositions()[1]
|
|
22
22
|
|
|
23
23
|
self.xValueAxis = NormalDateXValueAxis()
|
|
@@ -30,6 +30,7 @@ from reportlab.platypus import (
|
|
|
30
30
|
from reportlab.platypus.flowables import KeepTogether, TopPadder
|
|
31
31
|
from reportlab.platypus.frames import Frame
|
|
32
32
|
from svglib.svglib import svg2rlg
|
|
33
|
+
|
|
33
34
|
from wbreport.models import ReportAsset
|
|
34
35
|
from wbreport.pdf.charts.pie import (
|
|
35
36
|
get_pie_chart_horizontal,
|
|
@@ -43,7 +44,7 @@ from wbreport.pdf.tables.aggregated_tables import get_simple_aggregated_table
|
|
|
43
44
|
from wbreport.pdf.tables.data_tables import get_simple_data_table
|
|
44
45
|
|
|
45
46
|
|
|
46
|
-
def generate_report(context):
|
|
47
|
+
def generate_report(context): # noqa: C901
|
|
47
48
|
debug = False
|
|
48
49
|
### Product Data ###
|
|
49
50
|
# Main Feature table as dictionary
|
|
@@ -121,7 +122,7 @@ def generate_report(context):
|
|
|
121
122
|
s_base_small_justified = ParagraphStyle(
|
|
122
123
|
name="s_base_small_justified", parent=s_base, fontSize=6.5, leading=7, alignment=TA_JUSTIFY
|
|
123
124
|
)
|
|
124
|
-
s_base_small_justified_indent = ParagraphStyle(
|
|
125
|
+
s_base_small_justified_indent = ParagraphStyle( # noqa: F841
|
|
125
126
|
name="s_base_small_justified_indent", parent=s_base_small_justified, leftIndent=CONTENT_OFFSET
|
|
126
127
|
)
|
|
127
128
|
s_base_indent = ParagraphStyle(name="s_description", parent=s_base, spaceBefore=8, leftIndent=CONTENT_OFFSET)
|
|
@@ -135,7 +136,7 @@ def generate_report(context):
|
|
|
135
136
|
s_table_medium_leading = ParagraphStyle(name="s_table_medium_leading", parent=s_table_medium, leading=13.9)
|
|
136
137
|
s_table_large = ParagraphStyle(name="s_table_large", parent=s_table_medium, fontSize=11, leading=11)
|
|
137
138
|
s_table_large_center = ParagraphStyle(name="s_table_large", parent=s_table_large, alignment=TA_CENTER)
|
|
138
|
-
s_table_large_center_padding = ParagraphStyle(
|
|
139
|
+
s_table_large_center_padding = ParagraphStyle( # noqa: F841
|
|
139
140
|
name="s_table_large", parent=s_table_large_center, spaceBefore=20, spaceAfter=20
|
|
140
141
|
)
|
|
141
142
|
s_table_center = ParagraphStyle(
|
|
@@ -278,7 +279,7 @@ def generate_report(context):
|
|
|
278
279
|
)
|
|
279
280
|
return title_table
|
|
280
281
|
|
|
281
|
-
def impress(
|
|
282
|
+
def impress(elements):
|
|
282
283
|
style = s_table_headline_2
|
|
283
284
|
table_data = [
|
|
284
285
|
[
|
|
@@ -306,7 +307,7 @@ def generate_report(context):
|
|
|
306
307
|
]
|
|
307
308
|
)
|
|
308
309
|
)
|
|
309
|
-
|
|
310
|
+
elements.append(KeepTogether(TopPadder(t)))
|
|
310
311
|
|
|
311
312
|
# Description
|
|
312
313
|
elements.append(generate_title(general_data["title"]))
|
|
@@ -334,7 +335,7 @@ def generate_report(context):
|
|
|
334
335
|
# Price Timeseries Chart
|
|
335
336
|
elements.append(
|
|
336
337
|
get_timeseries_chart(
|
|
337
|
-
data=[list(zip(prices.index, prices.net_value))],
|
|
338
|
+
data=[list(zip(prices.index, prices.net_value, strict=False))],
|
|
338
339
|
width=CONTENT_WIDTH_PAGE1_LEFT - CONTENT_OFFSET,
|
|
339
340
|
height=4.34 * cm,
|
|
340
341
|
color=c_product,
|
|
@@ -355,7 +356,7 @@ def generate_report(context):
|
|
|
355
356
|
"<strong>Top 3 Contributors</strong>",
|
|
356
357
|
"<strong>Bottom 3 Contributors</strong>",
|
|
357
358
|
],
|
|
358
|
-
data=list(zip(top_3_holdings, top_3_contributors, bottom_3_contributors)),
|
|
359
|
+
data=list(zip(top_3_holdings, top_3_contributors, bottom_3_contributors, strict=False)),
|
|
359
360
|
width=CONTENT_WIDTH_PAGE1_LEFT,
|
|
360
361
|
header_row_height=0.85 * cm,
|
|
361
362
|
data_row_height=0.39 * cm,
|
|
@@ -834,7 +835,7 @@ def generate_report(context):
|
|
|
834
835
|
|
|
835
836
|
last_row_height = right_height - liquid_height - 0.85 * cm
|
|
836
837
|
|
|
837
|
-
last_height = min(
|
|
838
|
+
last_height = min( # noqa: F841
|
|
838
839
|
max(industry_height - liquid_height + 6, 3.564 * cm), max_available_height - liquid_height
|
|
839
840
|
) # 6 because of the drawn string
|
|
840
841
|
|
|
@@ -29,6 +29,7 @@ from reportlab.platypus import (
|
|
|
29
29
|
from reportlab.platypus.flowables import KeepTogether, TopPadder
|
|
30
30
|
from reportlab.platypus.frames import Frame
|
|
31
31
|
from svglib.svglib import svg2rlg
|
|
32
|
+
|
|
32
33
|
from wbreport.models import ReportAsset
|
|
33
34
|
from wbreport.pdf.charts.pie import (
|
|
34
35
|
get_pie_chart_horizontal,
|
|
@@ -44,12 +45,12 @@ from wbreport.pdf.tables.aggregated_tables import (
|
|
|
44
45
|
from wbreport.pdf.tables.data_tables import get_simple_data_table
|
|
45
46
|
|
|
46
47
|
|
|
47
|
-
def generate_report(context):
|
|
48
|
+
def generate_report(context): # noqa: C901
|
|
48
49
|
debug = False
|
|
49
50
|
|
|
50
51
|
main_features_dict_tmp = context["information_table"]
|
|
51
52
|
main_features_dict = {}
|
|
52
|
-
for
|
|
53
|
+
for v in main_features_dict_tmp.values():
|
|
53
54
|
main_features_dict.update(v)
|
|
54
55
|
# Monthly returns table as dataframe, None is no value
|
|
55
56
|
monthly_returns = context["monthly_returns"]
|
|
@@ -129,7 +130,7 @@ def generate_report(context):
|
|
|
129
130
|
s_base_small_justified = ParagraphStyle(
|
|
130
131
|
name="s_base_small_justified", parent=s_base, fontSize=6.5, leading=7, alignment=TA_JUSTIFY
|
|
131
132
|
)
|
|
132
|
-
s_base_small_justified_indent = ParagraphStyle(
|
|
133
|
+
s_base_small_justified_indent = ParagraphStyle( # noqa: F841
|
|
133
134
|
name="s_base_small_justified_indent", parent=s_base_small_justified, leftIndent=CONTENT_OFFSET
|
|
134
135
|
)
|
|
135
136
|
s_base_indent = ParagraphStyle(name="s_description", parent=s_base, spaceBefore=8, leftIndent=CONTENT_OFFSET)
|
|
@@ -143,7 +144,7 @@ def generate_report(context):
|
|
|
143
144
|
s_table_medium_leading = ParagraphStyle(name="s_table_medium_leading", parent=s_table_medium, leading=13.9)
|
|
144
145
|
s_table_large = ParagraphStyle(name="s_table_large", parent=s_table_medium, fontSize=11, leading=11)
|
|
145
146
|
s_table_large_center = ParagraphStyle(name="s_table_large", parent=s_table_large, alignment=TA_CENTER)
|
|
146
|
-
s_table_large_center_padding = ParagraphStyle(
|
|
147
|
+
s_table_large_center_padding = ParagraphStyle( # noqa: F841
|
|
147
148
|
name="s_table_large", parent=s_table_large_center, spaceBefore=20, spaceAfter=20
|
|
148
149
|
)
|
|
149
150
|
s_table_center = ParagraphStyle(
|
|
@@ -284,7 +285,7 @@ def generate_report(context):
|
|
|
284
285
|
)
|
|
285
286
|
return title_table
|
|
286
287
|
|
|
287
|
-
def impress(
|
|
288
|
+
def impress(elements):
|
|
288
289
|
style = s_table_headline_2
|
|
289
290
|
table_data = [
|
|
290
291
|
[
|
|
@@ -312,7 +313,7 @@ def generate_report(context):
|
|
|
312
313
|
]
|
|
313
314
|
)
|
|
314
315
|
)
|
|
315
|
-
|
|
316
|
+
elements.append(KeepTogether(TopPadder(t)))
|
|
316
317
|
|
|
317
318
|
# Description
|
|
318
319
|
elements.append(generate_title(general_data["title"]))
|
|
@@ -347,7 +348,7 @@ def generate_report(context):
|
|
|
347
348
|
# Price Timeseries Chart
|
|
348
349
|
elements.append(
|
|
349
350
|
get_timeseries_chart(
|
|
350
|
-
data=[list(zip(prices.index, prices.net_value))],
|
|
351
|
+
data=[list(zip(prices.index, prices.net_value, strict=False))],
|
|
351
352
|
width=CONTENT_WIDTH_PAGE1_LEFT - CONTENT_OFFSET,
|
|
352
353
|
height=4.34 * cm,
|
|
353
354
|
color=c_product,
|
|
@@ -30,6 +30,7 @@ from reportlab.platypus import (
|
|
|
30
30
|
from reportlab.platypus.flowables import KeepTogether, TopPadder
|
|
31
31
|
from reportlab.platypus.frames import Frame
|
|
32
32
|
from svglib.svglib import svg2rlg
|
|
33
|
+
|
|
33
34
|
from wbreport.models import ReportAsset
|
|
34
35
|
from wbreport.pdf.charts.pie import (
|
|
35
36
|
get_pie_chart_horizontal,
|
|
@@ -42,7 +43,7 @@ from wbreport.pdf.tables.aggregated_tables import get_simple_aggregated_table
|
|
|
42
43
|
from wbreport.pdf.tables.data_tables import get_simple_data_table
|
|
43
44
|
|
|
44
45
|
|
|
45
|
-
def generate_report(context):
|
|
46
|
+
def generate_report(context): # noqa: C901
|
|
46
47
|
debug = False
|
|
47
48
|
### Product Data ###
|
|
48
49
|
# Main Feature table as dictionary
|
|
@@ -120,7 +121,7 @@ def generate_report(context):
|
|
|
120
121
|
s_base_small_justified = ParagraphStyle(
|
|
121
122
|
name="s_base_small_justified", parent=s_base, fontSize=6.5, leading=7, alignment=TA_JUSTIFY
|
|
122
123
|
)
|
|
123
|
-
s_base_small_justified_indent = ParagraphStyle(
|
|
124
|
+
s_base_small_justified_indent = ParagraphStyle( # noqa: F841
|
|
124
125
|
name="s_base_small_justified_indent", parent=s_base_small_justified, leftIndent=CONTENT_OFFSET
|
|
125
126
|
)
|
|
126
127
|
s_base_indent = ParagraphStyle(name="s_description", parent=s_base, spaceBefore=8, leftIndent=CONTENT_OFFSET)
|
|
@@ -134,7 +135,7 @@ def generate_report(context):
|
|
|
134
135
|
s_table_medium_leading = ParagraphStyle(name="s_table_medium_leading", parent=s_table_medium, leading=13.9)
|
|
135
136
|
s_table_large = ParagraphStyle(name="s_table_large", parent=s_table_medium, fontSize=11, leading=11)
|
|
136
137
|
s_table_large_center = ParagraphStyle(name="s_table_large", parent=s_table_large, alignment=TA_CENTER)
|
|
137
|
-
s_table_large_center_padding = ParagraphStyle(
|
|
138
|
+
s_table_large_center_padding = ParagraphStyle( # noqa: F841
|
|
138
139
|
name="s_table_large", parent=s_table_large_center, spaceBefore=20, spaceAfter=20
|
|
139
140
|
)
|
|
140
141
|
s_table_center = ParagraphStyle(
|
|
@@ -277,7 +278,7 @@ def generate_report(context):
|
|
|
277
278
|
)
|
|
278
279
|
return title_table
|
|
279
280
|
|
|
280
|
-
def impress(
|
|
281
|
+
def impress(elements):
|
|
281
282
|
style = s_table_headline_2
|
|
282
283
|
table_data = [
|
|
283
284
|
[
|
|
@@ -305,7 +306,7 @@ def generate_report(context):
|
|
|
305
306
|
]
|
|
306
307
|
)
|
|
307
308
|
)
|
|
308
|
-
|
|
309
|
+
elements.append(KeepTogether(TopPadder(t)))
|
|
309
310
|
|
|
310
311
|
############################
|
|
311
312
|
## Page 1: BEGINING
|
|
@@ -337,7 +338,7 @@ def generate_report(context):
|
|
|
337
338
|
# Price Timeseries Chart
|
|
338
339
|
elements.append(
|
|
339
340
|
get_timeseries_chart(
|
|
340
|
-
data=[list(zip(prices.index, prices.net_value))],
|
|
341
|
+
data=[list(zip(prices.index, prices.net_value, strict=False))],
|
|
341
342
|
width=CONTENT_WIDTH_PAGE1_LEFT - CONTENT_OFFSET,
|
|
342
343
|
height=4.34 * cm,
|
|
343
344
|
color=c_product,
|
|
@@ -358,7 +359,7 @@ def generate_report(context):
|
|
|
358
359
|
"<strong>Top 3 Contributors</strong>",
|
|
359
360
|
"<strong>Bottom 3 Contributors</strong>",
|
|
360
361
|
],
|
|
361
|
-
data=list(zip(top_3_holdings, top_3_contributors, bottom_3_contributors)),
|
|
362
|
+
data=list(zip(top_3_holdings, top_3_contributors, bottom_3_contributors, strict=False)),
|
|
362
363
|
width=CONTENT_WIDTH_PAGE1_LEFT,
|
|
363
364
|
header_row_height=0.85 * cm,
|
|
364
365
|
data_row_height=0.39 * cm,
|
{wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/pdf/sandbox/templates/multistrat_factsheet.py
RENAMED
|
@@ -29,6 +29,7 @@ from reportlab.platypus import (
|
|
|
29
29
|
from reportlab.platypus.flowables import KeepTogether, TopPadder
|
|
30
30
|
from reportlab.platypus.frames import Frame
|
|
31
31
|
from svglib.svglib import svg2rlg
|
|
32
|
+
|
|
32
33
|
from wbreport.models import ReportAsset
|
|
33
34
|
from wbreport.pdf.charts.pie import (
|
|
34
35
|
get_pie_chart_horizontal,
|
|
@@ -42,7 +43,7 @@ from wbreport.pdf.tables.aggregated_tables import get_simple_aggregated_table
|
|
|
42
43
|
from wbreport.pdf.tables.data_tables import get_simple_data_table
|
|
43
44
|
|
|
44
45
|
|
|
45
|
-
def generate_report(context):
|
|
46
|
+
def generate_report(context): # noqa: C901
|
|
46
47
|
debug = False
|
|
47
48
|
|
|
48
49
|
main_features_dict = context["information_table"]["Main Features"]
|
|
@@ -133,7 +134,7 @@ def generate_report(context):
|
|
|
133
134
|
s_table_medium = ParagraphStyle(name="s_table_medium", parent=s_table_base, fontSize=9, leading=8)
|
|
134
135
|
s_table_medium_leading = ParagraphStyle(name="s_table_medium_leading", parent=s_table_medium, leading=13.9)
|
|
135
136
|
s_table_large = ParagraphStyle(name="s_table_large", parent=s_table_medium, fontSize=11, leading=11)
|
|
136
|
-
s_table_large_center = ParagraphStyle(name="s_table_large", parent=s_table_large, alignment=TA_CENTER)
|
|
137
|
+
s_table_large_center = ParagraphStyle(name="s_table_large", parent=s_table_large, alignment=TA_CENTER) # noqa: F841
|
|
137
138
|
s_table_center = ParagraphStyle(
|
|
138
139
|
name="s_table_center",
|
|
139
140
|
parent=s_table_base,
|
|
@@ -330,7 +331,7 @@ def generate_report(context):
|
|
|
330
331
|
# Price Timeseries Chart
|
|
331
332
|
elements.append(
|
|
332
333
|
get_timeseries_chart(
|
|
333
|
-
data=[list(zip(prices.index, prices.net_value))],
|
|
334
|
+
data=[list(zip(prices.index, prices.net_value, strict=False))],
|
|
334
335
|
width=CONTENT_WIDTH_PAGE1_LEFT - CONTENT_OFFSET,
|
|
335
336
|
height=4.34 * cm,
|
|
336
337
|
color=c_product,
|
|
@@ -351,7 +352,7 @@ def generate_report(context):
|
|
|
351
352
|
"<strong>Top 3 Contributors</strong>",
|
|
352
353
|
"<strong>Bottom 3 Contributors</strong>",
|
|
353
354
|
],
|
|
354
|
-
data=list(zip(top_3_holdings, top_3_contributors, bottom_3_contributors)),
|
|
355
|
+
data=list(zip(top_3_holdings, top_3_contributors, bottom_3_contributors, strict=False)),
|
|
355
356
|
width=CONTENT_WIDTH_PAGE1_LEFT,
|
|
356
357
|
header_row_height=0.85 * cm,
|
|
357
358
|
data_row_height=0.39 * cm,
|
|
@@ -37,7 +37,7 @@ def get_simple_aggregated_table(
|
|
|
37
37
|
|
|
38
38
|
table_row.append(Paragraph(str(year), style=row_style))
|
|
39
39
|
|
|
40
|
-
for
|
|
40
|
+
for _, element in row.items():
|
|
41
41
|
if element.get("performance", None) is None:
|
|
42
42
|
table_row.append(Spacer(width=0, height=0))
|
|
43
43
|
else:
|
|
@@ -110,7 +110,7 @@ def get_fund_table(
|
|
|
110
110
|
table_data.append(table_row)
|
|
111
111
|
|
|
112
112
|
# Generate table
|
|
113
|
-
for
|
|
113
|
+
for _, row in df.iterrows():
|
|
114
114
|
table_row = list()
|
|
115
115
|
|
|
116
116
|
for value in row:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/migrations/0008_alter_report_file_content_type.py
RENAMED
|
File without changes
|
{wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/migrations/0009_alter_report_color_palette.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wbreport-1.55.10rc0 → wbreport-1.56.1}/wbreport/migrations/0013_alter_reportversion_context.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|