Hasty Briefsbeta

Bilingual

Jupyter notebooks as e2e tests

15 hours ago
  • Scientific Python libraries often use Jupyter notebooks for user guides and documentation.
  • User guide notebooks can serve as effective end-to-end tests since they cover major use cases.
  • Notebooks need to be parametrized (e.g., reading server URL from environment) to work both for users and CI pipelines.
  • Two methods to run notebooks automatically: using nbclient (simple error detection) or nbconvert with jq (detailed output but harder error handling).
  • The nbclient method works well for testing both documentation and code integrity on each merge request.