Skip to main content

MetricProof-NWB

Tests PyPI

Reproducible evidence reports for NWB files.

MetricProof-NWB complements schema and best-practice validators by preserving the evidence around an audit: the input path, SHA-256 digest, selected NWB metadata, validation findings, warnings, and timestamp. That makes a result easier to attach to a paper, archive submission, or CI run.

Version 0.2 is built on MetricProof's shared evidence model. NWB reports now use the same versioned envelope as analytical audits: producer identity, artifact fingerprints, structured results, execution context, and explicit schema versioning. Downstream tools can therefore ingest both report types without maintaining separate parsers.

Install

The base package depends only on MetricProof. Install the optional PyNWB extra to validate real NWB files:

python -m pip install "metricproof-nwb[nwb]"

Usage

metricproof-nwb audit session.nwb
metricproof-nwb audit session.nwb --format json --output evidence.json

The JSON document conforms to MetricProof's bundled evidence schema:

metricproof schema evidence

Its top-level report_type is nwb-audit; the audited file appears in artifacts, PyNWB findings appear in results, and selected NWB metadata is stored in context.nwb_metadata.

The command exits with 0 for a valid file, 1 when PyNWB reports validation findings, and 2 when the audit cannot run (for example, when PyNWB is not installed or the file cannot be opened).

The Python API accepts injectable validator and metadata functions so projects can add study-specific checks without coupling their tests to one PyNWB release:

from metricproof_nwb import audit_nwb

report = audit_nwb("session.nwb")
print(report.sha256)
print(report.to_dict())

The compatibility properties (status, sha256, size_bytes, validation_errors, and exit_code) remain available, while report.report provides direct access to the underlying metricproof.EvidenceReport.

Development

$env:PYTHONPATH = (Resolve-Path src).Path
python -m unittest discover -s tests -v

On macOS or Linux, use export PYTHONPATH="$PWD/src" instead.

Scope

MetricProof-NWB does not replace PyNWB validation, NWBInspector, or DANDI validation. It records their result alongside file identity and metadata so a research workflow can show exactly what was checked.

Download files

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

Source Distribution

metricproof_nwb-0.2.0.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

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

metricproof_nwb-0.2.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file metricproof_nwb-0.2.0.tar.gz.

File metadata

  • Download URL: metricproof_nwb-0.2.0.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for metricproof_nwb-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1f079f7b34a7ce67d5c16bb84fad74ad8ea0bf44098185ff8b4deba3c4253573
MD5 d7a1f676b5b4a9e47c905afdb24659a1
BLAKE2b-256 499a1cee6314e0f2aba23a0e772025377b198b096b4cf6b381b621653507c341

See more details on using hashes here.

Provenance

The following attestation bundles were made for metricproof_nwb-0.2.0.tar.gz:

Publisher: publish.yml on AtomicGlance/metricproof-nwb

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

File details

Details for the file metricproof_nwb-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for metricproof_nwb-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 890181220cfe7fc64f39cda7d097c8b5699012389062a4a2f1c7fe5588b9c3bd
MD5 6a5f5efcab55c74cb11989e0fd2e963e
BLAKE2b-256 0bacf1e5346169db6059149b1cbda80a9a66ef7ef5bb08896ce321f84b64eeab

See more details on using hashes here.

Provenance

The following attestation bundles were made for metricproof_nwb-0.2.0-py3-none-any.whl:

Publisher: publish.yml on AtomicGlance/metricproof-nwb

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

Release history Release notifications | RSS feed

0.3.0

2 files

This release

0.2.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page