from traitlets.config import get_config

c = get_config()

# Run notebooks first to get rid of Google CoLab-specific
# cell output which breaks markdown rendering.
# c.ExecutePreprocessor.enabled = True

# Remove cell output that doesn't look great in docs.
c.TagRemovePreprocessor.remove_all_outputs_tags = ("remove-output",)

# These NbConvertApp settings are here for demonstrating intent, but
# must both be set via CLI arg (in Makefile) in order to be effective.
c.NbConvertApp.export_format = "markdown"
c.NbConvertApp.output_files_dir = "notebook-assets"

# Same as `--output-dir`
c.FilesWriter.build_directory = "docs/notebooks-autogenerated"

# Store images in a location that's easy to gitignore.
c.MarkdownExporter.preprocessors = [
    "nbconvert.preprocessors.TagRemovePreprocessor",
    "valency_anndata.nbconvert.preprocessors.MkdocsAnnotationPreprocessor",
]