Skip to main content

Deterministic linter for equations, references, and MyST structure in scientific documents.

Project description

SciEqLint

PyPI Python versions CI Codecov Docs CodeQL OpenSSF Scorecard License: MIT

SciEqLint lints scientific Markdown, LaTeX, and notebooks for equation mistakes, broken references, MyST structure problems, and CI-ready diagnostics before they reach reviewers.

SciEqLint demo

python -m pip install scieqlint
scieqlint check README.md

Run it on Markdown/MyST docs before review to catch mistakes like this:

(a+b)^2 = a^2 + b^2

Diagnostic:

ALG001 algebraic identity does not hold
left - right = 2*a*b

It also catches supported broken equation references:

See {eq}`missing`.

Diagnostic:

REF002 equation reference target not found: missing

For generated or MyST-heavy scientific docs, initialize the packaged profile and run the same deterministic checks in CI:

scieqlint init --preset generated-myst --path scieqlint.generated-myst.toml
scieqlint check "docs/**/*.md" --config scieqlint.generated-myst.toml --format github

That profile enables stricter generated-document checks while keeping the scope source-based: math containers, supported equation and generic references, MyST anchors and directives, heading hierarchy, and parse-unknown diagnostics.

Local development

python -m pip install -e '.[dev]'
scieqlint --help
scieqlint check .
scieqlint check examples/bad/famous_bad.md --format github
scieqlint demo

Commands

scieqlint check [PATH_OR_GLOB...]
scieqlint graph [PATH_OR_GLOB...] --output scieqlint-graph.json
scieqlint init
scieqlint init --preset generated-myst
scieqlint init --preset mechanics
scieqlint presets list
scieqlint presets show generated-myst
scieqlint presets show mechanics
scieqlint demo
scieqlint explain CODE
python -m scieqlint --help

Deterministic output

SciEqLint is deterministic. Given the same files, config, and version, it must emit the same diagnostics in the same order. Supported math is checked exactly. Unsupported math is reported as unknown or skipped. The checker must not guess.

Supported files

SciEqLint checks .md, .markdown, .tex, and .ipynb documents. It supports Markdown/MyST display math, supported LaTeX containers, notebook Markdown cells, labels and references, MyST structure diagnostics, simple scalar algebra, text output, deterministic JSON output, SARIF, and JSON Schema validation. See docs/limitations.md for the exact scanner and grammar coverage.

Current release target: v1.1.0.

Pull request annotations

- name: Check equations
  run: scieqlint check "docs/**/*.md" --format github

Code scanning

permissions:
  contents: read
  security-events: write

steps:
  - uses: actions/checkout@v6
  - uses: Kuhai9801/scieqlint@v1.1.0
    with:
      args: check "docs/**/*.md" --format sarif --output scieqlint.sarif
  - uses: github/codeql-action/upload-sarif@v4
    with:
      sarif_file: scieqlint.sarif
      category: scieqlint-docs

For contributors

Start with these files:

  • SPEC.md for the product and engineering contract.
  • CONTRIBUTING.md for the local workflow.
  • GOOD_FIRST_ISSUES.md for scoped starter tasks.
  • ROADMAP.md for release order and cut rules.
  • docs/contributing/ for deeper guidance.

Keep PRs small and test the behavior they change.

License

MIT. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scieqlint-1.1.0.tar.gz (309.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scieqlint-1.1.0-py3-none-any.whl (105.7 kB view details)

Uploaded Python 3

File details

Details for the file scieqlint-1.1.0.tar.gz.

File metadata

  • Download URL: scieqlint-1.1.0.tar.gz
  • Upload date:
  • Size: 309.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for scieqlint-1.1.0.tar.gz
Algorithm Hash digest
SHA256 4b6ceddf23d535ca72b313836798c6952cbd5adccae25937bd2161d98ddea96b
MD5 64ca8e4b7985cd9d2e7597fb1a4acc03
BLAKE2b-256 83c6b05114d4d9b5af3278160ea52370b52169b44cb046589ed6d8e636abdcdd

See more details on using hashes here.

Provenance

The following attestation bundles were made for scieqlint-1.1.0.tar.gz:

Publisher: release.yml on Kuhai9801/scieqlint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scieqlint-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: scieqlint-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 105.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for scieqlint-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9ad9d747311c5df76ddf22676d7928a49c1b9c2eec8ad3cca19f205f0a354a84
MD5 b5b7c250ab0cba08534adc8d2d8fee37
BLAKE2b-256 f6ff85379bb9402b93c49622e363e68591fd54541b677c2517f4226068a1f8b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for scieqlint-1.1.0-py3-none-any.whl:

Publisher: release.yml on Kuhai9801/scieqlint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page