basic-report 0.2.0__tar.gz → 0.2.2__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.
- {basic_report-0.2.0 → basic_report-0.2.2}/PKG-INFO +1 -1
- {basic_report-0.2.0 → basic_report-0.2.2}/pyproject.toml +1 -1
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/configs/default.yaml +2 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/heatmap.py +19 -7
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/css/heatmap.css +4 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/LICENSE.md +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/README.md +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/__init__.py +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/css_and_scripts/bootstrap/bootstrap.min.css +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/css_and_scripts/bootstrap/bootstrap.min.js +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/css_and_scripts/bootstrap/jquery-3.3.1.slim.min.js +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/css_and_scripts/bootstrap/popper.min.js +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/css_and_scripts/datatables/dataTables.bootstrap4.min.js +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/css_and_scripts/datatables/jquery.dataTables.min.js +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/css_and_scripts/heatmap/CalendarLabel.min.js +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/css_and_scripts/heatmap/Legend.min.js +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/css_and_scripts/heatmap/Tooltip.min.js +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/css_and_scripts/heatmap/cal-heatmap.css +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/css_and_scripts/heatmap/cal-heatmap.min.js +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/css_and_scripts/heatmap/d3.v7.min.js +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/css_and_scripts/heatmap/popper.min.js +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/page.py +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/report.py +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/base.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/css/accordion.css +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/css/colors.css +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/css/navbar.css +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/css/site.css +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/css/table.css +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/css/tabs.css +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/elements/accordion.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/elements/columns.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/elements/global_links.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/elements/header.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/elements/image.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/elements/list.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/elements/navbar_left.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/elements/navbar_right.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/elements/navbar_top.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/elements/report_ball_section.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/elements/report_header.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/elements/sublevel.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/elements/table.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/elements/tabs.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/elements/text.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/heatmap/base.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/heatmap/button_next.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/heatmap/button_prev.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/heatmap/heatmap.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/heatmap/legend.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/heatmap/script.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/utils.py +0 -0
|
@@ -191,6 +191,7 @@ heatmap:
|
|
|
191
191
|
vertical_orientation: False
|
|
192
192
|
tooltip_enabled: True
|
|
193
193
|
tooltip_function: 'predefined:date+value'
|
|
194
|
+
tooltip_precision: 2
|
|
194
195
|
legend_width: 300
|
|
195
196
|
legend_label: 'Test Legend'
|
|
196
197
|
legend_font_size: 14
|
|
@@ -224,6 +225,7 @@ heatmap:
|
|
|
224
225
|
label: 'D' #M, MM, MMM, MMMM, D, DD, d, dd, ddd, dddd, H, HH, h, hh, m, mm, null
|
|
225
226
|
font_size: 14
|
|
226
227
|
font_weight: 450
|
|
228
|
+
background_color: '#ededed'
|
|
227
229
|
|
|
228
230
|
date:
|
|
229
231
|
start: '2026-03-01'
|
|
@@ -129,6 +129,7 @@ class CalendarSubDomain:
|
|
|
129
129
|
label: SubdomainLabelLiteral = None
|
|
130
130
|
font_size: int = 14
|
|
131
131
|
font_weight: int = 450
|
|
132
|
+
background_color: str = '#ededed'
|
|
132
133
|
|
|
133
134
|
def __post_init__(self):
|
|
134
135
|
checks = [
|
|
@@ -152,6 +153,9 @@ class CalendarSubDomain:
|
|
|
152
153
|
logger.error(msg)
|
|
153
154
|
raise ValueError(msg)
|
|
154
155
|
|
|
156
|
+
if not re.match(r'^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$', self.background_color):
|
|
157
|
+
raise ValueError(f'Sub-Domain `background_color` is an invalid hex color: `{self.background_color}`')
|
|
158
|
+
|
|
155
159
|
#-----------------------------------------------------------------------------------------------------------------------
|
|
156
160
|
# region DATE
|
|
157
161
|
#-----------------------------------------------------------------------------------------------------------------------
|
|
@@ -193,7 +197,7 @@ class CalendarDate:
|
|
|
193
197
|
#-----------------------------------------------------------------------------------------------------------------------
|
|
194
198
|
ColorSchemeLiteral = Literal['YlOrRd', 'Blues', 'Greens', 'Greys', 'Oranges', 'Reds', 'Purples', 'Turbo', 'Viridis',
|
|
195
199
|
'Inferno', 'Magma', 'Plasma', 'Cividis', 'Warm', 'Cool', 'Cubehelix', 'BuPu', 'GnBu',
|
|
196
|
-
'OrRd', 'PuBuGn', 'PuBu' 'PuRd', 'RdPu', 'YlGnBu', 'YlGn', 'YlOrBr', 'YlOrRd',
|
|
200
|
+
'OrRd', 'PuBuGn', 'PuBu', 'PuRd', 'RdPu', 'YlGnBu', 'YlGn', 'YlOrBr', 'YlOrRd',
|
|
197
201
|
'BrBG', 'PRGn', 'PiYG', 'PuOr', 'RdBu', 'RdGy', 'RdYlBu', 'RdYlGn', 'Spectral',
|
|
198
202
|
'Rainbow', 'Sinebow', None]
|
|
199
203
|
ColorInterpolateLiteral = Literal['rgb', 'hsl', 'lab', 'hcl', None]
|
|
@@ -243,7 +247,8 @@ class CalendarMisc:
|
|
|
243
247
|
animation_duration: int = 200
|
|
244
248
|
vertical_orientation: bool = False
|
|
245
249
|
tooltip_enabled: bool = True
|
|
246
|
-
tooltip_function: str = "
|
|
250
|
+
tooltip_function: str = "predefined:date+value"
|
|
251
|
+
tooltip_precision: int | None = None
|
|
247
252
|
legend_width: int = 300
|
|
248
253
|
legend_label: str | None = None
|
|
249
254
|
legend_font_size: int = 14
|
|
@@ -258,21 +263,27 @@ class CalendarMisc:
|
|
|
258
263
|
raise ValueError(msg)
|
|
259
264
|
|
|
260
265
|
if self.tooltip_function.startswith('predefined:'):
|
|
266
|
+
|
|
267
|
+
if self.tooltip_precision is not None:
|
|
268
|
+
value = f'${{(value ?? 0).toFixed({self.tooltip_precision})}}'
|
|
269
|
+
else:
|
|
270
|
+
value = '${value ?? 0}'
|
|
271
|
+
|
|
261
272
|
options = self.tooltip_function.removeprefix('predefined:')
|
|
262
|
-
|
|
263
273
|
defined_options = ['value', 'date+value', 'datetime+value']
|
|
264
274
|
if options == 'value':
|
|
265
|
-
tfn =
|
|
275
|
+
tfn = value
|
|
266
276
|
elif options == 'date+value':
|
|
267
|
-
tfn = "${dayjsDate.format('YYYY-MM-DD')} :
|
|
277
|
+
tfn = f"${{dayjsDate.format('YYYY-MM-DD')}} : {value}"
|
|
268
278
|
elif options == 'datetime+value':
|
|
269
|
-
tfn = "${dayjsDate.format('YYYY-MM-DD HH:mm:ss')} :
|
|
279
|
+
tfn = f"${{dayjsDate.format('YYYY-MM-DD HH:mm:ss')}} : {value}"
|
|
270
280
|
else:
|
|
271
281
|
msg = f'Unknown predefined tooltip function {self.tooltip_function}. Use one of `predefined:{defined_options}`'
|
|
272
282
|
logger.error(msg)
|
|
273
283
|
raise RuntimeError(msg)
|
|
274
284
|
|
|
275
|
-
self.tooltip_function = 'function (timestamp, value, dayjsDate) {return `
|
|
285
|
+
self.tooltip_function = f'function (timestamp, value, dayjsDate) {{return `{tfn}`;}}'
|
|
286
|
+
|
|
276
287
|
#-----------------------------------------------------------------------------------------------------------------------
|
|
277
288
|
# region DATA
|
|
278
289
|
#-----------------------------------------------------------------------------------------------------------------------
|
|
@@ -452,6 +463,7 @@ class CalendarHeatmap:
|
|
|
452
463
|
label_font_weight=self.label.font_weight,
|
|
453
464
|
subdomain_font_size=self.subdomain.font_size,
|
|
454
465
|
subdomain_font_weight=self.subdomain.font_weight,
|
|
466
|
+
subdomain_background_color=self.subdomain.background_color,
|
|
455
467
|
legend_font_size=self.misc.legend_font_size,
|
|
456
468
|
legend_font_weight=self.misc.legend_font_weight,
|
|
457
469
|
)
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
font-weight: {{ subdomain_font_weight }};
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
#{{ misc_id }}-heatmap .ch-subdomain-bg {
|
|
12
|
+
fill: {{ subdomain_background_color }};
|
|
13
|
+
}
|
|
14
|
+
|
|
11
15
|
#{{ misc_id }}-legend text {
|
|
12
16
|
font-size: {{ legend_font_size }}px;
|
|
13
17
|
font-weight: {{ legend_font_weight }};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/css_and_scripts/bootstrap/popper.min.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/css_and_scripts/heatmap/Legend.min.js
RENAMED
|
File without changes
|
{basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/css_and_scripts/heatmap/Tooltip.min.js
RENAMED
|
File without changes
|
{basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/css_and_scripts/heatmap/cal-heatmap.css
RENAMED
|
File without changes
|
|
File without changes
|
{basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/css_and_scripts/heatmap/d3.v7.min.js
RENAMED
|
File without changes
|
{basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/css_and_scripts/heatmap/popper.min.js
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
|
{basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/elements/accordion.html
RENAMED
|
File without changes
|
|
File without changes
|
{basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/elements/global_links.html
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/elements/navbar_left.html
RENAMED
|
File without changes
|
{basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/elements/navbar_right.html
RENAMED
|
File without changes
|
{basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/elements/navbar_top.html
RENAMED
|
File without changes
|
|
File without changes
|
{basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/elements/report_header.html
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/heatmap/button_next.html
RENAMED
|
File without changes
|
{basic_report-0.2.0 → basic_report-0.2.2}/src/basic_report/templates/heatmap/button_prev.html
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|