Check Plugin

Documenting all checks

You can list all checks with the check directive:


Referencing checks inline

You can reference specific checks inline (or their options) with the check role: {curvenote:check}`Max Abstract Length <abstract-length.max>`, for example see Max Abstract Length

Documenting one specific checks

You can also specify individual checks by id:

:::{curvenote:check} abstract-length

Documenting filtered checks

You can specify category and/or source values to filter checks. Currently the only source values are 'myst' and 'curvenote'; there are may category values - these show up in the documented checks.

:category: code
:source: myst


The following are all available checks:

Abstract Exists

category: abstract
id: abstract-exists

Ensure abstract exists in MyST project

Abstract Length

category: abstract
id: abstract-length

Ensure abstract in MyST project is the correct length

max (string, required)

Maximum word count for abstract

Availability Statement Exists

category: availability
id: availability-exists

Ensure availability statement exists in MyST project

Citation is unique

category: citation
id: citation-is-unique

Citation does not have any duplicate identifiers in the MyST project.

Bib file exists

category: citation
id: bib-file-exists

Bib file referenced in config file exists in the MyST project.

MyST citation checks pass

category: citation
id: myst-citation

No citation-related errors or warnings are produced during MyST build.

Code metadata lifted

category: code
id: code-metadata-lifted

Metadata defined on code is lifted to blocks; often failures are associated with multiple code metadata definitions within one block.

Code metatags valid

category: code
id: code-metatags-valid

Tags in code metadata must be a list of strings, and they must not conflict with each other.

Code lang defined

category: code
id: code-lang-defined

Code blocks should define their language

Code metadata loads

category: code
id: code-metadata-loads

Code metadata must be valid yaml.

Inline expression renders

category: code
id: inline-expression-renders

Inline expression must be a recognized mime bundle.

MyST code checks pass

category: code
id: myst-code

No code-related errors or warnings are produced during MyST build.

Known Directive

category: directive
id: directive-known

Check if directive is recognized.

Directive Argument Validates

category: directive
id: directive-argument-correct

Argument is valid, according to the rules of the specific directive.

Directive Options Validate

category: directive
id: directive-options-correct

Options are valid, according to the rules of the specific directive.

Directive Body Validates

category: directive
id: directive-body-correct

Body is valid, according to the rules of the specific directive.

MyST directive checks pass

category: directive
id: myst-directive

No directive-related errors or warnings are produced during MyST build.

DOCX Renders Successfully

category: export
id: docx-renders

The document renders to DOCX format without errors.

JATS Renders Successfully

category: export
id: jats-renders

The document renders to JATS format without errors.

Markdown Renders Successfully

category: export
id: md-renders

The document renders to Markdown format without errors.

MECA Includes JATS

category: export
id: meca-includes-jats

MECA bundle includes a single JATS document.

MECA Includes Manuscripts

category: export
id: meca-exports-built

Manuscript files (pdf, docx, etc) are built and included in MECA bundle.

MECA Includes Files

category: export
id: meca-files-copied

Files are copied successfully to MECA bundle.

PDF Builds Without Errors

category: export
id: pdf-builds-without-errors

PDF generation completes without errors.

PDF Builds Successfully

category: export
id: pdf-builds

The document builds to PDF format without errors.

TeX Renders Successfully

category: export
id: tex-renders

The document renders to TeX format without errors.

Export Extension Correct

category: export
id: export-extension-correct

The exported file has the correct file extension.

Exported Article Exists

category: export
id: export-article-exists

The exported article exists as expected.

MyST export checks pass

category: export
id: myst-export

No export-related errors or warnings are produced during MyST build.

Valid Config Structure

category: frontmatter
id: valid-config-structure

The configuration file has a valid structure.

Site Config Exists

category: frontmatter
id: site-config-exists

The site configuration file exists.

Project Config Exists

category: frontmatter
id: project-config-exists

The project configuration file exists.

Valid Site Config

category: frontmatter
id: valid-site-config

The site configuration is valid.

Valid Project Config

category: frontmatter
id: valid-project-config

The project configuration is valid.

Config Has No Deprecated Fields

category: frontmatter
id: config-has-no-deprecated-fields

There are no deprecated fields in the configuration file.

Frontmatter Is YAML

category: frontmatter
id: frontmatter-is-yaml

The frontmatter format is YAML.

Valid Page Frontmatter

category: frontmatter
id: valid-page-frontmatter

The page frontmatter is valid.

Valid Export List

category: frontmatter
id: valid-frontmatter-export-list

The frontmatter export list is valid.

MyST frontmatter checks pass

category: frontmatter
id: myst-frontmatter

No frontmatter-related errors or warnings are produced during MyST build.

Image Downloads

category: image
id: image-downloads

Remote images are downloaded successfully.

Image Exists

category: image
id: image-exists

The image exists on disk.

Image Format Converts

category: image
id: image-format-converts

Image format is converted successfully from unsupported to supported format.

Image Copied

category: image
id: image-copied

Image is copied successfully from source location.

Image Format Optimizes

category: image
id: image-format-optimizes

Images format is converted to webp for optimal web performance.

MyST image checks pass

category: image
id: myst-image

No image-related errors or warnings are produced during MyST build.

category: link
id: myst-link-valid

Myst link to local or intersphinx content is valid.

category: link
id: rrid-link-valid

The RRID link matches expected pattern.

category: link
id: wikipedia-link-valid

Wikipedia link matches expected pattern.

category: link
id: doi-link-valid

DOI link is a valid DOI.

category: link
id: link-resolves

Link can be successfully fetched.

category: link
id: myst-link

No link-related errors or warnings are produced during MyST build.

Math Label Lifted

category: math
id: math-label-lifted

Enumerated math label is identified and lifted from latex.

Math Equation Env Removed

category: math
id: math-equation-env-removed

Equation environment is removed from latex.

Eqnarray Replaced

category: math
id: math-eqnarray-replaced

Latex align environment should be used instead of eqnarray.

Math Alignment Adjusted

category: math
id: math-alignment-adjusted

Math align environment renders correctly.

Math Renders Successfully

category: math
id: math-renders

Equation renders without any warning or errors.

MyST math checks pass

category: math
id: myst-math

No math-related errors or warnings are produced during MyST build.

MDAST Snippet Imports

category: miscellaneous
id: mdast-snippet-imports

MDAST snippet imports are resolved and loaded.

Include Content Filters

category: miscellaneous
id: include-content-filters

Line number filters apply to include content successfully.

Include Content Loads

category: miscellaneous
id: include-content-loads

Include content resolves and loads.

Gated Nodes Join

category: miscellaneous
id: gated-nodes-join

Gated nodes are successfully joined.

Glossary Uses Definition List

category: miscellaneous
id: glossary-uses-definition-list

Glossary contains terms as a definition list.

Block Metadata Loads

category: miscellaneous
id: block-metadata-loads

Block metadata is loaded successfully.

MyST miscellaneous content checks pass

category: miscellaneous
id: myst-miscellaneous

No miscellaneous content-related errors or warnings are produced during MyST build.

Notebook Attachments Resolve

category: notebook
id: notebook-attachments-resolve

Notebook attachments successfully load.

Notebook Output Copied

category: notebook
id: notebook-output-copied

Notebook output is copied to separate file.

MyST notebook checks pass

category: notebook
id: myst-notebook

No notebook-related errors or warnings are produced during MyST build.

TeX Parses

category: parse
id: tex-parses

TeX source file parses to MyST

JATS Parses

category: parse
id: jats-parses

JATS source file parses to MyST

MyST File Loads

category: parse
id: myst-file-loads

MyST markdown/notebook file parses to MyST

MyST parse checks pass

category: parse
id: myst-parse

No parse-related errors or warnings are produced during MyST build.

Reference Template Fills

category: reference
id: reference-template-fills

Template for reference enumeration is valid and fills.

Unique Identifier

category: reference
id: identifier-is-unique

Identifiers are unique.

Reference Target Resolves

category: reference
id: reference-target-resolves

Cross-reference target exists and resolves.

Valid Reference Syntax

category: reference
id: reference-syntax-valid

Cross-reference syntax is valid.

Explicit Reference Target

category: reference
id: reference-target-explicit

Cross-reference target is explicitly specified.

Footnote References Definition

category: reference
id: footnote-references-definition

Footnote references correctly point to their definitions.

Intersphinx References Resolve

category: reference
id: intersphinx-references-resolve

Intersphinx references successfully resolve.

MyST reference checks pass

category: reference
id: myst-reference

No reference-related errors or warnings are produced during MyST build.

Known Role

category: role
id: role-known

Check if role is recognized.

Role Body Validates

category: role
id: role-body-correct

Body is valid, according to the rules of the specific role.

MyST role checks pass

category: role
id: myst-role

No role-related errors or warnings are produced during MyST build.

Static File Copied

category: static
id: static-file-copied

Static site asset successfully copied.

Export File Copied

category: static
id: export-file-copied

Exported file is successfully copied.

Source File Copied

category: static
id: source-file-copied

Source file for MyST site is successfully copied.

Template File Copied

category: static
id: template-file-copied

Supporting template file is successfully copied.

Static Action File Copied

category: static
id: static-action-file-copied

Static site action file is successfully copied.

MyST static file checks pass

category: static
id: myst-static

No static-file-related errors or warnings are produced during MyST build.

TOC Contents Exist

category: toc
id: toc-contents-exist

The table of contents points to existing files.

Valid TOC Structure

category: toc
id: valid-toc-structure

The table of contents has a valid basic structure.

Valid TOC

category: toc
id: valid-toc

The table of contents is able to load.

MyST toc checks pass

category: toc
id: myst-toc

No toc-related errors or warnings are produced during MyST build.