flexablelib 3.5.0__tar.gz → 3.5.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.
- {flexablelib-3.5.0 → flexablelib-3.5.1}/CHANGELOG.md +15 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/PKG-INFO +9 -9
- {flexablelib-3.5.0 → flexablelib-3.5.1}/flexablelib.egg-info/PKG-INFO +9 -9
- {flexablelib-3.5.0 → flexablelib-3.5.1}/flexablelib.egg-info/SOURCES.txt +2 -1
- flexablelib-3.5.1/flexablelib.egg-info/requires.txt +35 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/package.json +1 -1
- flexablelib-3.5.1/tools/wheel_check.py +85 -0
- flexablelib-3.5.0/flexablelib.egg-info/requires.txt +0 -35
- {flexablelib-3.5.0 → flexablelib-3.5.1}/.coveragerc +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/LICENSE +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/MANIFEST.in +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/README.md +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/examples/admin.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/examples/dashboard.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/examples/keys.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/flexablelib/__init__.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/flexablelib/_frames.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/flexablelib/_images.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/flexablelib/_legacy/__init__.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/flexablelib/_legacy/screen.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/flexablelib/_legacy/widgets.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/flexablelib/_speedups.c +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/flexablelib/_width_tables.h +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/flexablelib/box_topology.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/flexablelib/cells.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/flexablelib/colors.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/flexablelib/columns.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/flexablelib/fast.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/flexablelib/identifiers.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/flexablelib/layout.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/flexablelib/merges.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/flexablelib/options.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/flexablelib/py.typed +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/flexablelib/readers.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/flexablelib/screen.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/flexablelib/style_compositions.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/flexablelib/table.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/flexablelib/table_strings.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/flexablelib/text_width.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/flexablelib/utils.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/flexablelib/widgets.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/flexablelib/writers.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/flexablelib.egg-info/dependency_links.txt +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/flexablelib.egg-info/top_level.txt +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/pytest.ini +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/setup.cfg +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/setup.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/style_examples.md +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/conftest.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/helpers.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_align_indicators.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_box_topology.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_cells.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_columns.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_excel.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_features.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_issues.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_merge_edge_matrix.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_merge_fill.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_merges.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_public_api_edges.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_readme_examples.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_stress_matrix.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_style_line_widths.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_styles.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_text_width.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_two_pass_measurement.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_upstream_issues.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v2021_fixes.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v210_rows_copy.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v2110_fixes.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v211_fixes.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v213_features.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v214_features.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v215_features.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v216_features.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v217_features.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v218_features.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v219_coverage.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v219_fixes.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v220_exports.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v221_fixes.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v222_fixes.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v223_fixes.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v224_fixes.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v230_none.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v231_fixes.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v232_merge_ansi.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v300_style_names.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v310_layout.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v320_tui.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v330_components.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v330_frames.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v330_layout.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v330_tui.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v331_formats.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v331_panel_width.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v331_readers_bom.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v331_readers_edges.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v331_tabs.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v340_accessibility.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v340_core.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v340_input.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v350_images.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/test_v350_images_core.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tests/wincon_child.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tools/bench_frames.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tools/bench_images.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tools/benchmark.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tools/gen_ascii_table.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tools/generate_width_tables.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tools/image_demo.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tools/pty_check.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tools/readme_gallery.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tools/stress_matrix.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tools/style_examples.py +0 -0
- {flexablelib-3.5.0 → flexablelib-3.5.1}/tools/text_to_png.py +0 -0
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [3.5.1] - 2026-11-12
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **Linux aarch64 (arm64) wheels** for `flexablelib` and
|
|
9
|
+
`flexablelib-speedups`, glibc (manylinux) and musl (musllinux/Alpine),
|
|
10
|
+
CPython 3.8–3.14, built and tested on native arm64 runners.
|
|
11
|
+
- **macOS Intel (x86_64) wheels** for both projects, CPython 3.8–3.14.
|
|
12
|
+
- Every wheel is checked on its own architecture by `tools/wheel_check.py`:
|
|
13
|
+
the C extension loads and matches the pure Python code (text measurement,
|
|
14
|
+
frame primitives, picture resize/quantize/sixel/blocks) on random input.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
- 49 binary wheels per extension project (was 28): manylinux and musllinux
|
|
18
|
+
for x86_64 and aarch64, Windows x64, macOS arm64 and x86_64.
|
|
19
|
+
|
|
5
20
|
## [3.5.0] - 2026-11-12
|
|
6
21
|
|
|
7
22
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flexablelib
|
|
3
|
-
Version: 3.5.
|
|
3
|
+
Version: 3.5.1
|
|
4
4
|
Summary: Fast, dependency-free terminal tables for Python: 54 border styles, ANSI colors, cell merges, decimal alignment, width fitting, and CSV/Markdown/HTML/Excel/LaTeX I/O.
|
|
5
5
|
Home-page: https://github.com/Opus-Perpetuus/flexablelib
|
|
6
6
|
Author: Benjamin Ramirez
|
|
@@ -46,15 +46,15 @@ Requires-Dist: openpyxl>=3.0; extra == "excel"
|
|
|
46
46
|
Provides-Extra: html
|
|
47
47
|
Requires-Dist: lxml>=4.0; extra == "html"
|
|
48
48
|
Provides-Extra: tui
|
|
49
|
-
Requires-Dist: flexablelib-tui==3.5.
|
|
49
|
+
Requires-Dist: flexablelib-tui==3.5.1; extra == "tui"
|
|
50
50
|
Provides-Extra: components
|
|
51
|
-
Requires-Dist: flexablelib-components==3.5.
|
|
51
|
+
Requires-Dist: flexablelib-components==3.5.1; extra == "components"
|
|
52
52
|
Provides-Extra: speed
|
|
53
|
-
Requires-Dist: flexablelib-speedups==3.5.
|
|
53
|
+
Requires-Dist: flexablelib-speedups==3.5.1; extra == "speed"
|
|
54
54
|
Provides-Extra: images
|
|
55
55
|
Requires-Dist: Pillow>=8; extra == "images"
|
|
56
|
-
Requires-Dist: flexablelib-tui==3.5.
|
|
57
|
-
Requires-Dist: flexablelib-components==3.5.
|
|
56
|
+
Requires-Dist: flexablelib-tui==3.5.1; extra == "images"
|
|
57
|
+
Requires-Dist: flexablelib-components==3.5.1; extra == "images"
|
|
58
58
|
Provides-Extra: svg
|
|
59
59
|
Requires-Dist: cairosvg>=2.5; extra == "svg"
|
|
60
60
|
Provides-Extra: all
|
|
@@ -62,9 +62,9 @@ Requires-Dist: pandas>=1.0; extra == "all"
|
|
|
62
62
|
Requires-Dist: openpyxl>=3.0; extra == "all"
|
|
63
63
|
Requires-Dist: lxml>=4.0; extra == "all"
|
|
64
64
|
Requires-Dist: Pillow>=8; extra == "all"
|
|
65
|
-
Requires-Dist: flexablelib-tui==3.5.
|
|
66
|
-
Requires-Dist: flexablelib-components==3.5.
|
|
67
|
-
Requires-Dist: flexablelib-speedups==3.5.
|
|
65
|
+
Requires-Dist: flexablelib-tui==3.5.1; extra == "all"
|
|
66
|
+
Requires-Dist: flexablelib-components==3.5.1; extra == "all"
|
|
67
|
+
Requires-Dist: flexablelib-speedups==3.5.1; extra == "all"
|
|
68
68
|
Dynamic: author
|
|
69
69
|
Dynamic: author-email
|
|
70
70
|
Dynamic: classifier
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flexablelib
|
|
3
|
-
Version: 3.5.
|
|
3
|
+
Version: 3.5.1
|
|
4
4
|
Summary: Fast, dependency-free terminal tables for Python: 54 border styles, ANSI colors, cell merges, decimal alignment, width fitting, and CSV/Markdown/HTML/Excel/LaTeX I/O.
|
|
5
5
|
Home-page: https://github.com/Opus-Perpetuus/flexablelib
|
|
6
6
|
Author: Benjamin Ramirez
|
|
@@ -46,15 +46,15 @@ Requires-Dist: openpyxl>=3.0; extra == "excel"
|
|
|
46
46
|
Provides-Extra: html
|
|
47
47
|
Requires-Dist: lxml>=4.0; extra == "html"
|
|
48
48
|
Provides-Extra: tui
|
|
49
|
-
Requires-Dist: flexablelib-tui==3.5.
|
|
49
|
+
Requires-Dist: flexablelib-tui==3.5.1; extra == "tui"
|
|
50
50
|
Provides-Extra: components
|
|
51
|
-
Requires-Dist: flexablelib-components==3.5.
|
|
51
|
+
Requires-Dist: flexablelib-components==3.5.1; extra == "components"
|
|
52
52
|
Provides-Extra: speed
|
|
53
|
-
Requires-Dist: flexablelib-speedups==3.5.
|
|
53
|
+
Requires-Dist: flexablelib-speedups==3.5.1; extra == "speed"
|
|
54
54
|
Provides-Extra: images
|
|
55
55
|
Requires-Dist: Pillow>=8; extra == "images"
|
|
56
|
-
Requires-Dist: flexablelib-tui==3.5.
|
|
57
|
-
Requires-Dist: flexablelib-components==3.5.
|
|
56
|
+
Requires-Dist: flexablelib-tui==3.5.1; extra == "images"
|
|
57
|
+
Requires-Dist: flexablelib-components==3.5.1; extra == "images"
|
|
58
58
|
Provides-Extra: svg
|
|
59
59
|
Requires-Dist: cairosvg>=2.5; extra == "svg"
|
|
60
60
|
Provides-Extra: all
|
|
@@ -62,9 +62,9 @@ Requires-Dist: pandas>=1.0; extra == "all"
|
|
|
62
62
|
Requires-Dist: openpyxl>=3.0; extra == "all"
|
|
63
63
|
Requires-Dist: lxml>=4.0; extra == "all"
|
|
64
64
|
Requires-Dist: Pillow>=8; extra == "all"
|
|
65
|
-
Requires-Dist: flexablelib-tui==3.5.
|
|
66
|
-
Requires-Dist: flexablelib-components==3.5.
|
|
67
|
-
Requires-Dist: flexablelib-speedups==3.5.
|
|
65
|
+
Requires-Dist: flexablelib-tui==3.5.1; extra == "all"
|
|
66
|
+
Requires-Dist: flexablelib-components==3.5.1; extra == "all"
|
|
67
|
+
Requires-Dist: flexablelib-speedups==3.5.1; extra == "all"
|
|
68
68
|
Dynamic: author
|
|
69
69
|
Dynamic: author-email
|
|
70
70
|
Dynamic: classifier
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
|
|
2
|
+
[all]
|
|
3
|
+
pandas>=1.0
|
|
4
|
+
openpyxl>=3.0
|
|
5
|
+
lxml>=4.0
|
|
6
|
+
Pillow>=8
|
|
7
|
+
flexablelib-tui==3.5.1
|
|
8
|
+
flexablelib-components==3.5.1
|
|
9
|
+
flexablelib-speedups==3.5.1
|
|
10
|
+
|
|
11
|
+
[components]
|
|
12
|
+
flexablelib-components==3.5.1
|
|
13
|
+
|
|
14
|
+
[excel]
|
|
15
|
+
openpyxl>=3.0
|
|
16
|
+
|
|
17
|
+
[html]
|
|
18
|
+
lxml>=4.0
|
|
19
|
+
|
|
20
|
+
[images]
|
|
21
|
+
Pillow>=8
|
|
22
|
+
flexablelib-tui==3.5.1
|
|
23
|
+
flexablelib-components==3.5.1
|
|
24
|
+
|
|
25
|
+
[pandas]
|
|
26
|
+
pandas>=1.0
|
|
27
|
+
|
|
28
|
+
[speed]
|
|
29
|
+
flexablelib-speedups==3.5.1
|
|
30
|
+
|
|
31
|
+
[svg]
|
|
32
|
+
cairosvg>=2.5
|
|
33
|
+
|
|
34
|
+
[tui]
|
|
35
|
+
flexablelib-tui==3.5.1
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"""Check an installed wheel: the C extension loads and gives the same results
|
|
2
|
+
as the pure Python code on random input. Run by cibuildwheel on every
|
|
3
|
+
architecture: ``python tools/wheel_check.py core`` (flexablelib) or
|
|
4
|
+
``python tools/wheel_check.py speedups`` (flexablelib-speedups)."""
|
|
5
|
+
|
|
6
|
+
import platform
|
|
7
|
+
import random
|
|
8
|
+
import sys
|
|
9
|
+
|
|
10
|
+
PIECES = ['a', 'Z', '7', ' ', 'ñ', 'é', '漢', '字', '😀', '👍🏽', 'e\u0301',
|
|
11
|
+
'\u200d', '\t', '│', '─', '╭', '→', '✓', '\x1b[1m', '\x1b[31m',
|
|
12
|
+
'\x1b[0m', '\x1b[38;2;1;2;3m', '\x1b]8;;http://x\x1b\\', '\x1b]8;;\x1b\\']
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def text(rnd, n=None):
|
|
16
|
+
return ''.join(rnd.choice(PIECES) for _ in range(n or rnd.randint(0, 30)))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def check_core(rnd):
|
|
20
|
+
from flexablelib import _speedups as c # must be the compiled module
|
|
21
|
+
from flexablelib import text_width as py
|
|
22
|
+
from flexablelib.fast import ACCELERATED
|
|
23
|
+
assert ACCELERATED, 'flexablelib C extension not active'
|
|
24
|
+
for _ in range(3000):
|
|
25
|
+
s = text(rnd)
|
|
26
|
+
assert c.visible_width(s) == py.visible_width(s), repr(s)
|
|
27
|
+
assert c.strip_ansi(s) == py.strip_ansi(s), repr(s)
|
|
28
|
+
w = rnd.randint(0, 40)
|
|
29
|
+
align = rnd.choice('lrc')
|
|
30
|
+
assert c.pad_to_width(s, w, align) == py.pad_to_width(s, w, align), \
|
|
31
|
+
(repr(s), w, align)
|
|
32
|
+
batch = [text(rnd) for _ in range(50)]
|
|
33
|
+
assert c.widths_of(batch) == [py.visible_width(s) for s in batch]
|
|
34
|
+
return 'core: C text measurement == Python (3000 random strings)'
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def check_speedups(rnd):
|
|
38
|
+
from flexablelib import _frames as F, _images as I
|
|
39
|
+
assert F.available() and F.use('c') == 'c', 'C frame code not active'
|
|
40
|
+
assert 'c' in I.available(), 'C picture code not active'
|
|
41
|
+
C = F._C
|
|
42
|
+
for _ in range(1500):
|
|
43
|
+
s = text(rnd)
|
|
44
|
+
w = rnd.randint(0, 40)
|
|
45
|
+
for name, args in (('visible_width', (s,)), ('strip_ansi', (s,)),
|
|
46
|
+
('truncate', (s, w)), ('fit_line', (s, w)),
|
|
47
|
+
('slice_columns', (s, rnd.randint(0, 10), w)),
|
|
48
|
+
('ascii_fold', (s,))):
|
|
49
|
+
if name in C:
|
|
50
|
+
assert C[name](*args) == F._PYTHON[name](*args), (name, args)
|
|
51
|
+
old = [text(rnd) for _ in range(20)]
|
|
52
|
+
new = [t if rnd.random() < .6 else text(rnd) for t in old]
|
|
53
|
+
assert C['render_diff'](old, new) == F._PYTHON['render_diff'](old, new)
|
|
54
|
+
n = 0
|
|
55
|
+
for _ in range(40):
|
|
56
|
+
w, h = rnd.randint(1, 24), rnd.randint(1, 18)
|
|
57
|
+
data = bytes(rnd.randrange(256) for _ in range(w * h * 4))
|
|
58
|
+
nw, nh = rnd.randint(1, 30), rnd.randint(1, 30)
|
|
59
|
+
assert I._C.resize(data, w, h, nw, nh) == \
|
|
60
|
+
I._py_resize(data, w, h, nw, nh)
|
|
61
|
+
colors = rnd.choice([2, 16, 255])
|
|
62
|
+
q = I._py_quantize(data, w, h, colors, 128)
|
|
63
|
+
assert I._C.quantize(data, w, h, colors, 128) == q
|
|
64
|
+
assert I._C.sixel_encode(q[1], w, h, q[0]) == \
|
|
65
|
+
I._py_sixel_encode(q[1], w, h, q[0])
|
|
66
|
+
for mode in ('half', 'quadrant', 'sextant', 'braille', 'ascii'):
|
|
67
|
+
for color in ('truecolor', '256', '16', 'none'):
|
|
68
|
+
assert I._C.cells(data, w, h, mode, color, 128) == \
|
|
69
|
+
I._py_cells(data, w, h, mode, color, 128), (mode, color)
|
|
70
|
+
n += 1
|
|
71
|
+
return ('speedups: C frames == Python (1500 strings), C pictures == '
|
|
72
|
+
'Python ({0} random pictures)'.format(n))
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def main(argv):
|
|
76
|
+
rnd = random.Random(2026)
|
|
77
|
+
what = argv[1] if len(argv) > 1 else 'core'
|
|
78
|
+
result = check_core(rnd) if what == 'core' else check_speedups(rnd)
|
|
79
|
+
print('{0} [{1} {2}, Python {3}]'.format(
|
|
80
|
+
result, platform.system(), platform.machine(),
|
|
81
|
+
platform.python_version()))
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
if __name__ == '__main__':
|
|
85
|
+
main(sys.argv)
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
[all]
|
|
3
|
-
pandas>=1.0
|
|
4
|
-
openpyxl>=3.0
|
|
5
|
-
lxml>=4.0
|
|
6
|
-
Pillow>=8
|
|
7
|
-
flexablelib-tui==3.5.0
|
|
8
|
-
flexablelib-components==3.5.0
|
|
9
|
-
flexablelib-speedups==3.5.0
|
|
10
|
-
|
|
11
|
-
[components]
|
|
12
|
-
flexablelib-components==3.5.0
|
|
13
|
-
|
|
14
|
-
[excel]
|
|
15
|
-
openpyxl>=3.0
|
|
16
|
-
|
|
17
|
-
[html]
|
|
18
|
-
lxml>=4.0
|
|
19
|
-
|
|
20
|
-
[images]
|
|
21
|
-
Pillow>=8
|
|
22
|
-
flexablelib-tui==3.5.0
|
|
23
|
-
flexablelib-components==3.5.0
|
|
24
|
-
|
|
25
|
-
[pandas]
|
|
26
|
-
pandas>=1.0
|
|
27
|
-
|
|
28
|
-
[speed]
|
|
29
|
-
flexablelib-speedups==3.5.0
|
|
30
|
-
|
|
31
|
-
[svg]
|
|
32
|
-
cairosvg>=2.5
|
|
33
|
-
|
|
34
|
-
[tui]
|
|
35
|
-
flexablelib-tui==3.5.0
|
|
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
|
|
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
|
|
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
|