Skip to content
Projects
Latest release v0.1.0

methodcard

Write the equations of a numerical method once, on the code that implements it, and see them in Jupyter, in the API docs and in the tests.

One source of truth

A class (NumericalMethod mixin) or function (@method) declares its equations, order of accuracy, assumptions and references as literals, next to the code.

Docs

A griffe extension adds a “Numerics” section to each method’s API page, and methodcard export gives the catalogue page of the shared docs theme, without importing the code.

Tests

method_suite("mypackage") checks every card: SymPy rules against the implementation, observed against declared orders, and the docs against the runtime.

Jupyter

A method renders its card in a notebook; describe() prints it in a terminal.