Skip to main content

Deterministic linter for exact scalar equations and equation references in scientific documents.

Project description

SciEqLint

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

SciEqLint checks documented scientific document formats for exact scalar algebra mistakes and broken equation references.

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

Install

python -m pip install scieqlint
scieqlint check .

For local development:

python -m pip install -e '.[dev]'
scieqlint --help
scieqlint check .
scieqlint check README.md
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 mechanics
scieqlint presets list
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, 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.0.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.0.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.0.0.tar.gz (96.4 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.0.0-py3-none-any.whl (79.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for scieqlint-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ba60d511b95fd833d6cd55297dd63475110d5af7a874846e4920c4305cc08940
MD5 ca59065ba8a32c958465c2918d096b29
BLAKE2b-256 df0e9ff8f58a9ead4798ef8a2a5a5c9c5b0434a30bf85ce2a200ae90bd626349

See more details on using hashes here.

Provenance

The following attestation bundles were made for scieqlint-1.0.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.0.0-py3-none-any.whl.

File metadata

  • Download URL: scieqlint-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 79.8 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.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 db6565c6b18e52b6c417ca2fda7d59bf893cdb9389ab75ac3cdffc6da97b5444
MD5 5f4a2eb11b4772f52295828d8bf64ed6
BLAKE2b-256 1f128b629b8f11c135ba73092597b10f12234f5830b747e95b47892c2be9d268

See more details on using hashes here.

Provenance

The following attestation bundles were made for scieqlint-1.0.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