• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

bramp / build-along / 19198730038
89%

Build:
DEFAULT BRANCH: main
Ran 08 Nov 2025 09:17PM UTC
Jobs 1
Files 71
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

08 Nov 2025 09:16PM UTC coverage: 85.896%. Remained the same
19198730038

push

github

bramp
Refactor FontSizeHints to use element ID-based page classification

This refactoring improves page classification and simplifies the code by using TextHistogram abstractions properly.

Key changes:

1. Replace position-based page split (2/3-1/3) with content-based classification using catalog element IDs (6-7 digit numbers): Pages with >3 element IDs are classified as catalog pages, all other pages are instruction pages.

2. Add TextHistogram.empty() and TextHistogram.update() methods: empty() creates an empty histogram for accumulation, update() merges another histogram's counts (like Counter.update()), simplifies from_pages() to use these new methods.

3. Use three histograms for proper separation of concerns: instruction_histogram for instruction-specific metrics, catalog_histogram for catalog-specific metrics, all_histogram for document-wide metrics (page numbers, remaining fonts).

4. Simplify histogram accumulation: Build histograms page-by-page with direct updates, no intermediate lists or manual counter combining, check page counts instead of None to determine if histograms exist.

5. Fix page_number_size and remaining_font_sizes extraction: Both now use all_histogram (includes all pages) for more accurate statistics from complete dataset.

Benefits: More accurate content-based classification, cleaner code with proper TextHistogram abstractions, better maintainability with single source of truth for element ID detection, correct semantics where document-wide metrics use all pages.

66 of 66 new or added lines in 4 files covered. (100.0%)

2 existing lines in 2 files now uncovered.

4519 of 5261 relevant lines covered (85.9%)

0.86 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
98.84
0.0% src/build_a_long/pdf_extract/classifier/font_size_hints.py
1
98.72
0.0% src/build_a_long/pdf_extract/classifier/font_size_hints_test.py
Jobs
ID Job ID Ran Files Coverage
1 19198730038.1 08 Nov 2025 09:17PM UTC 71
85.9
GitHub Action Run
Source Files on build 19198730038
  • Tree
  • List 71
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #19198730038
  • 24ec7882 on github
  • Prev Build on main (#19198704943)
  • Next Build on main (#19199881545)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc