ethereum / ethereum/execution-specs

Reduce HTML file size in the reference test documentation

Open
#1,662 4 comments 0 reactions 0 assignees View on GitHub
A-doc C-feat E-easy stale
Dominant language
Python
Stars
1.2k
Forks
505
Avg merge
2d 14h
Merged PRs (30d)
116

Description

Our mkdocs flow generates the "test case reference": https://eest.ethereum.org/main/tests/

It generates tables for each test function that display the entire test parameter space (this is sometimes useful, sometimes not so useful).

At the moment, we just dump the objects verbatim into these tables resulting in unacceptabledly large files. We should identify the large files and come up with a concept to reduce the html file size. This could be in part via #1488.

You can get started to see which test functions and more importantly objects are the worst offenders by:

1. Generating the test case ref in isolation with:
```bash
uv run fill --override-ini filterwarnings=ignore::pytest.PytestAssertRewriteWarning -p pytest_plugins.filler.gen_test_doc.gen_test_doc -p pytest_plugins.filler.eip_checklist --gen-docs --gen-docs-target-fork=Osaka --until=Osaka --checklist-doc-gen --skip-index -m "not blockchain_test_engine" -s tests
```
Note, these files never appear during `mkdocs build` or `mkdocs serve`; the html gets generated directly to the site directory. With this command it'll modify `docs/navigation.md` (this should not be commited).
2. Find the large files: `docs/tests/prague/eip2537_bls_12_381_precompiles/test_bls12_g2msm/test_valid.html` is 28M, for example.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.