basic-report 0.1.0__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.1.0/LICENSE.md +21 -0
- basic_report-0.1.0/PKG-INFO +194 -0
- basic_report-0.1.0/README.md +165 -0
- basic_report-0.1.0/pyproject.toml +113 -0
- basic_report-0.1.0/src/basic_report/__init__.py +10 -0
- basic_report-0.1.0/src/basic_report/configs/default.yaml +185 -0
- basic_report-0.1.0/src/basic_report/css_and_scripts/bootstrap.min.css +7 -0
- basic_report-0.1.0/src/basic_report/css_and_scripts/bootstrap.min.js +7 -0
- basic_report-0.1.0/src/basic_report/css_and_scripts/dataTables.bootstrap4.min.js +8 -0
- basic_report-0.1.0/src/basic_report/css_and_scripts/jquery-3.3.1.slim.min.js +2 -0
- basic_report-0.1.0/src/basic_report/css_and_scripts/jquery.dataTables.min.js +166 -0
- basic_report-0.1.0/src/basic_report/css_and_scripts/popper.min.js +5 -0
- basic_report-0.1.0/src/basic_report/page.py +827 -0
- basic_report-0.1.0/src/basic_report/report.py +404 -0
- basic_report-0.1.0/src/basic_report/templates/accordion.css +20 -0
- basic_report-0.1.0/src/basic_report/templates/accordion.html +20 -0
- basic_report-0.1.0/src/basic_report/templates/base.html +59 -0
- basic_report-0.1.0/src/basic_report/templates/colors.css +30 -0
- basic_report-0.1.0/src/basic_report/templates/columns.html +9 -0
- basic_report-0.1.0/src/basic_report/templates/global_links.html +7 -0
- basic_report-0.1.0/src/basic_report/templates/header.html +5 -0
- basic_report-0.1.0/src/basic_report/templates/image.html +16 -0
- basic_report-0.1.0/src/basic_report/templates/list.html +7 -0
- basic_report-0.1.0/src/basic_report/templates/navbar.css +17 -0
- basic_report-0.1.0/src/basic_report/templates/navbar_left.html +32 -0
- basic_report-0.1.0/src/basic_report/templates/navbar_right.html +32 -0
- basic_report-0.1.0/src/basic_report/templates/navbar_top.html +25 -0
- basic_report-0.1.0/src/basic_report/templates/plot.html +4 -0
- basic_report-0.1.0/src/basic_report/templates/report_ball_section.html +80 -0
- basic_report-0.1.0/src/basic_report/templates/report_header.html +6 -0
- basic_report-0.1.0/src/basic_report/templates/site.css +5 -0
- basic_report-0.1.0/src/basic_report/templates/sublevel.html +7 -0
- basic_report-0.1.0/src/basic_report/templates/table.css +51 -0
- basic_report-0.1.0/src/basic_report/templates/table.html +55 -0
- basic_report-0.1.0/src/basic_report/templates/tabs.css +20 -0
- basic_report-0.1.0/src/basic_report/templates/tabs.html +29 -0
- basic_report-0.1.0/src/basic_report/templates/text.html +3 -0
- basic_report-0.1.0/src/basic_report/utils.py +246 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
-----------
|
|
3
|
+
Copyright (c) 2026 Björn Scholz
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: basic-report
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A lightweight Python package for generating clean, professional static HTML reports.
|
|
5
|
+
Keywords: html,report,static,responsive,website
|
|
6
|
+
Author: Björn Scholz
|
|
7
|
+
Author-email: Björn Scholz <bjorn.scholz@gmail.com>
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE.md
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Requires-Dist: jinja2>=3.1.6
|
|
17
|
+
Requires-Dist: loguru>=0.7.3
|
|
18
|
+
Requires-Dist: pandas>=3.0.0
|
|
19
|
+
Requires-Dist: pyyaml>=6.0.3
|
|
20
|
+
Maintainer: Björn Scholz
|
|
21
|
+
Maintainer-email: Björn Scholz <bjorn.scholz@gmail.com>
|
|
22
|
+
Requires-Python: >=3.11
|
|
23
|
+
Project-URL: Homepage, https://basic-report.scholz-and-scholz.com
|
|
24
|
+
Project-URL: Documentation, https://basic-report.scholz-and-scholz.com
|
|
25
|
+
Project-URL: Repository, https://gitlab.com/Nablaquabla/basic-report
|
|
26
|
+
Project-URL: Issues, https://gitlab.com/Nablaquabla/basic-report/-/issues
|
|
27
|
+
Project-URL: Changelog, https://gitlab.com/Nablaquabla/basic-report/-/blob/main/CHANGELOG.md
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
|
|
30
|
+
# Basic Report
|
|
31
|
+
**basic-report** is a lightweight Python package for generating clean, professional static HTML reports with zero
|
|
32
|
+
external dependencies. Built using elements of Bootstrap 4 (MIT licensed) and datatables (MIT licensed), it empowers you
|
|
33
|
+
to create fully self-contained sites that can be served directly by any web server. The focus is set on simplicity - no
|
|
34
|
+
oversized web framework, no database, no setup required.
|
|
35
|
+
|
|
36
|
+
Design any reports entirely in Python using an intuitive top-to-bottom workflow. Simply add elements in the order they
|
|
37
|
+
should appear, and nest them naturally, e.g., tabs within columns, columns within tabs, or any combination you need. The
|
|
38
|
+
API follows the logical flow of your document, making more complex layouts straightforward to build.
|
|
39
|
+
|
|
40
|
+
Perfect for data scientists, analysts, and developers who need to create shareable, standalone reports without the
|
|
41
|
+
overhead of modern web frameworks.
|
|
42
|
+
|
|
43
|
+
## Quickstart
|
|
44
|
+
### Installation
|
|
45
|
+
|
|
46
|
+
Install the package from PyPI:
|
|
47
|
+
```bash
|
|
48
|
+
pip install basic-report
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
> [!tip]
|
|
52
|
+
> We recommend using [uv](https://github.com/astral-sh/uv) for faster, more reliable dependency management
|
|
53
|
+
>
|
|
54
|
+
> ```bash
|
|
55
|
+
> uv add basic-report
|
|
56
|
+
> ```
|
|
57
|
+
|
|
58
|
+
### A Minimal Working Example Report
|
|
59
|
+
|
|
60
|
+
The following example demonstrates the minimal setup required to generate a report including a report header:
|
|
61
|
+
|
|
62
|
+
```python
|
|
63
|
+
from basic_report import Report
|
|
64
|
+
|
|
65
|
+
# Create a new report
|
|
66
|
+
r = Report('output', 'Minimal Working Example', color_mode='light')
|
|
67
|
+
r.add_report_header()
|
|
68
|
+
r.add_text('This is a minimal working example')
|
|
69
|
+
|
|
70
|
+
# Generate the static site
|
|
71
|
+
r.dump()
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Executing this script creates the following directory structure:
|
|
75
|
+
```
|
|
76
|
+
output/
|
|
77
|
+
├── css_and_scripts/
|
|
78
|
+
└── index.html
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Open `index.html` in a web browser to view the report. No build step, compilation process, or server runtime is required.
|
|
82
|
+
The output is a fully self-contained static site ready for distribution.
|
|
83
|
+
|
|
84
|
+
**Next steps**: Follow the tutorial below to explore layouting and additional content or directly head over to the full
|
|
85
|
+
[https://basic-report.scholz-and-scholz.com](full documentation) for a complete overview of available components.
|
|
86
|
+
|
|
87
|
+
### Building A Proper Report
|
|
88
|
+
|
|
89
|
+
This example demonstrates a ever so slightly more realistic use case, showcasing how you actually stack components to
|
|
90
|
+
build your report.
|
|
91
|
+
|
|
92
|
+
#### Initialize Your Report
|
|
93
|
+
```python
|
|
94
|
+
import datetime
|
|
95
|
+
from pathlib import Path
|
|
96
|
+
from basic_report import Report
|
|
97
|
+
|
|
98
|
+
report_dir = Path('example_report')
|
|
99
|
+
report_name = 'System Status Report'
|
|
100
|
+
report_date = datetime.date.today()
|
|
101
|
+
|
|
102
|
+
r = Report(
|
|
103
|
+
report_dir,
|
|
104
|
+
report_name,
|
|
105
|
+
report_date,
|
|
106
|
+
color_mode='dark',
|
|
107
|
+
)
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
#### Add a Professional Header
|
|
111
|
+
Create a dominant header for your report. By default this header not only shows the name of the report, but also the
|
|
112
|
+
date given during initialization. Additionally it also shows a sub-text which tells you when *exactly* the report
|
|
113
|
+
files were created. However, you can easily deactivate the date options as follows:
|
|
114
|
+
|
|
115
|
+
```python
|
|
116
|
+
r.add_report_header(
|
|
117
|
+
include_date=False,
|
|
118
|
+
include_created_at=False,
|
|
119
|
+
color='steel',
|
|
120
|
+
)
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
#### Display Structured Status Information
|
|
124
|
+
|
|
125
|
+
Quickly surface critical information with color-coded status sections:
|
|
126
|
+
```python
|
|
127
|
+
errors = [
|
|
128
|
+
'Database connection timeout on rnd-server-03'
|
|
129
|
+
]
|
|
130
|
+
warnings = [
|
|
131
|
+
'Memory usage reached 75%',
|
|
132
|
+
'SSL certificate expires in 14 days',
|
|
133
|
+
]
|
|
134
|
+
info = [
|
|
135
|
+
'All backups completed successfully'
|
|
136
|
+
]
|
|
137
|
+
|
|
138
|
+
r.add_error_warning_info_section(errors=errors, warnings=warnings, info=info)
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
#### Create Multi-Column Layouts
|
|
142
|
+
|
|
143
|
+
Construct responsive, structured layouts using containers such as columns:
|
|
144
|
+
|
|
145
|
+
```python
|
|
146
|
+
r.add_header('Performance Metrics', color='muffin')
|
|
147
|
+
|
|
148
|
+
r.open_columns()
|
|
149
|
+
r.add_column()
|
|
150
|
+
r.add_text('Align text on the left', align='left')
|
|
151
|
+
r.add_column()
|
|
152
|
+
r.add_text('Align text in the center', color='cherry')
|
|
153
|
+
r.add_column()
|
|
154
|
+
r.add_text('Align text on the right', align='right')
|
|
155
|
+
r.close_columns()
|
|
156
|
+
```
|
|
157
|
+
**Layout pattern**: Open a container element (e.g., columns, tabs, accordions), add content sequentially, then
|
|
158
|
+
explicitly close the container. The library validates structural consistency and raises descriptive errors if elements
|
|
159
|
+
remain unclosed.
|
|
160
|
+
|
|
161
|
+
#### Create Multi-Page Reports
|
|
162
|
+
|
|
163
|
+
For larger reports, create and manage multiple pages:
|
|
164
|
+
|
|
165
|
+
```python
|
|
166
|
+
# Create and populate a second page
|
|
167
|
+
r.add_page('page2')
|
|
168
|
+
r['page2'].add_header('Detailed Metrics')
|
|
169
|
+
|
|
170
|
+
# Or set it as active and add content directly
|
|
171
|
+
r.set_current_page('page2')
|
|
172
|
+
r.add_text('Deep dive into performance trends...')
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
#### Add Navigation Links
|
|
176
|
+
|
|
177
|
+
Link pages to provide intuitive navigation:
|
|
178
|
+
|
|
179
|
+
```python
|
|
180
|
+
r.add_local_link_to_page('main', '← Back to Overview')
|
|
181
|
+
|
|
182
|
+
r.set_current_page('main')
|
|
183
|
+
r.add_local_link_to_page('page2', 'View Detailed Metrics →')
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
#### Generate Your Report
|
|
187
|
+
```python
|
|
188
|
+
r.dump()
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
The result is a multi-page, self-contained static site with structured layout, responsive design, and integrated
|
|
192
|
+
navigation. Everything generated entirely from Python code.
|
|
193
|
+
|
|
194
|
+

|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# Basic Report
|
|
2
|
+
**basic-report** is a lightweight Python package for generating clean, professional static HTML reports with zero
|
|
3
|
+
external dependencies. Built using elements of Bootstrap 4 (MIT licensed) and datatables (MIT licensed), it empowers you
|
|
4
|
+
to create fully self-contained sites that can be served directly by any web server. The focus is set on simplicity - no
|
|
5
|
+
oversized web framework, no database, no setup required.
|
|
6
|
+
|
|
7
|
+
Design any reports entirely in Python using an intuitive top-to-bottom workflow. Simply add elements in the order they
|
|
8
|
+
should appear, and nest them naturally, e.g., tabs within columns, columns within tabs, or any combination you need. The
|
|
9
|
+
API follows the logical flow of your document, making more complex layouts straightforward to build.
|
|
10
|
+
|
|
11
|
+
Perfect for data scientists, analysts, and developers who need to create shareable, standalone reports without the
|
|
12
|
+
overhead of modern web frameworks.
|
|
13
|
+
|
|
14
|
+
## Quickstart
|
|
15
|
+
### Installation
|
|
16
|
+
|
|
17
|
+
Install the package from PyPI:
|
|
18
|
+
```bash
|
|
19
|
+
pip install basic-report
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
> [!tip]
|
|
23
|
+
> We recommend using [uv](https://github.com/astral-sh/uv) for faster, more reliable dependency management
|
|
24
|
+
>
|
|
25
|
+
> ```bash
|
|
26
|
+
> uv add basic-report
|
|
27
|
+
> ```
|
|
28
|
+
|
|
29
|
+
### A Minimal Working Example Report
|
|
30
|
+
|
|
31
|
+
The following example demonstrates the minimal setup required to generate a report including a report header:
|
|
32
|
+
|
|
33
|
+
```python
|
|
34
|
+
from basic_report import Report
|
|
35
|
+
|
|
36
|
+
# Create a new report
|
|
37
|
+
r = Report('output', 'Minimal Working Example', color_mode='light')
|
|
38
|
+
r.add_report_header()
|
|
39
|
+
r.add_text('This is a minimal working example')
|
|
40
|
+
|
|
41
|
+
# Generate the static site
|
|
42
|
+
r.dump()
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Executing this script creates the following directory structure:
|
|
46
|
+
```
|
|
47
|
+
output/
|
|
48
|
+
├── css_and_scripts/
|
|
49
|
+
└── index.html
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Open `index.html` in a web browser to view the report. No build step, compilation process, or server runtime is required.
|
|
53
|
+
The output is a fully self-contained static site ready for distribution.
|
|
54
|
+
|
|
55
|
+
**Next steps**: Follow the tutorial below to explore layouting and additional content or directly head over to the full
|
|
56
|
+
[https://basic-report.scholz-and-scholz.com](full documentation) for a complete overview of available components.
|
|
57
|
+
|
|
58
|
+
### Building A Proper Report
|
|
59
|
+
|
|
60
|
+
This example demonstrates a ever so slightly more realistic use case, showcasing how you actually stack components to
|
|
61
|
+
build your report.
|
|
62
|
+
|
|
63
|
+
#### Initialize Your Report
|
|
64
|
+
```python
|
|
65
|
+
import datetime
|
|
66
|
+
from pathlib import Path
|
|
67
|
+
from basic_report import Report
|
|
68
|
+
|
|
69
|
+
report_dir = Path('example_report')
|
|
70
|
+
report_name = 'System Status Report'
|
|
71
|
+
report_date = datetime.date.today()
|
|
72
|
+
|
|
73
|
+
r = Report(
|
|
74
|
+
report_dir,
|
|
75
|
+
report_name,
|
|
76
|
+
report_date,
|
|
77
|
+
color_mode='dark',
|
|
78
|
+
)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
#### Add a Professional Header
|
|
82
|
+
Create a dominant header for your report. By default this header not only shows the name of the report, but also the
|
|
83
|
+
date given during initialization. Additionally it also shows a sub-text which tells you when *exactly* the report
|
|
84
|
+
files were created. However, you can easily deactivate the date options as follows:
|
|
85
|
+
|
|
86
|
+
```python
|
|
87
|
+
r.add_report_header(
|
|
88
|
+
include_date=False,
|
|
89
|
+
include_created_at=False,
|
|
90
|
+
color='steel',
|
|
91
|
+
)
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
#### Display Structured Status Information
|
|
95
|
+
|
|
96
|
+
Quickly surface critical information with color-coded status sections:
|
|
97
|
+
```python
|
|
98
|
+
errors = [
|
|
99
|
+
'Database connection timeout on rnd-server-03'
|
|
100
|
+
]
|
|
101
|
+
warnings = [
|
|
102
|
+
'Memory usage reached 75%',
|
|
103
|
+
'SSL certificate expires in 14 days',
|
|
104
|
+
]
|
|
105
|
+
info = [
|
|
106
|
+
'All backups completed successfully'
|
|
107
|
+
]
|
|
108
|
+
|
|
109
|
+
r.add_error_warning_info_section(errors=errors, warnings=warnings, info=info)
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
#### Create Multi-Column Layouts
|
|
113
|
+
|
|
114
|
+
Construct responsive, structured layouts using containers such as columns:
|
|
115
|
+
|
|
116
|
+
```python
|
|
117
|
+
r.add_header('Performance Metrics', color='muffin')
|
|
118
|
+
|
|
119
|
+
r.open_columns()
|
|
120
|
+
r.add_column()
|
|
121
|
+
r.add_text('Align text on the left', align='left')
|
|
122
|
+
r.add_column()
|
|
123
|
+
r.add_text('Align text in the center', color='cherry')
|
|
124
|
+
r.add_column()
|
|
125
|
+
r.add_text('Align text on the right', align='right')
|
|
126
|
+
r.close_columns()
|
|
127
|
+
```
|
|
128
|
+
**Layout pattern**: Open a container element (e.g., columns, tabs, accordions), add content sequentially, then
|
|
129
|
+
explicitly close the container. The library validates structural consistency and raises descriptive errors if elements
|
|
130
|
+
remain unclosed.
|
|
131
|
+
|
|
132
|
+
#### Create Multi-Page Reports
|
|
133
|
+
|
|
134
|
+
For larger reports, create and manage multiple pages:
|
|
135
|
+
|
|
136
|
+
```python
|
|
137
|
+
# Create and populate a second page
|
|
138
|
+
r.add_page('page2')
|
|
139
|
+
r['page2'].add_header('Detailed Metrics')
|
|
140
|
+
|
|
141
|
+
# Or set it as active and add content directly
|
|
142
|
+
r.set_current_page('page2')
|
|
143
|
+
r.add_text('Deep dive into performance trends...')
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
#### Add Navigation Links
|
|
147
|
+
|
|
148
|
+
Link pages to provide intuitive navigation:
|
|
149
|
+
|
|
150
|
+
```python
|
|
151
|
+
r.add_local_link_to_page('main', '← Back to Overview')
|
|
152
|
+
|
|
153
|
+
r.set_current_page('main')
|
|
154
|
+
r.add_local_link_to_page('page2', 'View Detailed Metrics →')
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
#### Generate Your Report
|
|
158
|
+
```python
|
|
159
|
+
r.dump()
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
The result is a multi-page, self-contained static site with structured layout, responsive design, and integrated
|
|
163
|
+
navigation. Everything generated entirely from Python code.
|
|
164
|
+
|
|
165
|
+

|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["uv_build>=0.10.4,<0.11.0"]
|
|
3
|
+
build-backend = "uv_build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "basic-report"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "A lightweight Python package for generating clean, professional static HTML reports."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
dependencies = [
|
|
12
|
+
"jinja2>=3.1.6",
|
|
13
|
+
"loguru>=0.7.3",
|
|
14
|
+
"pandas>=3.0.0",
|
|
15
|
+
"pyyaml>=6.0.3",
|
|
16
|
+
]
|
|
17
|
+
authors = [
|
|
18
|
+
{name = "Björn Scholz", email = "bjorn.scholz@gmail.com"},
|
|
19
|
+
]
|
|
20
|
+
maintainers = [
|
|
21
|
+
{name = "Björn Scholz", email = "bjorn.scholz@gmail.com"},
|
|
22
|
+
]
|
|
23
|
+
keywords = ["html", "report", "static", "responsive", "website"]
|
|
24
|
+
classifiers = [
|
|
25
|
+
"Development Status :: 4 - Beta",
|
|
26
|
+
"Intended Audience :: Developers",
|
|
27
|
+
"Intended Audience :: Science/Research",
|
|
28
|
+
"License :: OSI Approved :: MIT License",
|
|
29
|
+
"Operating System :: POSIX :: Linux",
|
|
30
|
+
"Programming Language :: Python :: 3",
|
|
31
|
+
]
|
|
32
|
+
license = "MIT"
|
|
33
|
+
license-files = ["LICENSE.md"]
|
|
34
|
+
|
|
35
|
+
[project.urls]
|
|
36
|
+
Homepage = "https://basic-report.scholz-and-scholz.com"
|
|
37
|
+
Documentation = "https://basic-report.scholz-and-scholz.com"
|
|
38
|
+
Repository = "https://gitlab.com/Nablaquabla/basic-report"
|
|
39
|
+
Issues = "https://gitlab.com/Nablaquabla/basic-report/-/issues"
|
|
40
|
+
Changelog = "https://gitlab.com/Nablaquabla/basic-report/-/blob/main/CHANGELOG.md"
|
|
41
|
+
|
|
42
|
+
[tool.ruff]
|
|
43
|
+
line-length = 120
|
|
44
|
+
indent-width = 4
|
|
45
|
+
target-version = 'py313'
|
|
46
|
+
extend-exclude = ["*.ipynb"]
|
|
47
|
+
|
|
48
|
+
[tool.ruff.format]
|
|
49
|
+
quote-style = "single"
|
|
50
|
+
indent-style = "space"
|
|
51
|
+
skip-magic-trailing-comma = false
|
|
52
|
+
|
|
53
|
+
[tool.ruff.lint.pydocstyle]
|
|
54
|
+
convention = 'google'
|
|
55
|
+
|
|
56
|
+
[tool.ruff.lint.flake8-quotes]
|
|
57
|
+
docstring-quotes = 'double'
|
|
58
|
+
inline-quotes = 'single'
|
|
59
|
+
|
|
60
|
+
[dependency-groups]
|
|
61
|
+
dev = [
|
|
62
|
+
"furo>=2025.12.19",
|
|
63
|
+
"myst-parser>=4.0.1",
|
|
64
|
+
"ruff>=0.15.0",
|
|
65
|
+
"sphinx>=9.0.0",
|
|
66
|
+
"sphinx-copybutton>=0.5.2",
|
|
67
|
+
]
|
|
68
|
+
|
|
69
|
+
[tool.ruff.lint]
|
|
70
|
+
select = [
|
|
71
|
+
'E', # pycodestyle errors
|
|
72
|
+
'W', # pycodestyle warnings
|
|
73
|
+
'F', # Pyflakes
|
|
74
|
+
'D', # pydocstyle
|
|
75
|
+
'B', # flake8-bugbear
|
|
76
|
+
'A', # flake8-builtins
|
|
77
|
+
'COM', # flake8-commas
|
|
78
|
+
'C4', # flake8-comprehensions
|
|
79
|
+
'EM', # flake8-errmsg
|
|
80
|
+
'ISC', # flake8-implicit-str-concat
|
|
81
|
+
'INP001', # flake8-no-pep420
|
|
82
|
+
'PIE', # flake8-pie
|
|
83
|
+
'T20', # flake8-print
|
|
84
|
+
'PYI', # flake8-pyi
|
|
85
|
+
'Q', # flake8-quotes
|
|
86
|
+
'RSE', # flake8-raise
|
|
87
|
+
'SLF', # flake8-self
|
|
88
|
+
'PTH', # flake8-use-pathlib
|
|
89
|
+
'SIM', # flake8-simplify
|
|
90
|
+
'S101', # Use of assert detected
|
|
91
|
+
'S102', # Use of exec detected
|
|
92
|
+
'S110', # try-except-pass detected, consider logging the exception
|
|
93
|
+
'S112', # try-except-continue detected, consider logging the exception
|
|
94
|
+
'FIX', # Line contains TODO
|
|
95
|
+
'ERA', # eradicate
|
|
96
|
+
'PL', # Pylint
|
|
97
|
+
'PERF', # Perflint
|
|
98
|
+
'RUF',
|
|
99
|
+
]
|
|
100
|
+
ignore = [
|
|
101
|
+
'D100', # Missing docstring in public module
|
|
102
|
+
'D104', # Missing docstring in public package
|
|
103
|
+
'D415', # First line should end with a period
|
|
104
|
+
'D416', # section-name-ends-in-colon
|
|
105
|
+
'D210', # Surrounding whitespaces
|
|
106
|
+
'SIM108', # Check for if-else-blocks that can be replaced with a ternary operator.
|
|
107
|
+
'PTH123', # open()` should be replaced by `Path.open()
|
|
108
|
+
'PLR091', # Too many x
|
|
109
|
+
'PLR1714', # Consider merging multiple comparisons
|
|
110
|
+
'PERF401', # Use a list comprehension to create a transformed list
|
|
111
|
+
'PERF203', # Checks for uses of except handling via try-except within for and while loops.
|
|
112
|
+
'RUF005', # Consider `[*arr, 'new_item']` instead of concatenation
|
|
113
|
+
]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
# Make the package dir available in the module
|
|
4
|
+
PACKAGE_DIR = Path(__file__).parent
|
|
5
|
+
PACKAGE_NAME = PACKAGE_DIR.name
|
|
6
|
+
CONFIG_DIR = PACKAGE_DIR / 'configs'
|
|
7
|
+
TEMPLATE_DIR = PACKAGE_DIR / 'templates'
|
|
8
|
+
SCRIPTS_DIR = PACKAGE_DIR / 'css_and_scripts'
|
|
9
|
+
|
|
10
|
+
from .report import Report as Report #noqa: E402
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
timezone: 'Europe/Berlin'
|
|
2
|
+
|
|
3
|
+
css:
|
|
4
|
+
site:
|
|
5
|
+
dark:
|
|
6
|
+
site_face_color: '#fefefa'
|
|
7
|
+
site_background_color: '#1f1f1f'
|
|
8
|
+
light:
|
|
9
|
+
site_face_color: '#1f1f1f'
|
|
10
|
+
site_background_color: '#fefefa'
|
|
11
|
+
|
|
12
|
+
tabs:
|
|
13
|
+
dark:
|
|
14
|
+
tab_border_bottom_color: '#414951'
|
|
15
|
+
tab_border_bottom_size: '2px'
|
|
16
|
+
tab_inactive_font_color: '#7a848c'
|
|
17
|
+
tab_inactive_font_weight: 'lighter'
|
|
18
|
+
tab_hover_font_color: '#dae2ef'
|
|
19
|
+
tab_active_font_color: '#dae2ef'
|
|
20
|
+
tab_active_font_weight: 'bolder'
|
|
21
|
+
tab_active_background_color: 'none'
|
|
22
|
+
tab_active_border_bottom_color: '#dae2ef'
|
|
23
|
+
tab_active_border_bottom_size: '2px'
|
|
24
|
+
light:
|
|
25
|
+
tab_border_bottom_color: '#abb1bc'
|
|
26
|
+
tab_border_bottom_size: '2px'
|
|
27
|
+
tab_inactive_font_color: '#abb1bc'
|
|
28
|
+
tab_inactive_font_weight: 'lighter'
|
|
29
|
+
tab_hover_font_color: '#414951'
|
|
30
|
+
tab_active_font_color: '#414951'
|
|
31
|
+
tab_active_font_weight: 'bolder'
|
|
32
|
+
tab_active_background_color: 'none'
|
|
33
|
+
tab_active_border_bottom_color: '#414951'
|
|
34
|
+
tab_active_border_bottom_size: '2px'
|
|
35
|
+
|
|
36
|
+
accordion:
|
|
37
|
+
dark:
|
|
38
|
+
accordion_border_color: '#414951'
|
|
39
|
+
accordion_border_size: '1px'
|
|
40
|
+
accordion_link_color: '#dae2ef'
|
|
41
|
+
accordion_header_background_color: '#2a2d2e'
|
|
42
|
+
accordion_body_top_border_color: '#dae2ef'
|
|
43
|
+
accordion_body_top_border_size: '1px'
|
|
44
|
+
accordion_body_background_color: '#313131'
|
|
45
|
+
accordion_body_font_color: '#dae2ef'
|
|
46
|
+
light:
|
|
47
|
+
accordion_border_color: '#cbcbc7'
|
|
48
|
+
accordion_border_size: '1px'
|
|
49
|
+
accordion_link_color: '#91989d'
|
|
50
|
+
accordion_header_background_color: '#f1f1ed'
|
|
51
|
+
accordion_body_top_border_color: '#bebeba'
|
|
52
|
+
accordion_body_top_border_size: '1px'
|
|
53
|
+
accordion_body_background_color: '#fefffa'
|
|
54
|
+
accordion_body_font_color: '#828995'
|
|
55
|
+
|
|
56
|
+
table:
|
|
57
|
+
dark:
|
|
58
|
+
table_controls_background_color: '#2a2d2e'
|
|
59
|
+
table_controls_border_color: '#555'
|
|
60
|
+
table_controls_font_color: '#dae2ef'
|
|
61
|
+
table_pagination_border_color: '#313131'
|
|
62
|
+
table_pagination_hover_border_color: '#66b2ff'
|
|
63
|
+
table_pagination_hover_font_color: '#66b2ff'
|
|
64
|
+
table_pagination_active_background_color: '#66b2ff'
|
|
65
|
+
table_pagination_active_border_color: '#66b2ff'
|
|
66
|
+
table_pagination_active_font_color: '#000'
|
|
67
|
+
light:
|
|
68
|
+
table_controls_background_color: '#f1f1ed'
|
|
69
|
+
table_controls_border_color: '#dee2e6'
|
|
70
|
+
table_controls_font_color: '#414951'
|
|
71
|
+
table_pagination_border_color: '#313131'
|
|
72
|
+
table_pagination_hover_border_color: '#66b2ff'
|
|
73
|
+
table_pagination_hover_font_color: '#66b2ff'
|
|
74
|
+
table_pagination_active_background_color: '#66b2ff'
|
|
75
|
+
table_pagination_active_border_color: '#66b2ff'
|
|
76
|
+
table_pagination_active_font_color: '#000'
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
default_color_profiles:
|
|
80
|
+
dark:
|
|
81
|
+
report_header: steel
|
|
82
|
+
header: slate
|
|
83
|
+
sub-header: slate
|
|
84
|
+
table: slate
|
|
85
|
+
report_ball: slate
|
|
86
|
+
text: slate
|
|
87
|
+
navbar: slate
|
|
88
|
+
light:
|
|
89
|
+
report_header: steel
|
|
90
|
+
header: slate
|
|
91
|
+
sub-header: slate
|
|
92
|
+
table: slate
|
|
93
|
+
report_ball: slate
|
|
94
|
+
text: slate
|
|
95
|
+
navbar: slate
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
custom_colors:
|
|
99
|
+
slate:
|
|
100
|
+
border_dark: '#101416'
|
|
101
|
+
border_light: '#2c353a'
|
|
102
|
+
font_and_background: '#708090'
|
|
103
|
+
face_color: '#fff0f3'
|
|
104
|
+
link: '#abc4dc'
|
|
105
|
+
hover: '#374550'
|
|
106
|
+
|
|
107
|
+
cappuccino:
|
|
108
|
+
border_dark: '#1e1611'
|
|
109
|
+
border_light: '#63493a'
|
|
110
|
+
font_and_background: '#c09881'
|
|
111
|
+
face_color: '#edede9'
|
|
112
|
+
link: '#ffc394'
|
|
113
|
+
hover: '#1e1611'
|
|
114
|
+
|
|
115
|
+
forest:
|
|
116
|
+
border_dark: '#181818`'
|
|
117
|
+
border_light: '#374d37'
|
|
118
|
+
font_and_background: '#5d805d'
|
|
119
|
+
face_color: '#edede9'
|
|
120
|
+
link: '#c2c5aa'
|
|
121
|
+
hover: '#253325'
|
|
122
|
+
|
|
123
|
+
ocean:
|
|
124
|
+
border_dark: '#a9d6e5`'
|
|
125
|
+
border_light: '#012a4a'
|
|
126
|
+
font_and_background: '#2a6f97'
|
|
127
|
+
face_color: '#edede9'
|
|
128
|
+
link: '#a9d6e5'
|
|
129
|
+
hover: '#14364a'
|
|
130
|
+
|
|
131
|
+
cherry:
|
|
132
|
+
border_dark: '#fff0f3`'
|
|
133
|
+
border_light: '#590d22'
|
|
134
|
+
font_and_background: '#c9184a'
|
|
135
|
+
face_color: '#fff0f3'
|
|
136
|
+
link: '#ff8fa3'
|
|
137
|
+
hover: '#800f2f'
|
|
138
|
+
|
|
139
|
+
earth:
|
|
140
|
+
border_dark: '#100907'
|
|
141
|
+
border_light: '#44291e'
|
|
142
|
+
font_and_background: '#9d6b53'
|
|
143
|
+
face_color: '#fff0f3'
|
|
144
|
+
link: '#e6b8a2'
|
|
145
|
+
hover: '#50362a'
|
|
146
|
+
|
|
147
|
+
sunset:
|
|
148
|
+
border_dark: '#24100d'
|
|
149
|
+
border_light: '#582820'
|
|
150
|
+
font_and_background: '#f25c54'
|
|
151
|
+
face_color: '#fff0f3'
|
|
152
|
+
link: '#ffc16a'
|
|
153
|
+
hover: '#582820'
|
|
154
|
+
|
|
155
|
+
sunrise:
|
|
156
|
+
border_dark: '#251b0e'
|
|
157
|
+
border_light: '#634927'
|
|
158
|
+
font_and_background: '#f3b360'
|
|
159
|
+
face_color: '#fff'
|
|
160
|
+
link: '#ffe2bd'
|
|
161
|
+
hover: '#eb6758'
|
|
162
|
+
|
|
163
|
+
steel:
|
|
164
|
+
border_dark: '#17191c'
|
|
165
|
+
border_light: '#212529'
|
|
166
|
+
font_and_background: '#495057'
|
|
167
|
+
face_color: '#fff0f3'
|
|
168
|
+
link: '#ced4da'
|
|
169
|
+
hover: '#212529'
|
|
170
|
+
|
|
171
|
+
ice:
|
|
172
|
+
border_dark: '#0d161c'
|
|
173
|
+
border_light: '#6a9bc2'
|
|
174
|
+
font_and_background: '#f0f8ff'
|
|
175
|
+
face_color: '#4a7b9d'
|
|
176
|
+
link: '#a6b5c5'
|
|
177
|
+
hover: '#d2e4f9'
|
|
178
|
+
|
|
179
|
+
parchment:
|
|
180
|
+
border_dark: '#3e2f22'
|
|
181
|
+
border_light: '#cca67a'
|
|
182
|
+
font_and_background: '#fefbe3'
|
|
183
|
+
face_color: '#8b6a4d'
|
|
184
|
+
link: '#cca67a'
|
|
185
|
+
hover: '#e1cdad'
|