headson 0.5.1__cp310-abi3-macosx_11_0_arm64.whl → 0.5.3__cp310-abi3-macosx_11_0_arm64.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 headson might be problematic. Click here for more details.
- headson/headson.abi3.so +0 -0
- {headson-0.5.1.dist-info → headson-0.5.3.dist-info}/METADATA +6 -39
- headson-0.5.3.dist-info/RECORD +6 -0
- headson-0.5.1.dist-info/RECORD +0 -6
- {headson-0.5.1.dist-info → headson-0.5.3.dist-info}/WHEEL +0 -0
- {headson-0.5.1.dist-info → headson-0.5.3.dist-info}/licenses/LICENSE +0 -0
headson/headson.abi3.so
CHANGED
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: headson
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.3
|
|
4
4
|
Classifier: Programming Language :: Python
|
|
5
5
|
Classifier: Programming Language :: Python :: 3
|
|
6
6
|
Classifier: Programming Language :: Rust
|
|
@@ -58,8 +58,9 @@ If you’re comfortable with tools like `head` and `tail`, use `headson` when yo
|
|
|
58
58
|
|
|
59
59
|
Common flags:
|
|
60
60
|
|
|
61
|
-
- `-n, --budget <BYTES>`: per‑file output budget. When multiple input files are provided, the total budget equals `<BYTES> * number_of_inputs`.
|
|
62
|
-
- `-N, --global-budget <BYTES>`: total output budget across all inputs. Useful when you want a fixed-size preview across many files (may omit entire files).
|
|
61
|
+
- `-n, --budget <BYTES>`: per‑file output budget. When multiple input files are provided, the default total budget equals `<BYTES> * number_of_inputs`.
|
|
62
|
+
- `-N, --global-budget <BYTES>`: total output budget across all inputs. Useful when you want a fixed-size preview across many files (may omit entire files).
|
|
63
|
+
- When used together with `--budget`, the final total budget is `min(global, per_file * number_of_inputs)`. Files are only truncated if they don't fit into this final global limit, and no single file expands beyond the per‑file budget.
|
|
63
64
|
- `-f, --template <json|pseudo|js>`: output style (default: `pseudo`)
|
|
64
65
|
- `-m, --compact`: no indentation, no spaces, no newlines
|
|
65
66
|
- `--no-newline`: single line output
|
|
@@ -167,48 +168,14 @@ print(
|
|
|
167
168
|
|
|
168
169
|
# Algorithm
|
|
169
170
|
|
|
170
|
-
|
|
171
|
-
%%{init: {"themeCSS": ".cluster > rect { fill: transparent; stroke: transparent; } .clusterLabel > text { font-size: 16px; font-weight: 600; } .clusterLabel span { padding: 6px 10px; font-size: 16px; font-weight: 600; }"}}%%
|
|
172
|
-
flowchart TD
|
|
173
|
-
subgraph Deserialization
|
|
174
|
-
direction TB
|
|
175
|
-
A["Input file(s)"]
|
|
176
|
-
A -- Single --> C["Parse into optimized tree (with array pre‑sampling) ¹"]
|
|
177
|
-
A -- Multiple --> D["Parse each file and wrap into a fileset object"]
|
|
178
|
-
D --> C
|
|
179
|
-
end
|
|
180
|
-
subgraph Prioritization
|
|
181
|
-
direction TB
|
|
182
|
-
E["Build priority order ²"]
|
|
183
|
-
F["Choose top N nodes ³"]
|
|
184
|
-
end
|
|
185
|
-
subgraph Serialization
|
|
186
|
-
direction TB
|
|
187
|
-
G["Render attempt ⁴"]
|
|
188
|
-
H["Output preview string"]
|
|
189
|
-
end
|
|
190
|
-
C --> E
|
|
191
|
-
E --> F
|
|
192
|
-
F --> G
|
|
193
|
-
G --> F
|
|
194
|
-
F --> H
|
|
195
|
-
%% Color classes for categories
|
|
196
|
-
classDef des fill:#eaf2ff,stroke:#3b82f6,stroke-width:1px,color:#0f172a;
|
|
197
|
-
classDef prio fill:#ecfdf5,stroke:#10b981,stroke-width:1px,color:#064e3b;
|
|
198
|
-
classDef ser fill:#fff1f2,stroke:#f43f5e,stroke-width:1px,color:#7f1d1d;
|
|
199
|
-
class A,C,D des;
|
|
200
|
-
class E,F prio;
|
|
201
|
-
class G,H ser;
|
|
202
|
-
style Deserialization fill:transparent,stroke:transparent
|
|
203
|
-
style Prioritization fill:transparent,stroke:transparent
|
|
204
|
-
style Serialization fill:transparent,stroke:transparent
|
|
205
|
-
```
|
|
171
|
+

|
|
206
172
|
|
|
207
173
|
## Footnotes
|
|
208
174
|
- <sup><b>[1]</b></sup> <b>Optimized tree representation</b>: An arena‑style tree stored in flat, contiguous buffers. Each node records its kind and value plus index ranges into shared child and key arrays. Arrays are ingested in a single pass and may be deterministically pre‑sampled: the first element is always kept; additional elements are selected via a fixed per‑index inclusion test; for kept elements, original indices are stored and full lengths are counted. This enables accurate omission info and internal gap markers later, while minimizing pointer chasing.
|
|
209
175
|
- <sup><b>[2]</b></sup> <b>Priority order</b>: Nodes are scored so previews surface representative structure and values first. Arrays can favor head/mid/tail coverage (default) or strictly the head; tail preference flips head/tail when configured. Object properties are ordered by key, and strings expand by grapheme with early characters prioritized over very deep expansions.
|
|
210
176
|
- <sup><b>[3]</b></sup> <b>Choose top N nodes (binary search)</b>: Iteratively picks N so that the rendered preview fits within the character budget, looping between “choose N” and a render attempt to converge quickly.
|
|
211
177
|
- <sup><b>[4]</b></sup> <b>Render attempt</b>: Serializes the currently included nodes using the selected template. Omission summaries and per-file section headers appear in display templates (pseudo/js); json remains strict. For arrays, display templates may insert internal gap markers between non‑contiguous kept items using original indices.
|
|
178
|
+
- <sup><b>[5]</b></sup> <b>Diagram source</b>: The Algorithm diagram is generated from `docs/diagrams/algorithm.mmd`. Regenerate the SVG with `cargo make diagrams` before releasing.
|
|
212
179
|
|
|
213
180
|
## License
|
|
214
181
|
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
headson-0.5.3.dist-info/METADATA,sha256=K4NeyheAWgMcRn7lk0w5ec6sVoMtO_QnkpO_UaEDuMw,8529
|
|
2
|
+
headson-0.5.3.dist-info/WHEEL,sha256=-lwEpi49KOTCcgx48T3fLSP8Dxynwa-iRMZNo-JZaqc,103
|
|
3
|
+
headson-0.5.3.dist-info/licenses/LICENSE,sha256=GZ9row3L2LsnOSbEuGMQZ0zKOIEd5tHr76cZHpg4KK8,1072
|
|
4
|
+
headson/__init__.py,sha256=8DXFB8ahlywyQXJsscl3w_wgbcQi7sj7zEuV28wR60E,187
|
|
5
|
+
headson/headson.abi3.so,sha256=ENRkGrOY31NNISdSQXMfKB88WM3kjYWiTp1nu6U05kE,604752
|
|
6
|
+
headson-0.5.3.dist-info/RECORD,,
|
headson-0.5.1.dist-info/RECORD
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
headson-0.5.1.dist-info/METADATA,sha256=pv3wYywpSE8OuULv5-LgGycmOJi2kFukurzkLUGdyIY,9371
|
|
2
|
-
headson-0.5.1.dist-info/WHEEL,sha256=-lwEpi49KOTCcgx48T3fLSP8Dxynwa-iRMZNo-JZaqc,103
|
|
3
|
-
headson-0.5.1.dist-info/licenses/LICENSE,sha256=GZ9row3L2LsnOSbEuGMQZ0zKOIEd5tHr76cZHpg4KK8,1072
|
|
4
|
-
headson/__init__.py,sha256=8DXFB8ahlywyQXJsscl3w_wgbcQi7sj7zEuV28wR60E,187
|
|
5
|
-
headson/headson.abi3.so,sha256=IOPVBfgMnRLzVUeY-JHJAFOPnW-x_vP6aiskgtG6pcY,604752
|
|
6
|
-
headson-0.5.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|