Skip to main content

CLI and library for JAX-oriented static checks, docstring quality, and optional HLO analysis

Project description

jaxlint

Static analysis and docstring quality tooling for JAX-heavy Python codebases.

Install

uv tool install jaxlint
# or from source
uv sync
uv run jaxlint --help

Optional HLO / export analysis:

uv sync --extra hlo

Documentation

Published builds (HTML, PDF, htmlzip per version):

  • Read the Docs — import this repository using .readthedocs.yml; the canonical URL assumes project slug jaxlint. Pull-request previews are HTML-only; PDF/htmlzip artifacts appear on latest/tag/version builds (RTD formats).
  • Markdown sources: docs/index.md (notebook-free Sphinx + MyST stack, aligned with JAX’s docs toolchain at smaller scope).

CLI

  • jaxlint check [PATHS]... — performance sensors (AST) plus doc section and MathJax checks by default
  • jaxlint doc [PATHS]... — doc sections + MathJax only
  • jaxlint score [PATHS]... — rubric scores for docstrings (optional --jsonl, --baseline)
  • jaxlint rules — list rule IDs
  • jaxlint version — print package version
  • jaxlint init — print a starter [jaxlint] snippet for jaxlint.toml
  • jaxlint hlo — hints for optional jaxlint.hlo (requires --extra hlo)

Language server: install jaxlint[lsp], then run jaxlint-lsp or python -m jaxlint.lsp (stdio; diagnostics-only v1). See docs/lsp.md.

Testing

uv sync --all-groups --extra lsp --extra mcp --extra docs   # add --extra hlo when touching JAX/HLO
uv run pytest -q --cov=jaxlint --cov-report=term-missing    # mirrors CI `lint-test` (full suite + coverage)
uv run pytest -q -m mcp      # MCP server + tool helpers only
uv run pytest -q -m lsp      # Language server tests only

Markers include smoke, unit, integration, slow, lsp, mcp, and needs_jax. Optional jaxlint[mcp] installs the MCP SDK; run jaxlint-mcp or python -m jaxlint.mcp (stdio) for agent-facing tools: jaxlint_check, jaxlint_capabilities, jaxlint_rules, jaxlint_version. jaxlint_check defaults to the legacy behaviour (pretty-printed JSON array of diagnostics, or error: strings). Set structured=true for a jaxlint.mcp.v1 envelope (success, diagnostics, optional error, meta with elapsed_ms, paths_resolved, and requested jobs / cache_dir). Path mode can pass jobs and cache_dir through to run_checks (same semantics as jaxlint check -j / --cache-dir); these options are rejected for in-memory source checks. jaxlint_capabilities returns JSON describing the schema version, package version, and tool metadata. See docs/contributing.md for workflow details, coverage commands, and CI expectations.

Roadmap

The living plan (phased near / medium / long-term, plus what is already shipped) is docs/roadmap.md. Release notes: docs/changelog.md. Highlights: diagnostics-only LSP v1 ships as jaxlint[lsp] (see docs/lsp.md); MCP agent-grade v1 ships as jaxlint[mcp] (jaxlint-mcp, jaxlint_capabilities, structured jaxlint_check, pytest -m mcp). Shipped / near-term work includes SARIF and compact CLI output, autodoc API pages, deeper HLO tests — CI already runs a required needs_jax job (jax-hlo). jaxlint check supports -j / --jobs and an optional --cache-dir disk cache (see Roadmap).

Configuration

In jaxlint.toml (recommended standalone manifest), use the native [jaxlint] table. In pyproject.toml, use [tool.jaxlint] only.

jaxlint.toml:

[jaxlint]
select = ["JL", "JD", "JM"]
ignore = []
docstring-style = "numpy"
required-sections = ["Parameters", "Returns"]
strict-shapes = false
rubric-threshold = 0.75

[jaxlint.per-file-ignores]
"tests/**" = ["JL005"]

pyproject.toml (same keys under [tool.jaxlint]):

[tool.jaxlint]
select = ["JL", "JD", "JM"]
ignore = []
docstring-style = "numpy"
required-sections = ["Parameters", "Returns"]
strict-shapes = false
rubric-threshold = 0.75

[tool.jaxlint.per-file-ignores]
"tests/**" = ["JL005"]

See docs/rules.md for rule catalogue.

Library

jaxlint.core does not import JAX. Use jaxlint.hlo (extra hlo) for SemanticAnalyzer and GraphAuditSensor.

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

jaxlint-0.1.0a1.tar.gz (221.5 kB view details)

Uploaded Source

Built Distribution

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

jaxlint-0.1.0a1-py3-none-any.whl (44.7 kB view details)

Uploaded Python 3

File details

Details for the file jaxlint-0.1.0a1.tar.gz.

File metadata

  • Download URL: jaxlint-0.1.0a1.tar.gz
  • Upload date:
  • Size: 221.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for jaxlint-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 2190ccfcb75f991c450726952ec02b870d17de7eabf30f02287ffe4f7a1ec7ca
MD5 1cc386894cb8028304ebef357792a754
BLAKE2b-256 9223b9f99ec1d956e43cacf17c3c029186af6fd1e163970bb3e1110251b3638e

See more details on using hashes here.

Provenance

The following attestation bundles were made for jaxlint-0.1.0a1.tar.gz:

Publisher: release.yml on maraxen/jaxlint

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

File details

Details for the file jaxlint-0.1.0a1-py3-none-any.whl.

File metadata

  • Download URL: jaxlint-0.1.0a1-py3-none-any.whl
  • Upload date:
  • Size: 44.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for jaxlint-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 d6ddebd24f58524ce49c8ee49dff33fc20139267801f9032674ad61f81d55e0c
MD5 c533398a82fcaf3b79ac045b7c26d460
BLAKE2b-256 b878b950dcbbc31956c7fc238e4754792977bd435fc21ae37241c878eb58bc0f

See more details on using hashes here.

Provenance

The following attestation bundles were made for jaxlint-0.1.0a1-py3-none-any.whl:

Publisher: release.yml on maraxen/jaxlint

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