You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we run examples once with sphinx gallery and once with test-examples. This is mainly done to ensure our coverage is rightly reported.
However, in practice the 2 can be done together.
A simple case:
importosimportcoverage# Start coverage collectioncov=coverage.Coverage()
cov.start()
# Sphinx configurationextensions= [
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx_gallery.gen_gallery',
]
# Sphinx Gallery configurationsphinx_gallery_conf= {
'examples_dirs': 'examples', # path to your example scripts'gallery_dirs': 'auto_examples', # path where to save gallery generated output'filename_pattern': r'\.py',
'run_stale_examples': True, # Execute all examples even if they haven't changed
}
# Add a build-finished event to stop coverage and generate a reportdefcoverage_report(app, exception):
cov.stop()
cov.save()
print("\nCoverage Summary:\n")
cov.report()
defsetup(app):
app.connect('build-finished', coverage_report)
However, this is not trivial when we run examples in parallel. Some attempts was done in #181 but spawing an issue to track it separately,.
The text was updated successfully, but these errors were encountered:
Currently we run examples once with sphinx gallery and once with test-examples. This is mainly done to ensure our coverage is rightly reported.
However, in practice the 2 can be done together.
A simple case:
However, this is not trivial when we run examples in parallel. Some attempts was done in #181 but spawing an issue to track it separately,.
The text was updated successfully, but these errors were encountered: