Metadata-Version: 2.5
Name: ineedvalidation
Version: 0.0.1
Summary: Declare which physical case, evidence tier and response quantity a test exercises; collect the declarations into an evidence ledger; lint and render a validation hierarchy from it.
Project-URL: Homepage, https://github.com/CoreySpohn/ineedvalidation
Project-URL: Issues, https://github.com/CoreySpohn/ineedvalidation/issues
Author-email: Corey Spohn <corey.a.spohn@nasa.gov>
License: MIT License
        
        Copyright (c) 2026 Corey Spohn
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Framework :: Pytest
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.11
Requires-Dist: pytest>=8
Provides-Extra: dev
Requires-Dist: pre-commit; extra == 'dev'
Provides-Extra: docs
Requires-Dist: ipython; extra == 'docs'
Requires-Dist: myst-nb; extra == 'docs'
Requires-Dist: sphinx; extra == 'docs'
Requires-Dist: sphinx-autoapi; extra == 'docs'
Requires-Dist: sphinx-autodoc-typehints; extra == 'docs'
Requires-Dist: sphinx-book-theme; extra == 'docs'
Provides-Extra: render
Requires-Dist: pyyaml>=6; extra == 'render'
Provides-Extra: test
Requires-Dist: pytest-cov; extra == 'test'
Requires-Dist: pyyaml>=6; extra == 'test'
Description-Content-Type: text/markdown

# ineedvalidation

Declare which physical case, evidence tier and response quantity a test exercises; collect the declarations across repositories into an evidence ledger; lint and render a validation hierarchy from node notes plus that ledger.

The vocabulary follows Oberkampf and Roy, *Verification and Validation in Scientific Computing* (2010): a validation hierarchy of unit, benchmark, subsystem and system cases, and a strict separation between verification (the code solves the equations correctly) and validation (the equations describe the measured world).

## Marking a test

```python
import ineedvalidation as inv

@inv.case("free-space-propagation", "A", srq="on-axis intensity")
def test_matches_closed_form():
    ...

@inv.case("free-space-propagation", "B", ref="other-code")
def test_matches_independent_code():
    ...

@inv.seam("optics", "detector")
def test_photon_scale_anchor():
    ...

@inv.regression
def test_frozen_output():
    ...
```

Tiers: `A` code verification, `B` cross-code benchmark, `C` solution verification, `D` validation against measured data. Regression tests are excluded from every tier.

The markers register through a pytest plugin entry point, so installing the package is the only setup a repository needs.

## Collecting the evidence

```console
$ pytest --inv-evidence evidence/mylib.json
```

One JSON file per repository lists every marked test, its case, its tier and the outcome it reached. A table in `pyproject.toml` can assign a case and tier by test path, so the tagging cost is per directory rather than per test.

## Linting and rendering a hierarchy

```console
$ ineedvalidation lint hierarchy/
$ ineedvalidation render hierarchy/
```

The hierarchy is a directory of Markdown notes with YAML frontmatter, one per case. The lint checks the notes for internal consistency and checks them against the collected tests in both directions: a case no node owns, a node with no tests, a response quantity a node does not list, or a validation level claimed without a passing test that supports it. The renderer draws the tiered figure through `d2`, with named views and optional hand-edited overrides for figures that have to look right in a talk.

## Status

Pre-alpha. The markers, the evidence collector, the hierarchy lint and the renderer work; the API is not yet stable.
