array-api icon indicating copy to clipboard operation
array-api copied to clipboard

Migrate documentation of special cases to use math directives

Open kgryte opened this issue 3 years ago • 2 comments

The documentation of special cases in API documentation predates the specification's embrace of reST and GitHub support for mathematical equations in Markdown. As such, special cases use code blocks for numerical values and mathematical symbols. We should migrate to using math directives for better and more succinct rendering.

Adoption of math directives needs to be coordinated with the array API test suite, which, TMK, relies on special cases being described in a particular format within narrative content. Migration to math directives would thus break the test suite's current parsing logic for extracting special values and the associated expected result.

During this migration, we may want to consider providing structured data (e.g., as JSON) describing special cases which can be more readily consumed by downstream consumers, such as the array API test suite, and prevent implicit dependencies on how narrative content is written.

kgryte avatar Nov 27 '22 00:11 kgryte

This would be sweet. For reference the existing parsing work in the test suite could be a good reference to basically do the reverse and generate the majority of the structured pre-complex data, so I'll have to explore this myself and report back.

I assume we wouldn't be able to comfortably do this for a release this year.

honno avatar Nov 29 '22 13:11 honno

Structured data would be great (c.f. #49).

asmeurer avatar Nov 29 '22 21:11 asmeurer