omids-validator 0.2.0__tar.gz → 0.2.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.
Files changed (58) hide show
  1. omids_validator-0.2.1/PKG-INFO +119 -0
  2. omids_validator-0.2.1/README.md +105 -0
  3. {omids_validator-0.2.0 → omids_validator-0.2.1}/pyproject.toml +1 -1
  4. omids_validator-0.2.1/src/omids_validator.egg-info/PKG-INFO +119 -0
  5. omids_validator-0.2.0/PKG-INFO +0 -158
  6. omids_validator-0.2.0/README.md +0 -144
  7. omids_validator-0.2.0/src/omids_validator.egg-info/PKG-INFO +0 -158
  8. {omids_validator-0.2.0 → omids_validator-0.2.1}/LICENSE +0 -0
  9. {omids_validator-0.2.0 → omids_validator-0.2.1}/setup.cfg +0 -0
  10. {omids_validator-0.2.0 → omids_validator-0.2.1}/src/omids_validator/__init__.py +0 -0
  11. {omids_validator-0.2.0 → omids_validator-0.2.1}/src/omids_validator/__main__.py +0 -0
  12. {omids_validator-0.2.0 → omids_validator-0.2.1}/src/omids_validator/acquisition_profiles.py +0 -0
  13. {omids_validator-0.2.0 → omids_validator-0.2.1}/src/omids_validator/cli.py +0 -0
  14. {omids_validator-0.2.0 → omids_validator-0.2.1}/src/omids_validator/data/metadata_requirements.json +0 -0
  15. {omids_validator-0.2.0 → omids_validator-0.2.1}/src/omids_validator/data/rules.json +0 -0
  16. {omids_validator-0.2.0 → omids_validator-0.2.1}/src/omids_validator/file_types.py +0 -0
  17. {omids_validator-0.2.0 → omids_validator-0.2.1}/src/omids_validator/inventory.py +0 -0
  18. {omids_validator-0.2.0 → omids_validator-0.2.1}/src/omids_validator/models.py +0 -0
  19. {omids_validator-0.2.0 → omids_validator-0.2.1}/src/omids_validator/participant_table.py +0 -0
  20. {omids_validator-0.2.0 → omids_validator-0.2.1}/src/omids_validator/participants.py +0 -0
  21. {omids_validator-0.2.0 → omids_validator-0.2.1}/src/omids_validator/patient_metadata.py +0 -0
  22. {omids_validator-0.2.0 → omids_validator-0.2.1}/src/omids_validator/reporters/__init__.py +0 -0
  23. {omids_validator-0.2.0 → omids_validator-0.2.1}/src/omids_validator/reporters/html_report.py +0 -0
  24. {omids_validator-0.2.0 → omids_validator-0.2.1}/src/omids_validator/reporters/json_report.py +0 -0
  25. {omids_validator-0.2.0 → omids_validator-0.2.1}/src/omids_validator/reporters/markdown_report.py +0 -0
  26. {omids_validator-0.2.0 → omids_validator-0.2.1}/src/omids_validator/reporters/report_data.py +0 -0
  27. {omids_validator-0.2.0 → omids_validator-0.2.1}/src/omids_validator/reporters/terminal.py +0 -0
  28. {omids_validator-0.2.0 → omids_validator-0.2.1}/src/omids_validator/rule_catalog.py +0 -0
  29. {omids_validator-0.2.0 → omids_validator-0.2.1}/src/omids_validator/rules/__init__.py +0 -0
  30. {omids_validator-0.2.0 → omids_validator-0.2.1}/src/omids_validator/rules/layer0_structure.py +0 -0
  31. {omids_validator-0.2.0 → omids_validator-0.2.1}/src/omids_validator/rules/layer1_naming.py +0 -0
  32. {omids_validator-0.2.0 → omids_validator-0.2.1}/src/omids_validator/rules/layer2_sidecars.py +0 -0
  33. {omids_validator-0.2.0 → omids_validator-0.2.1}/src/omids_validator/rules/layer3_metadata.py +0 -0
  34. {omids_validator-0.2.0 → omids_validator-0.2.1}/src/omids_validator/rules/layer4_image_headers.py +0 -0
  35. {omids_validator-0.2.0 → omids_validator-0.2.1}/src/omids_validator/rules/layer5_dataset.py +0 -0
  36. {omids_validator-0.2.0 → omids_validator-0.2.1}/src/omids_validator/rules_document.py +0 -0
  37. {omids_validator-0.2.0 → omids_validator-0.2.1}/src/omids_validator/validator.py +0 -0
  38. {omids_validator-0.2.0 → omids_validator-0.2.1}/src/omids_validator.egg-info/SOURCES.txt +0 -0
  39. {omids_validator-0.2.0 → omids_validator-0.2.1}/src/omids_validator.egg-info/dependency_links.txt +0 -0
  40. {omids_validator-0.2.0 → omids_validator-0.2.1}/src/omids_validator.egg-info/entry_points.txt +0 -0
  41. {omids_validator-0.2.0 → omids_validator-0.2.1}/src/omids_validator.egg-info/requires.txt +0 -0
  42. {omids_validator-0.2.0 → omids_validator-0.2.1}/src/omids_validator.egg-info/top_level.txt +0 -0
  43. {omids_validator-0.2.0 → omids_validator-0.2.1}/tests/test_acquisition_profiles.py +0 -0
  44. {omids_validator-0.2.0 → omids_validator-0.2.1}/tests/test_file_types.py +0 -0
  45. {omids_validator-0.2.0 → omids_validator-0.2.1}/tests/test_html_report.py +0 -0
  46. {omids_validator-0.2.0 → omids_validator-0.2.1}/tests/test_inventory.py +0 -0
  47. {omids_validator-0.2.0 → omids_validator-0.2.1}/tests/test_layer0_structure.py +0 -0
  48. {omids_validator-0.2.0 → omids_validator-0.2.1}/tests/test_layer1_naming.py +0 -0
  49. {omids_validator-0.2.0 → omids_validator-0.2.1}/tests/test_layer2_sidecars.py +0 -0
  50. {omids_validator-0.2.0 → omids_validator-0.2.1}/tests/test_layer3_metadata.py +0 -0
  51. {omids_validator-0.2.0 → omids_validator-0.2.1}/tests/test_layer4_image_headers.py +0 -0
  52. {omids_validator-0.2.0 → omids_validator-0.2.1}/tests/test_layer5_dataset.py +0 -0
  53. {omids_validator-0.2.0 → omids_validator-0.2.1}/tests/test_markdown_report.py +0 -0
  54. {omids_validator-0.2.0 → omids_validator-0.2.1}/tests/test_models.py +0 -0
  55. {omids_validator-0.2.0 → omids_validator-0.2.1}/tests/test_participants.py +0 -0
  56. {omids_validator-0.2.0 → omids_validator-0.2.1}/tests/test_reporting.py +0 -0
  57. {omids_validator-0.2.0 → omids_validator-0.2.1}/tests/test_rule_catalog.py +0 -0
  58. {omids_validator-0.2.0 → omids_validator-0.2.1}/tests/test_rules_document.py +0 -0
@@ -0,0 +1,119 @@
1
+ Metadata-Version: 2.4
2
+ Name: omids-validator
3
+ Version: 0.2.1
4
+ Summary: Validate MIDS-formatted musculoskeletal imaging datasets
5
+ Author: Sean McGarry
6
+ License-Expression: GPL-3.0-or-later
7
+ Project-URL: Repository, https://github.com/ormir-mids/mids-validator
8
+ Project-URL: Issues, https://github.com/ormir-mids/mids-validator/issues
9
+ Requires-Python: >=3.10
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ Requires-Dist: nibabel>=5.0
13
+ Dynamic: license-file
14
+
15
+ # OMIDS Validator
16
+
17
+ OMIDS Validator checks MIDS-formatted musculoskeletal imaging datasets for
18
+ structural, naming, companion-file, metadata, image-header, and dataset-wide
19
+ consistency issues. It produces HTML, Markdown, and JSON reports that can be
20
+ reviewed or shared without rerunning the validation.
21
+
22
+ ## Status
23
+
24
+ OMIDS Validator 0.2 is an early public release intended for testing on
25
+ MIDS-formatted datasets. Validation rules and command-line behavior may change
26
+ as the MIDS standard and implementation are refined.
27
+
28
+ If the validator does not handle your dataset or workflow as expected, please
29
+ [open a GitHub issue](https://github.com/ormir-mids/mids-validator/issues).
30
+
31
+ ## Installation
32
+
33
+ OMIDS Validator requires Python 3.10 or newer.
34
+
35
+ ```bash
36
+ python -m pip install omids-validator
37
+ ```
38
+
39
+ The installation provides two equivalent command spellings:
40
+ `omids_validator` and `omids-validator`. The examples below use
41
+ `omids_validator`.
42
+
43
+ ## Usage
44
+
45
+ Validate a dataset and write reports under a chosen directory:
46
+
47
+ ```bash
48
+ omids_validator /path/to/dataset --output-dir /path/to/reports
49
+ ```
50
+
51
+ The report directory must be outside the dataset. Each run creates a
52
+ timestamped `omids_reports_YYYY-MM-DD_HHMMSS` directory containing:
53
+
54
+ - `report.html`: a styled, self-contained report for browser review
55
+ - `report.md`: a plain-text-friendly review document
56
+ - `report.json`: structured output for downstream use
57
+
58
+ Include NIfTI header checks with:
59
+
60
+ ```bash
61
+ omids_validator /path/to/dataset --inspect-images \
62
+ --output-dir /path/to/reports
63
+ ```
64
+
65
+ NIfTI header inspection is optional because these checks extend beyond the
66
+ current MIDS specification.
67
+
68
+ ### Participant table updates
69
+
70
+ By default, OMIDS Validator does not modify the dataset. To create or update
71
+ `participants.tsv` as part of validation, add the `--participants` option:
72
+
73
+ ```bash
74
+ omids_validator /path/to/dataset --participants \
75
+ --output-dir /path/to/reports
76
+ ```
77
+
78
+ This option adds subject identifiers found in the dataset and can fill blank
79
+ age or sex cells from patient JSON sidecars when a value can be selected
80
+ safely. Existing nonblank participant values are not overwritten.
81
+
82
+ ### Validation-rule catalogue
83
+
84
+ Generate the current human-readable rule catalogue without validating a
85
+ dataset:
86
+
87
+ ```bash
88
+ omids_validator --rules --output-dir /path/to/output
89
+ ```
90
+
91
+ This writes `omids_validator_rules.md` in the selected output directory.
92
+
93
+ Run `omids_validator --help` for the complete command reference.
94
+
95
+ ## Development
96
+
97
+ Clone the repository and install it in editable mode:
98
+
99
+ ```bash
100
+ git clone https://github.com/ormir-mids/mids-validator.git
101
+ cd mids-validator
102
+ python -m pip install -e .
103
+ ```
104
+
105
+ Run the automated tests with:
106
+
107
+ ```bash
108
+ python -m unittest discover -s tests -v
109
+ ```
110
+
111
+ The installed commands call `omids_validator.cli:main`. Validation is
112
+ coordinated by `omids_validator.validator`, rule implementations are organized
113
+ by validation layer under `src/omids_validator/rules/`, and the authoritative
114
+ rule catalogue is `src/omids_validator/data/rules.json`.
115
+
116
+ ## License
117
+
118
+ OMIDS Validator is distributed under the GNU General Public License version 3
119
+ or any later version. See [`LICENSE`](LICENSE) for the complete terms.
@@ -0,0 +1,105 @@
1
+ # OMIDS Validator
2
+
3
+ OMIDS Validator checks MIDS-formatted musculoskeletal imaging datasets for
4
+ structural, naming, companion-file, metadata, image-header, and dataset-wide
5
+ consistency issues. It produces HTML, Markdown, and JSON reports that can be
6
+ reviewed or shared without rerunning the validation.
7
+
8
+ ## Status
9
+
10
+ OMIDS Validator 0.2 is an early public release intended for testing on
11
+ MIDS-formatted datasets. Validation rules and command-line behavior may change
12
+ as the MIDS standard and implementation are refined.
13
+
14
+ If the validator does not handle your dataset or workflow as expected, please
15
+ [open a GitHub issue](https://github.com/ormir-mids/mids-validator/issues).
16
+
17
+ ## Installation
18
+
19
+ OMIDS Validator requires Python 3.10 or newer.
20
+
21
+ ```bash
22
+ python -m pip install omids-validator
23
+ ```
24
+
25
+ The installation provides two equivalent command spellings:
26
+ `omids_validator` and `omids-validator`. The examples below use
27
+ `omids_validator`.
28
+
29
+ ## Usage
30
+
31
+ Validate a dataset and write reports under a chosen directory:
32
+
33
+ ```bash
34
+ omids_validator /path/to/dataset --output-dir /path/to/reports
35
+ ```
36
+
37
+ The report directory must be outside the dataset. Each run creates a
38
+ timestamped `omids_reports_YYYY-MM-DD_HHMMSS` directory containing:
39
+
40
+ - `report.html`: a styled, self-contained report for browser review
41
+ - `report.md`: a plain-text-friendly review document
42
+ - `report.json`: structured output for downstream use
43
+
44
+ Include NIfTI header checks with:
45
+
46
+ ```bash
47
+ omids_validator /path/to/dataset --inspect-images \
48
+ --output-dir /path/to/reports
49
+ ```
50
+
51
+ NIfTI header inspection is optional because these checks extend beyond the
52
+ current MIDS specification.
53
+
54
+ ### Participant table updates
55
+
56
+ By default, OMIDS Validator does not modify the dataset. To create or update
57
+ `participants.tsv` as part of validation, add the `--participants` option:
58
+
59
+ ```bash
60
+ omids_validator /path/to/dataset --participants \
61
+ --output-dir /path/to/reports
62
+ ```
63
+
64
+ This option adds subject identifiers found in the dataset and can fill blank
65
+ age or sex cells from patient JSON sidecars when a value can be selected
66
+ safely. Existing nonblank participant values are not overwritten.
67
+
68
+ ### Validation-rule catalogue
69
+
70
+ Generate the current human-readable rule catalogue without validating a
71
+ dataset:
72
+
73
+ ```bash
74
+ omids_validator --rules --output-dir /path/to/output
75
+ ```
76
+
77
+ This writes `omids_validator_rules.md` in the selected output directory.
78
+
79
+ Run `omids_validator --help` for the complete command reference.
80
+
81
+ ## Development
82
+
83
+ Clone the repository and install it in editable mode:
84
+
85
+ ```bash
86
+ git clone https://github.com/ormir-mids/mids-validator.git
87
+ cd mids-validator
88
+ python -m pip install -e .
89
+ ```
90
+
91
+ Run the automated tests with:
92
+
93
+ ```bash
94
+ python -m unittest discover -s tests -v
95
+ ```
96
+
97
+ The installed commands call `omids_validator.cli:main`. Validation is
98
+ coordinated by `omids_validator.validator`, rule implementations are organized
99
+ by validation layer under `src/omids_validator/rules/`, and the authoritative
100
+ rule catalogue is `src/omids_validator/data/rules.json`.
101
+
102
+ ## License
103
+
104
+ OMIDS Validator is distributed under the GNU General Public License version 3
105
+ or any later version. See [`LICENSE`](LICENSE) for the complete terms.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "omids-validator"
7
- version = "0.2.0"
7
+ version = "0.2.1"
8
8
  description = "Validate MIDS-formatted musculoskeletal imaging datasets"
9
9
  requires-python = ">=3.10"
10
10
  dependencies = ["nibabel>=5.0"]
@@ -0,0 +1,119 @@
1
+ Metadata-Version: 2.4
2
+ Name: omids-validator
3
+ Version: 0.2.1
4
+ Summary: Validate MIDS-formatted musculoskeletal imaging datasets
5
+ Author: Sean McGarry
6
+ License-Expression: GPL-3.0-or-later
7
+ Project-URL: Repository, https://github.com/ormir-mids/mids-validator
8
+ Project-URL: Issues, https://github.com/ormir-mids/mids-validator/issues
9
+ Requires-Python: >=3.10
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ Requires-Dist: nibabel>=5.0
13
+ Dynamic: license-file
14
+
15
+ # OMIDS Validator
16
+
17
+ OMIDS Validator checks MIDS-formatted musculoskeletal imaging datasets for
18
+ structural, naming, companion-file, metadata, image-header, and dataset-wide
19
+ consistency issues. It produces HTML, Markdown, and JSON reports that can be
20
+ reviewed or shared without rerunning the validation.
21
+
22
+ ## Status
23
+
24
+ OMIDS Validator 0.2 is an early public release intended for testing on
25
+ MIDS-formatted datasets. Validation rules and command-line behavior may change
26
+ as the MIDS standard and implementation are refined.
27
+
28
+ If the validator does not handle your dataset or workflow as expected, please
29
+ [open a GitHub issue](https://github.com/ormir-mids/mids-validator/issues).
30
+
31
+ ## Installation
32
+
33
+ OMIDS Validator requires Python 3.10 or newer.
34
+
35
+ ```bash
36
+ python -m pip install omids-validator
37
+ ```
38
+
39
+ The installation provides two equivalent command spellings:
40
+ `omids_validator` and `omids-validator`. The examples below use
41
+ `omids_validator`.
42
+
43
+ ## Usage
44
+
45
+ Validate a dataset and write reports under a chosen directory:
46
+
47
+ ```bash
48
+ omids_validator /path/to/dataset --output-dir /path/to/reports
49
+ ```
50
+
51
+ The report directory must be outside the dataset. Each run creates a
52
+ timestamped `omids_reports_YYYY-MM-DD_HHMMSS` directory containing:
53
+
54
+ - `report.html`: a styled, self-contained report for browser review
55
+ - `report.md`: a plain-text-friendly review document
56
+ - `report.json`: structured output for downstream use
57
+
58
+ Include NIfTI header checks with:
59
+
60
+ ```bash
61
+ omids_validator /path/to/dataset --inspect-images \
62
+ --output-dir /path/to/reports
63
+ ```
64
+
65
+ NIfTI header inspection is optional because these checks extend beyond the
66
+ current MIDS specification.
67
+
68
+ ### Participant table updates
69
+
70
+ By default, OMIDS Validator does not modify the dataset. To create or update
71
+ `participants.tsv` as part of validation, add the `--participants` option:
72
+
73
+ ```bash
74
+ omids_validator /path/to/dataset --participants \
75
+ --output-dir /path/to/reports
76
+ ```
77
+
78
+ This option adds subject identifiers found in the dataset and can fill blank
79
+ age or sex cells from patient JSON sidecars when a value can be selected
80
+ safely. Existing nonblank participant values are not overwritten.
81
+
82
+ ### Validation-rule catalogue
83
+
84
+ Generate the current human-readable rule catalogue without validating a
85
+ dataset:
86
+
87
+ ```bash
88
+ omids_validator --rules --output-dir /path/to/output
89
+ ```
90
+
91
+ This writes `omids_validator_rules.md` in the selected output directory.
92
+
93
+ Run `omids_validator --help` for the complete command reference.
94
+
95
+ ## Development
96
+
97
+ Clone the repository and install it in editable mode:
98
+
99
+ ```bash
100
+ git clone https://github.com/ormir-mids/mids-validator.git
101
+ cd mids-validator
102
+ python -m pip install -e .
103
+ ```
104
+
105
+ Run the automated tests with:
106
+
107
+ ```bash
108
+ python -m unittest discover -s tests -v
109
+ ```
110
+
111
+ The installed commands call `omids_validator.cli:main`. Validation is
112
+ coordinated by `omids_validator.validator`, rule implementations are organized
113
+ by validation layer under `src/omids_validator/rules/`, and the authoritative
114
+ rule catalogue is `src/omids_validator/data/rules.json`.
115
+
116
+ ## License
117
+
118
+ OMIDS Validator is distributed under the GNU General Public License version 3
119
+ or any later version. See [`LICENSE`](LICENSE) for the complete terms.
@@ -1,158 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: omids-validator
3
- Version: 0.2.0
4
- Summary: Validate MIDS-formatted musculoskeletal imaging datasets
5
- Author: Sean McGarry
6
- License-Expression: GPL-3.0-or-later
7
- Project-URL: Repository, https://github.com/ormir-mids/mids-validator
8
- Project-URL: Issues, https://github.com/ormir-mids/mids-validator/issues
9
- Requires-Python: >=3.10
10
- Description-Content-Type: text/markdown
11
- License-File: LICENSE
12
- Requires-Dist: nibabel>=5.0
13
- Dynamic: license-file
14
-
15
- # OMIDS Validator
16
-
17
- The OMIDS Validator checks MIDS-formatted musculoskeletal imaging datasets for
18
- structural, naming, companion-file, metadata, image-header, and dataset-wide
19
- consistency issues. It produces self-contained HTML, Markdown, and JSON reports
20
- that can be reviewed or shared without rerunning the validation.
21
-
22
- ## Status
23
-
24
- This repository contains the current development version of the validator.
25
- Validation rules and command-line behavior may change while the MIDS standard
26
- and the implementation are being refined.
27
-
28
- ## Requirements
29
-
30
- - Python 3.10 or newer
31
- - `pip`
32
-
33
- Runtime dependencies are declared in `pyproject.toml`. Installing the project
34
- also installs the required version of NiBabel and its dependencies.
35
-
36
- ## Installation
37
-
38
- From the repository root, create a virtual environment and install the package:
39
-
40
- ```bash
41
- python3 -m venv .venv
42
- source .venv/bin/activate
43
- python -m pip install --upgrade pip
44
- python -m pip install -e .
45
- ```
46
-
47
- On Windows PowerShell, activate the environment with:
48
-
49
- ```powershell
50
- .venv\Scripts\Activate.ps1
51
- ```
52
-
53
- The editable installation makes the `omids_validator` and `omids-validator`
54
- commands available and keeps them linked to the checked-out source code. Both
55
- commands run the same validator; the examples below use `omids_validator`.
56
-
57
- ## Usage
58
-
59
- Validate a dataset:
60
-
61
- ```bash
62
- omids_validator /path/to/dataset
63
- ```
64
-
65
- Include NIfTI header checks:
66
-
67
- ```bash
68
- omids_validator /path/to/dataset --inspect-images
69
- ```
70
-
71
- Write reports under a chosen directory:
72
-
73
- ```bash
74
- omids_validator /path/to/dataset --output-dir /path/to/reports
75
- ```
76
-
77
- The report directory must be outside the dataset being validated. Each run
78
- creates a timestamped `omids_reports_YYYY-MM-DD_HHMMSS` directory containing:
79
-
80
- - `report.html`: a styled, self-contained report for browser review
81
- - `report.md`: a plain-text-friendly review document
82
- - `report.json`: structured output for downstream use
83
-
84
- Ordinary validation is read-only. The `--participants` option is different: it
85
- creates `participants.tsv` when missing and adds subject identifiers discovered
86
- in the dataset. It also fills blank age and sex cells from patient JSON
87
- sidecars when the values can be selected safely. Existing nonblank cells are
88
- never overwritten. Review the dataset and use this option only when that change
89
- is intended.
90
-
91
- ```bash
92
- omids_validator /path/to/dataset --participants
93
- ```
94
-
95
- Generate the current validation-rule catalogue without validating a dataset:
96
-
97
- ```bash
98
- omids_validator --rules --output-dir /path/to/output
99
- ```
100
-
101
- This writes `omids_validator_rules.md` directly in the selected output directory
102
- and replaces an existing file with that name.
103
-
104
- Run `omids_validator --help` for the complete command reference.
105
-
106
- ## Exit status
107
-
108
- - `0`: validation completed without errors, or the rule catalogue was written
109
- - `1`: validation completed and found one or more errors
110
- - `2`: the validator could not complete the requested operation
111
-
112
- An exit status of `1` means the reports were generated successfully and contain
113
- validation findings.
114
-
115
- ## Running the tests
116
-
117
- With the virtual environment active and the package installed:
118
-
119
- ```bash
120
- python -m unittest discover -s tests -v
121
- ```
122
-
123
- ## Repository layout
124
-
125
- - `src/omids_validator/`: validator, command-line interface, and report writers
126
- - `src/omids_validator/rules/`: validation rules organized by layer
127
- - `src/omids_validator/data/`: packaged rule and metadata catalogues
128
- - `tests/`: automated tests organized by validation layer and component
129
-
130
- ## How the code fits together
131
-
132
- The installed `omids_validator` command calls `omids_validator.cli:main`.
133
- `cli.py` reads the command-line options and calls `validator.validate`, which
134
- scans the dataset once, runs the rule layers in order, and returns one complete
135
- report. The modules under `reporters/` then write that report in each output
136
- format.
137
-
138
- `__main__.py` is intentionally small. It sends `python -m omids_validator` to
139
- the same `cli.main` function used by the installed command.
140
-
141
- The main supporting modules are:
142
-
143
- - `inventory.py`: scans and organizes dataset paths for all rule layers
144
- - `file_types.py`: shared NIfTI and JSON filename helpers
145
- - `acquisition_profiles.py`: scan suffix, folder, and metadata definitions used
146
- by Layers 1 and 3
147
- - `rule_catalog.py`: rule titles, severities, descriptions, and next steps from
148
- `data/rules.json`
149
- - `participant_table.py` and `participants.py`: reading and explicitly requested
150
- updates of `participants.tsv`
151
- - `patient_metadata.py`: one shared pass over patient JSON sidecars for Layer 5
152
- and participant-table updates
153
- - `models.py`: the findings and report objects shared by validation and reporting
154
-
155
- ## License
156
-
157
- OMIDS Validator is distributed under the GNU General Public License version 3
158
- or any later version. See [`LICENSE`](LICENSE) for the complete terms.
@@ -1,144 +0,0 @@
1
- # OMIDS Validator
2
-
3
- The OMIDS Validator checks MIDS-formatted musculoskeletal imaging datasets for
4
- structural, naming, companion-file, metadata, image-header, and dataset-wide
5
- consistency issues. It produces self-contained HTML, Markdown, and JSON reports
6
- that can be reviewed or shared without rerunning the validation.
7
-
8
- ## Status
9
-
10
- This repository contains the current development version of the validator.
11
- Validation rules and command-line behavior may change while the MIDS standard
12
- and the implementation are being refined.
13
-
14
- ## Requirements
15
-
16
- - Python 3.10 or newer
17
- - `pip`
18
-
19
- Runtime dependencies are declared in `pyproject.toml`. Installing the project
20
- also installs the required version of NiBabel and its dependencies.
21
-
22
- ## Installation
23
-
24
- From the repository root, create a virtual environment and install the package:
25
-
26
- ```bash
27
- python3 -m venv .venv
28
- source .venv/bin/activate
29
- python -m pip install --upgrade pip
30
- python -m pip install -e .
31
- ```
32
-
33
- On Windows PowerShell, activate the environment with:
34
-
35
- ```powershell
36
- .venv\Scripts\Activate.ps1
37
- ```
38
-
39
- The editable installation makes the `omids_validator` and `omids-validator`
40
- commands available and keeps them linked to the checked-out source code. Both
41
- commands run the same validator; the examples below use `omids_validator`.
42
-
43
- ## Usage
44
-
45
- Validate a dataset:
46
-
47
- ```bash
48
- omids_validator /path/to/dataset
49
- ```
50
-
51
- Include NIfTI header checks:
52
-
53
- ```bash
54
- omids_validator /path/to/dataset --inspect-images
55
- ```
56
-
57
- Write reports under a chosen directory:
58
-
59
- ```bash
60
- omids_validator /path/to/dataset --output-dir /path/to/reports
61
- ```
62
-
63
- The report directory must be outside the dataset being validated. Each run
64
- creates a timestamped `omids_reports_YYYY-MM-DD_HHMMSS` directory containing:
65
-
66
- - `report.html`: a styled, self-contained report for browser review
67
- - `report.md`: a plain-text-friendly review document
68
- - `report.json`: structured output for downstream use
69
-
70
- Ordinary validation is read-only. The `--participants` option is different: it
71
- creates `participants.tsv` when missing and adds subject identifiers discovered
72
- in the dataset. It also fills blank age and sex cells from patient JSON
73
- sidecars when the values can be selected safely. Existing nonblank cells are
74
- never overwritten. Review the dataset and use this option only when that change
75
- is intended.
76
-
77
- ```bash
78
- omids_validator /path/to/dataset --participants
79
- ```
80
-
81
- Generate the current validation-rule catalogue without validating a dataset:
82
-
83
- ```bash
84
- omids_validator --rules --output-dir /path/to/output
85
- ```
86
-
87
- This writes `omids_validator_rules.md` directly in the selected output directory
88
- and replaces an existing file with that name.
89
-
90
- Run `omids_validator --help` for the complete command reference.
91
-
92
- ## Exit status
93
-
94
- - `0`: validation completed without errors, or the rule catalogue was written
95
- - `1`: validation completed and found one or more errors
96
- - `2`: the validator could not complete the requested operation
97
-
98
- An exit status of `1` means the reports were generated successfully and contain
99
- validation findings.
100
-
101
- ## Running the tests
102
-
103
- With the virtual environment active and the package installed:
104
-
105
- ```bash
106
- python -m unittest discover -s tests -v
107
- ```
108
-
109
- ## Repository layout
110
-
111
- - `src/omids_validator/`: validator, command-line interface, and report writers
112
- - `src/omids_validator/rules/`: validation rules organized by layer
113
- - `src/omids_validator/data/`: packaged rule and metadata catalogues
114
- - `tests/`: automated tests organized by validation layer and component
115
-
116
- ## How the code fits together
117
-
118
- The installed `omids_validator` command calls `omids_validator.cli:main`.
119
- `cli.py` reads the command-line options and calls `validator.validate`, which
120
- scans the dataset once, runs the rule layers in order, and returns one complete
121
- report. The modules under `reporters/` then write that report in each output
122
- format.
123
-
124
- `__main__.py` is intentionally small. It sends `python -m omids_validator` to
125
- the same `cli.main` function used by the installed command.
126
-
127
- The main supporting modules are:
128
-
129
- - `inventory.py`: scans and organizes dataset paths for all rule layers
130
- - `file_types.py`: shared NIfTI and JSON filename helpers
131
- - `acquisition_profiles.py`: scan suffix, folder, and metadata definitions used
132
- by Layers 1 and 3
133
- - `rule_catalog.py`: rule titles, severities, descriptions, and next steps from
134
- `data/rules.json`
135
- - `participant_table.py` and `participants.py`: reading and explicitly requested
136
- updates of `participants.tsv`
137
- - `patient_metadata.py`: one shared pass over patient JSON sidecars for Layer 5
138
- and participant-table updates
139
- - `models.py`: the findings and report objects shared by validation and reporting
140
-
141
- ## License
142
-
143
- OMIDS Validator is distributed under the GNU General Public License version 3
144
- or any later version. See [`LICENSE`](LICENSE) for the complete terms.
@@ -1,158 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: omids-validator
3
- Version: 0.2.0
4
- Summary: Validate MIDS-formatted musculoskeletal imaging datasets
5
- Author: Sean McGarry
6
- License-Expression: GPL-3.0-or-later
7
- Project-URL: Repository, https://github.com/ormir-mids/mids-validator
8
- Project-URL: Issues, https://github.com/ormir-mids/mids-validator/issues
9
- Requires-Python: >=3.10
10
- Description-Content-Type: text/markdown
11
- License-File: LICENSE
12
- Requires-Dist: nibabel>=5.0
13
- Dynamic: license-file
14
-
15
- # OMIDS Validator
16
-
17
- The OMIDS Validator checks MIDS-formatted musculoskeletal imaging datasets for
18
- structural, naming, companion-file, metadata, image-header, and dataset-wide
19
- consistency issues. It produces self-contained HTML, Markdown, and JSON reports
20
- that can be reviewed or shared without rerunning the validation.
21
-
22
- ## Status
23
-
24
- This repository contains the current development version of the validator.
25
- Validation rules and command-line behavior may change while the MIDS standard
26
- and the implementation are being refined.
27
-
28
- ## Requirements
29
-
30
- - Python 3.10 or newer
31
- - `pip`
32
-
33
- Runtime dependencies are declared in `pyproject.toml`. Installing the project
34
- also installs the required version of NiBabel and its dependencies.
35
-
36
- ## Installation
37
-
38
- From the repository root, create a virtual environment and install the package:
39
-
40
- ```bash
41
- python3 -m venv .venv
42
- source .venv/bin/activate
43
- python -m pip install --upgrade pip
44
- python -m pip install -e .
45
- ```
46
-
47
- On Windows PowerShell, activate the environment with:
48
-
49
- ```powershell
50
- .venv\Scripts\Activate.ps1
51
- ```
52
-
53
- The editable installation makes the `omids_validator` and `omids-validator`
54
- commands available and keeps them linked to the checked-out source code. Both
55
- commands run the same validator; the examples below use `omids_validator`.
56
-
57
- ## Usage
58
-
59
- Validate a dataset:
60
-
61
- ```bash
62
- omids_validator /path/to/dataset
63
- ```
64
-
65
- Include NIfTI header checks:
66
-
67
- ```bash
68
- omids_validator /path/to/dataset --inspect-images
69
- ```
70
-
71
- Write reports under a chosen directory:
72
-
73
- ```bash
74
- omids_validator /path/to/dataset --output-dir /path/to/reports
75
- ```
76
-
77
- The report directory must be outside the dataset being validated. Each run
78
- creates a timestamped `omids_reports_YYYY-MM-DD_HHMMSS` directory containing:
79
-
80
- - `report.html`: a styled, self-contained report for browser review
81
- - `report.md`: a plain-text-friendly review document
82
- - `report.json`: structured output for downstream use
83
-
84
- Ordinary validation is read-only. The `--participants` option is different: it
85
- creates `participants.tsv` when missing and adds subject identifiers discovered
86
- in the dataset. It also fills blank age and sex cells from patient JSON
87
- sidecars when the values can be selected safely. Existing nonblank cells are
88
- never overwritten. Review the dataset and use this option only when that change
89
- is intended.
90
-
91
- ```bash
92
- omids_validator /path/to/dataset --participants
93
- ```
94
-
95
- Generate the current validation-rule catalogue without validating a dataset:
96
-
97
- ```bash
98
- omids_validator --rules --output-dir /path/to/output
99
- ```
100
-
101
- This writes `omids_validator_rules.md` directly in the selected output directory
102
- and replaces an existing file with that name.
103
-
104
- Run `omids_validator --help` for the complete command reference.
105
-
106
- ## Exit status
107
-
108
- - `0`: validation completed without errors, or the rule catalogue was written
109
- - `1`: validation completed and found one or more errors
110
- - `2`: the validator could not complete the requested operation
111
-
112
- An exit status of `1` means the reports were generated successfully and contain
113
- validation findings.
114
-
115
- ## Running the tests
116
-
117
- With the virtual environment active and the package installed:
118
-
119
- ```bash
120
- python -m unittest discover -s tests -v
121
- ```
122
-
123
- ## Repository layout
124
-
125
- - `src/omids_validator/`: validator, command-line interface, and report writers
126
- - `src/omids_validator/rules/`: validation rules organized by layer
127
- - `src/omids_validator/data/`: packaged rule and metadata catalogues
128
- - `tests/`: automated tests organized by validation layer and component
129
-
130
- ## How the code fits together
131
-
132
- The installed `omids_validator` command calls `omids_validator.cli:main`.
133
- `cli.py` reads the command-line options and calls `validator.validate`, which
134
- scans the dataset once, runs the rule layers in order, and returns one complete
135
- report. The modules under `reporters/` then write that report in each output
136
- format.
137
-
138
- `__main__.py` is intentionally small. It sends `python -m omids_validator` to
139
- the same `cli.main` function used by the installed command.
140
-
141
- The main supporting modules are:
142
-
143
- - `inventory.py`: scans and organizes dataset paths for all rule layers
144
- - `file_types.py`: shared NIfTI and JSON filename helpers
145
- - `acquisition_profiles.py`: scan suffix, folder, and metadata definitions used
146
- by Layers 1 and 3
147
- - `rule_catalog.py`: rule titles, severities, descriptions, and next steps from
148
- `data/rules.json`
149
- - `participant_table.py` and `participants.py`: reading and explicitly requested
150
- updates of `participants.tsv`
151
- - `patient_metadata.py`: one shared pass over patient JSON sidecars for Layer 5
152
- and participant-table updates
153
- - `models.py`: the findings and report objects shared by validation and reporting
154
-
155
- ## License
156
-
157
- OMIDS Validator is distributed under the GNU General Public License version 3
158
- or any later version. See [`LICENSE`](LICENSE) for the complete terms.
File without changes