[fonttools/fonttools] 34be24: ci: add table coverage check and fix outstanding r...

0 views
Skip to first unread message

Thatchapon Unprasert

unread,
Apr 7, 2026, 10:18:03 PMApr 7
to fontto...@googlegroups.com
Branch: refs/heads/main
Home: https://github.com/fonttools/fonttools
Commit: 34be2443a7539b0b36467e9cca63ef53d4506fd6
https://github.com/fonttools/fonttools/commit/34be2443a7539b0b36467e9cca63ef53d4506fd6
Author: Thatchapon Unprasert <3608783+...@users.noreply.github.com>
Date: 2026-04-07 (Tue, 07 Apr 2026)

Changed paths:
M Doc/source/ttLib/tables.rst
A Doc/source/ttLib/tables/D__e_b_g.rst
A Doc/source/ttLib/tables/G_V_A_R_.rst
A Doc/source/ttLib/tables/I_F_T_.rst
A Doc/source/ttLib/tables/I_F_T_X_.rst
A Doc/source/ttLib/tables/V_A_R_C_.rst
A Doc/source/ttLib/tables/_b_g_c_l.rst
M Doc/source/ttx.rst
M Lib/fontTools/ttLib/tables/__init__.py
M Lib/fontTools/ttLib/ttFont.py
A MetaTools/check_table_coverage.py
A Tests/metaTools/check_table_coverage_test.py

Log Message:
-----------
ci: add table coverage check and fix outstanding registration gaps (#4080)

* ci: add check_table_coverage script and fix outstanding registration gaps

Add MetaTools/check_table_coverage.py, a CI script that verifies every
table module in Lib/fontTools/ttLib/tables/ is registered in all
required locations:

A. tables/__init__.py (auto-generated via buildTableList.py)
B. Doc/source/ttx.rst (auto-generated via buildTableList.py)
C. ttFont.py (TYPE_CHECKING import + @overload stubs)
D. Doc/source/ttLib/tables/<module>.rst (per-table automodule stub)
E. Doc/source/ttLib/tables.rst (toctree entry)
F. Tests/ttLib/tables/<module>_test.py (unit tests, warning only)

Tables intentionally documented in a shared RST (e.g. TSI* tables in
VTT_related.rst) are handled via a GROUPED_IN map so they do not
produce false positives. Pre-existing test-file gaps are listed in
KNOWN_GAPS and emit warnings rather than errors so the check can be
enabled without blocking on existing debt.

Integrate the check into tox (tox -e check-tables) and add a
dedicated check-tables job to .github/workflows/test.yml.

While adding the script, fix the outstanding registration gaps it
surfaces:

- Run buildTableList.py to add IFT and IFTX to tables/__init__.py
and Doc/source/ttx.rst.
- Add TYPE_CHECKING imports and @overload stubs for IFT, IFTX, and
bgcl in ttFont.py.
- Add per-table RST docs for Debg, GVAR, IFT, IFTX, VARC, and bgcl.
- Add toctree entries for all six new RST files in tables.rst.

* style: black formatting for check_table_coverage.py

* refactor: move table coverage check into the regular pytest suite

The check functions from MetaTools/check_table_coverage.py are now also
exercised as five ordinary pytest tests in
Tests/metaTools/check_table_coverage_test.py, one per check category
(init_py, ttx_rst, ttfont_py, rst_docs, tables_rst_toctree).

This means the checks run automatically on every platform and Python
version in the existing test matrix, with no separate CI job or tox
environment needed. The dedicated check-tables tox env and the
corresponding GitHub Actions job are removed.

* remove unnecessary Tests/metaTools/__init__.py



To unsubscribe from these emails, change your notification settings at https://github.com/fonttools/fonttools/settings/notifications
Reply all
Reply to author
Forward
0 new messages