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/.rst (per-table automodule stub) E. Doc/source/ttLib/tables.rst (toctree entry) F. Tests/ttLib/tables/_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
ci: add table coverage check and fix outstanding registration gaps (#4080)
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/.rst (per-table automodule stub) E. Doc/source/ttLib/tables.rst (toctree entry) F. Tests/ttLib/tables/_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:
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.
字体文件解析、分析、修改与生成工具库。
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号