ineedvalidation 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ineedvalidation-0.0.1/.gitignore +222 -0
- ineedvalidation-0.0.1/.pre-commit-config.yaml +28 -0
- ineedvalidation-0.0.1/.readthedocs.yaml +20 -0
- ineedvalidation-0.0.1/CHANGELOG.md +27 -0
- ineedvalidation-0.0.1/LICENSE +21 -0
- ineedvalidation-0.0.1/PKG-INFO +106 -0
- ineedvalidation-0.0.1/README.md +52 -0
- ineedvalidation-0.0.1/pyproject.toml +67 -0
- ineedvalidation-0.0.1/src/ineedvalidation/__init__.py +12 -0
- ineedvalidation-0.0.1/src/ineedvalidation/_version.py +24 -0
- ineedvalidation-0.0.1/src/ineedvalidation/cli.py +143 -0
- ineedvalidation-0.0.1/src/ineedvalidation/d2.py +344 -0
- ineedvalidation-0.0.1/src/ineedvalidation/evidence.py +97 -0
- ineedvalidation-0.0.1/src/ineedvalidation/marks.py +71 -0
- ineedvalidation-0.0.1/src/ineedvalidation/nodes.py +143 -0
- ineedvalidation-0.0.1/src/ineedvalidation/plugin.py +175 -0
- ineedvalidation-0.0.1/src/ineedvalidation/schema.py +160 -0
- ineedvalidation-0.0.1/src/ineedvalidation/views.py +65 -0
- ineedvalidation-0.0.1/tools/check_internal_refs.py +80 -0
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
docs/jupyter_execute/
|
|
74
|
+
|
|
75
|
+
# PyBuilder
|
|
76
|
+
.pybuilder/
|
|
77
|
+
target/
|
|
78
|
+
|
|
79
|
+
# Jupyter Notebook
|
|
80
|
+
.ipynb_checkpoints
|
|
81
|
+
|
|
82
|
+
# IPython
|
|
83
|
+
profile_default/
|
|
84
|
+
ipython_config.py
|
|
85
|
+
|
|
86
|
+
# pyenv
|
|
87
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
88
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
89
|
+
# .python-version
|
|
90
|
+
|
|
91
|
+
# pipenv
|
|
92
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
93
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
94
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
95
|
+
# install all needed dependencies.
|
|
96
|
+
# Pipfile.lock
|
|
97
|
+
|
|
98
|
+
# UV
|
|
99
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
100
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
101
|
+
# commonly ignored for libraries.
|
|
102
|
+
# uv.lock
|
|
103
|
+
|
|
104
|
+
# poetry
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
106
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
107
|
+
# commonly ignored for libraries.
|
|
108
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
109
|
+
# poetry.lock
|
|
110
|
+
# poetry.toml
|
|
111
|
+
|
|
112
|
+
# pdm
|
|
113
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
114
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
115
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
116
|
+
# pdm.lock
|
|
117
|
+
# pdm.toml
|
|
118
|
+
.pdm-python
|
|
119
|
+
.pdm-build/
|
|
120
|
+
|
|
121
|
+
# pixi
|
|
122
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
123
|
+
# pixi.lock
|
|
124
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
125
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
126
|
+
.pixi
|
|
127
|
+
|
|
128
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
129
|
+
__pypackages__/
|
|
130
|
+
|
|
131
|
+
# Celery stuff
|
|
132
|
+
celerybeat-schedule
|
|
133
|
+
celerybeat.pid
|
|
134
|
+
|
|
135
|
+
# Redis
|
|
136
|
+
*.rdb
|
|
137
|
+
*.aof
|
|
138
|
+
*.pid
|
|
139
|
+
|
|
140
|
+
# RabbitMQ
|
|
141
|
+
mnesia/
|
|
142
|
+
rabbitmq/
|
|
143
|
+
rabbitmq-data/
|
|
144
|
+
|
|
145
|
+
# ActiveMQ
|
|
146
|
+
activemq-data/
|
|
147
|
+
|
|
148
|
+
# SageMath parsed files
|
|
149
|
+
*.sage.py
|
|
150
|
+
|
|
151
|
+
# Environments
|
|
152
|
+
.env
|
|
153
|
+
.envrc
|
|
154
|
+
.venv
|
|
155
|
+
env/
|
|
156
|
+
venv/
|
|
157
|
+
ENV/
|
|
158
|
+
env.bak/
|
|
159
|
+
venv.bak/
|
|
160
|
+
|
|
161
|
+
# Spyder project settings
|
|
162
|
+
.spyderproject
|
|
163
|
+
.spyproject
|
|
164
|
+
|
|
165
|
+
# Rope project settings
|
|
166
|
+
.ropeproject
|
|
167
|
+
|
|
168
|
+
# mkdocs documentation
|
|
169
|
+
/site
|
|
170
|
+
|
|
171
|
+
# mypy
|
|
172
|
+
.mypy_cache/
|
|
173
|
+
.dmypy.json
|
|
174
|
+
dmypy.json
|
|
175
|
+
|
|
176
|
+
# Pyre type checker
|
|
177
|
+
.pyre/
|
|
178
|
+
|
|
179
|
+
# pytype static type analyzer
|
|
180
|
+
.pytype/
|
|
181
|
+
|
|
182
|
+
# Cython debug symbols
|
|
183
|
+
cython_debug/
|
|
184
|
+
|
|
185
|
+
# PyCharm
|
|
186
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
187
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
188
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
189
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
190
|
+
# .idea/
|
|
191
|
+
|
|
192
|
+
# Abstra
|
|
193
|
+
# Abstra is an AI-powered process automation framework.
|
|
194
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
195
|
+
# Learn more at https://abstra.io/docs
|
|
196
|
+
.abstra/
|
|
197
|
+
|
|
198
|
+
# Visual Studio Code
|
|
199
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
200
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
201
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
202
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
203
|
+
# .vscode/
|
|
204
|
+
# Temporary file for partial code execution
|
|
205
|
+
tempCodeRunnerFile.py
|
|
206
|
+
|
|
207
|
+
# Ruff stuff:
|
|
208
|
+
.ruff_cache/
|
|
209
|
+
|
|
210
|
+
# PyPI configuration file
|
|
211
|
+
.pypirc
|
|
212
|
+
|
|
213
|
+
# Marimo
|
|
214
|
+
marimo/_static/
|
|
215
|
+
marimo/_lsp/
|
|
216
|
+
__marimo__/
|
|
217
|
+
|
|
218
|
+
# Streamlit
|
|
219
|
+
.streamlit/secrets.toml
|
|
220
|
+
|
|
221
|
+
# hatch-vcs generated version file
|
|
222
|
+
*_version.py
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: local
|
|
3
|
+
hooks:
|
|
4
|
+
- id: no-internal-refs
|
|
5
|
+
name: no internal research references
|
|
6
|
+
entry: python3 tools/check_internal_refs.py
|
|
7
|
+
language: system
|
|
8
|
+
types: [text]
|
|
9
|
+
exclude: ^(CHANGELOG\.md|tools/check_internal_refs\.py)$
|
|
10
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
11
|
+
rev: "v6.0.0"
|
|
12
|
+
hooks:
|
|
13
|
+
- id: trailing-whitespace
|
|
14
|
+
- id: name-tests-test
|
|
15
|
+
args: [--pytest-test-first]
|
|
16
|
+
- id: end-of-file-fixer
|
|
17
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
18
|
+
rev: v0.15.2
|
|
19
|
+
hooks:
|
|
20
|
+
- id: ruff-check
|
|
21
|
+
args: [--fix]
|
|
22
|
+
- id: ruff-format
|
|
23
|
+
- repo: https://github.com/compilerla/conventional-pre-commit
|
|
24
|
+
rev: v4.3.0
|
|
25
|
+
hooks:
|
|
26
|
+
- id: conventional-pre-commit
|
|
27
|
+
stages: [commit-msg]
|
|
28
|
+
args: []
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Required
|
|
2
|
+
version: 2
|
|
3
|
+
|
|
4
|
+
# Set the OS, Python version and other tools you might need
|
|
5
|
+
build:
|
|
6
|
+
os: ubuntu-22.04
|
|
7
|
+
tools:
|
|
8
|
+
python: "3.12"
|
|
9
|
+
|
|
10
|
+
python:
|
|
11
|
+
install:
|
|
12
|
+
- method: pip
|
|
13
|
+
path: .
|
|
14
|
+
extra_requirements:
|
|
15
|
+
# Install with the [docs] flag for sphinx docs specific extensions
|
|
16
|
+
- docs
|
|
17
|
+
|
|
18
|
+
# Build documentation in the "docs/" directory with Sphinx
|
|
19
|
+
sphinx:
|
|
20
|
+
configuration: docs/conf.py
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.0.1 (2026-09-11)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **cli:** lint, render and scaffold a hierarchy from the command line ([d33f9ab](https://github.com/CoreySpohn/ineedvalidation/commit/d33f9ab193b01335afd689de18788408ea3d646d))
|
|
9
|
+
* **d2:** emit the tiered hierarchy diagram from nodes and evidence ([f454a4a](https://github.com/CoreySpohn/ineedvalidation/commit/f454a4a4644dc57b891af8cba101ff30ea119b2a))
|
|
10
|
+
* **d2:** post-process the svg and drive the rendering binaries ([85d5506](https://github.com/CoreySpohn/ineedvalidation/commit/85d5506b4306011014f6088bfd75bc9b599abf63))
|
|
11
|
+
* **evidence:** merge per-repository evidence files into node summaries ([bd8f8c5](https://github.com/CoreySpohn/ineedvalidation/commit/bd8f8c566e0f4b90c3d557e912a5ff63022d3ac8))
|
|
12
|
+
* **nodes:** lint tests against the hierarchy in both directions ([26c79be](https://github.com/CoreySpohn/ineedvalidation/commit/26c79bee393720488a2dbea1d2f6c78f00a6efb6))
|
|
13
|
+
* **nodes:** lint the hierarchy structure and validation levels ([63a69b9](https://github.com/CoreySpohn/ineedvalidation/commit/63a69b994d6a05c0a8a3acfa91e09819b3f7e01a))
|
|
14
|
+
* **nodes:** load hierarchy notes into a node schema ([042da90](https://github.com/CoreySpohn/ineedvalidation/commit/042da90014370781cd9c65a7b8e65b3ee5d7ca6f))
|
|
15
|
+
* **plugin:** collect marked tests into a per-repository evidence file ([b47aef9](https://github.com/CoreySpohn/ineedvalidation/commit/b47aef9466df3ce7dc4fbd33304bd84eed685d37))
|
|
16
|
+
* **views:** named hierarchy views and the override lookup ([c0309cc](https://github.com/CoreySpohn/ineedvalidation/commit/c0309ccee5fc254b54fa107d64d4daa7629d6a52))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* **nodes:** keep the note order in a subtree so branches render the same way twice ([2ad676f](https://github.com/CoreySpohn/ineedvalidation/commit/2ad676fad19967ced31a29ef166e11f4731727ed))
|
|
22
|
+
* **tests:** skip the cli render tests when the d2 binaries are absent ([afef81d](https://github.com/CoreySpohn/ineedvalidation/commit/afef81d80aef1fc687e4836d1a468ea2adb6e39c))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Miscellaneous Chores
|
|
26
|
+
|
|
27
|
+
* release 0.0.1 ([9494740](https://github.com/CoreySpohn/ineedvalidation/commit/9494740a24d0755290b7c0662b330fb5ca8484eb))
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Corey Spohn
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: ineedvalidation
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
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.
|
|
5
|
+
Project-URL: Homepage, https://github.com/CoreySpohn/ineedvalidation
|
|
6
|
+
Project-URL: Issues, https://github.com/CoreySpohn/ineedvalidation/issues
|
|
7
|
+
Author-email: Corey Spohn <corey.a.spohn@nasa.gov>
|
|
8
|
+
License: MIT License
|
|
9
|
+
|
|
10
|
+
Copyright (c) 2026 Corey Spohn
|
|
11
|
+
|
|
12
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
14
|
+
in the Software without restriction, including without limitation the rights
|
|
15
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
17
|
+
furnished to do so, subject to the following conditions:
|
|
18
|
+
|
|
19
|
+
The above copyright notice and this permission notice shall be included in all
|
|
20
|
+
copies or substantial portions of the Software.
|
|
21
|
+
|
|
22
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
+
SOFTWARE.
|
|
29
|
+
License-File: LICENSE
|
|
30
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
31
|
+
Classifier: Framework :: Pytest
|
|
32
|
+
Classifier: Intended Audience :: Science/Research
|
|
33
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
34
|
+
Classifier: Programming Language :: Python :: 3
|
|
35
|
+
Classifier: Topic :: Scientific/Engineering
|
|
36
|
+
Classifier: Topic :: Software Development :: Testing
|
|
37
|
+
Requires-Python: >=3.11
|
|
38
|
+
Requires-Dist: pytest>=8
|
|
39
|
+
Provides-Extra: dev
|
|
40
|
+
Requires-Dist: pre-commit; extra == 'dev'
|
|
41
|
+
Provides-Extra: docs
|
|
42
|
+
Requires-Dist: ipython; extra == 'docs'
|
|
43
|
+
Requires-Dist: myst-nb; extra == 'docs'
|
|
44
|
+
Requires-Dist: sphinx; extra == 'docs'
|
|
45
|
+
Requires-Dist: sphinx-autoapi; extra == 'docs'
|
|
46
|
+
Requires-Dist: sphinx-autodoc-typehints; extra == 'docs'
|
|
47
|
+
Requires-Dist: sphinx-book-theme; extra == 'docs'
|
|
48
|
+
Provides-Extra: render
|
|
49
|
+
Requires-Dist: pyyaml>=6; extra == 'render'
|
|
50
|
+
Provides-Extra: test
|
|
51
|
+
Requires-Dist: pytest-cov; extra == 'test'
|
|
52
|
+
Requires-Dist: pyyaml>=6; extra == 'test'
|
|
53
|
+
Description-Content-Type: text/markdown
|
|
54
|
+
|
|
55
|
+
# ineedvalidation
|
|
56
|
+
|
|
57
|
+
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.
|
|
58
|
+
|
|
59
|
+
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).
|
|
60
|
+
|
|
61
|
+
## Marking a test
|
|
62
|
+
|
|
63
|
+
```python
|
|
64
|
+
import ineedvalidation as inv
|
|
65
|
+
|
|
66
|
+
@inv.case("free-space-propagation", "A", srq="on-axis intensity")
|
|
67
|
+
def test_matches_closed_form():
|
|
68
|
+
...
|
|
69
|
+
|
|
70
|
+
@inv.case("free-space-propagation", "B", ref="other-code")
|
|
71
|
+
def test_matches_independent_code():
|
|
72
|
+
...
|
|
73
|
+
|
|
74
|
+
@inv.seam("optics", "detector")
|
|
75
|
+
def test_photon_scale_anchor():
|
|
76
|
+
...
|
|
77
|
+
|
|
78
|
+
@inv.regression
|
|
79
|
+
def test_frozen_output():
|
|
80
|
+
...
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Tiers: `A` code verification, `B` cross-code benchmark, `C` solution verification, `D` validation against measured data. Regression tests are excluded from every tier.
|
|
84
|
+
|
|
85
|
+
The markers register through a pytest plugin entry point, so installing the package is the only setup a repository needs.
|
|
86
|
+
|
|
87
|
+
## Collecting the evidence
|
|
88
|
+
|
|
89
|
+
```console
|
|
90
|
+
$ pytest --inv-evidence evidence/mylib.json
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
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.
|
|
94
|
+
|
|
95
|
+
## Linting and rendering a hierarchy
|
|
96
|
+
|
|
97
|
+
```console
|
|
98
|
+
$ ineedvalidation lint hierarchy/
|
|
99
|
+
$ ineedvalidation render hierarchy/
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
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.
|
|
103
|
+
|
|
104
|
+
## Status
|
|
105
|
+
|
|
106
|
+
Pre-alpha. The markers, the evidence collector, the hierarchy lint and the renderer work; the API is not yet stable.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# ineedvalidation
|
|
2
|
+
|
|
3
|
+
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.
|
|
4
|
+
|
|
5
|
+
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).
|
|
6
|
+
|
|
7
|
+
## Marking a test
|
|
8
|
+
|
|
9
|
+
```python
|
|
10
|
+
import ineedvalidation as inv
|
|
11
|
+
|
|
12
|
+
@inv.case("free-space-propagation", "A", srq="on-axis intensity")
|
|
13
|
+
def test_matches_closed_form():
|
|
14
|
+
...
|
|
15
|
+
|
|
16
|
+
@inv.case("free-space-propagation", "B", ref="other-code")
|
|
17
|
+
def test_matches_independent_code():
|
|
18
|
+
...
|
|
19
|
+
|
|
20
|
+
@inv.seam("optics", "detector")
|
|
21
|
+
def test_photon_scale_anchor():
|
|
22
|
+
...
|
|
23
|
+
|
|
24
|
+
@inv.regression
|
|
25
|
+
def test_frozen_output():
|
|
26
|
+
...
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Tiers: `A` code verification, `B` cross-code benchmark, `C` solution verification, `D` validation against measured data. Regression tests are excluded from every tier.
|
|
30
|
+
|
|
31
|
+
The markers register through a pytest plugin entry point, so installing the package is the only setup a repository needs.
|
|
32
|
+
|
|
33
|
+
## Collecting the evidence
|
|
34
|
+
|
|
35
|
+
```console
|
|
36
|
+
$ pytest --inv-evidence evidence/mylib.json
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
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.
|
|
40
|
+
|
|
41
|
+
## Linting and rendering a hierarchy
|
|
42
|
+
|
|
43
|
+
```console
|
|
44
|
+
$ ineedvalidation lint hierarchy/
|
|
45
|
+
$ ineedvalidation render hierarchy/
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
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.
|
|
49
|
+
|
|
50
|
+
## Status
|
|
51
|
+
|
|
52
|
+
Pre-alpha. The markers, the evidence collector, the hierarchy lint and the renderer work; the API is not yet stable.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ['hatchling', "hatch-fancy-pypi-readme", "hatch-vcs"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "ineedvalidation"
|
|
7
|
+
description = "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."
|
|
8
|
+
authors = [{ name = "Corey Spohn", email = "corey.a.spohn@nasa.gov" }]
|
|
9
|
+
dynamic = ['readme', 'version']
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
license = { file = "LICENSE" }
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Development Status :: 2 - Pre-Alpha",
|
|
14
|
+
"Framework :: Pytest",
|
|
15
|
+
"Intended Audience :: Science/Research",
|
|
16
|
+
"License :: OSI Approved :: MIT License",
|
|
17
|
+
"Programming Language :: Python :: 3",
|
|
18
|
+
"Topic :: Scientific/Engineering",
|
|
19
|
+
"Topic :: Software Development :: Testing",
|
|
20
|
+
]
|
|
21
|
+
dependencies = ["pytest>=8"]
|
|
22
|
+
|
|
23
|
+
[project.optional-dependencies]
|
|
24
|
+
render = ["pyyaml>=6"]
|
|
25
|
+
docs = ["sphinx", "myst-nb", "sphinx-book-theme", "sphinx-autoapi", "sphinx_autodoc_typehints", "ipython"]
|
|
26
|
+
test = ["pytest-cov", "pyyaml>=6"]
|
|
27
|
+
dev = ["pre-commit"]
|
|
28
|
+
|
|
29
|
+
[project.urls]
|
|
30
|
+
Homepage = "https://github.com/CoreySpohn/ineedvalidation"
|
|
31
|
+
Issues = "https://github.com/CoreySpohn/ineedvalidation/issues"
|
|
32
|
+
|
|
33
|
+
[project.entry-points.pytest11]
|
|
34
|
+
ineedvalidation = "ineedvalidation.plugin"
|
|
35
|
+
|
|
36
|
+
[project.scripts]
|
|
37
|
+
ineedvalidation = "ineedvalidation.cli:main"
|
|
38
|
+
|
|
39
|
+
[tool.hatch.version]
|
|
40
|
+
source = "vcs"
|
|
41
|
+
|
|
42
|
+
[tool.hatch.build.hooks.vcs]
|
|
43
|
+
version-file = "src/ineedvalidation/_version.py"
|
|
44
|
+
|
|
45
|
+
[tool.hatch.metadata.hooks.fancy-pypi-readme]
|
|
46
|
+
content-type = "text/markdown"
|
|
47
|
+
|
|
48
|
+
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
|
|
49
|
+
path = "README.md"
|
|
50
|
+
|
|
51
|
+
[tool.ruff.lint]
|
|
52
|
+
select = ["B", "D", "E", "F", "I", "UP", "RUF"]
|
|
53
|
+
|
|
54
|
+
[tool.ruff.lint.pydocstyle]
|
|
55
|
+
convention = "google"
|
|
56
|
+
|
|
57
|
+
[tool.ruff.lint.per-file-ignores]
|
|
58
|
+
"tests/**" = ["D"]
|
|
59
|
+
|
|
60
|
+
[tool.pytest.ini_options]
|
|
61
|
+
testpaths = ["tests"]
|
|
62
|
+
|
|
63
|
+
[tool.hatch.build.targets.wheel]
|
|
64
|
+
packages = ["src/ineedvalidation"]
|
|
65
|
+
|
|
66
|
+
[tool.hatch.build.targets.sdist]
|
|
67
|
+
exclude = ["/scripts", "/docs", "/tests", "/.github"]
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"""Evidence declarations for tests and a validation hierarchy built from them.
|
|
2
|
+
|
|
3
|
+
The test half is a pytest plugin: :func:`case`, :func:`seam` and
|
|
4
|
+
:func:`regression` mark what a test demonstrates, and the plugin collects those
|
|
5
|
+
marks into an evidence ledger. The render half reads hierarchy node notes plus
|
|
6
|
+
that ledger, lints them against each other, and renders the hierarchy.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from ineedvalidation._version import __version__
|
|
10
|
+
from ineedvalidation.marks import TIERS, case, regression, seam
|
|
11
|
+
|
|
12
|
+
__all__ = ["TIERS", "__version__", "case", "regression", "seam"]
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# file generated by vcs-versioning
|
|
2
|
+
# don't change, don't track in version control
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
__all__ = [
|
|
6
|
+
"__version__",
|
|
7
|
+
"__version_tuple__",
|
|
8
|
+
"version",
|
|
9
|
+
"version_tuple",
|
|
10
|
+
"__commit_id__",
|
|
11
|
+
"commit_id",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
version: str
|
|
15
|
+
__version__: str
|
|
16
|
+
__version_tuple__: tuple[int | str, ...]
|
|
17
|
+
version_tuple: tuple[int | str, ...]
|
|
18
|
+
commit_id: str | None
|
|
19
|
+
__commit_id__: str | None
|
|
20
|
+
|
|
21
|
+
__version__ = version = '0.0.1'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 0, 1)
|
|
23
|
+
|
|
24
|
+
__commit_id__ = commit_id = None
|