From 251f4400ee44ea5555d418dc12c852b5c3ef7aa0 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Tue, 5 Oct 2021 14:02:10 -0400 Subject: [PATCH] [SCHEMA] Consolidate schema files by term type (#883) * Reorganize schema. * Fix formatting issues. * Start documenting new structure in README. Still need to document the rules files. * Fix every indent ever. * Fix MD spacing. * Update README.md * Update README.md * Document the rules files. * Clean up the datatypes rules files. * Get schemacode working with new structure. * It turns out the extra indents are not strictly YAML compliant. * "date" should be a format, not a pattern. See https://github.com/bids-standard/bids-specification/pull/885/files#r715815807. * Apply suggestions from code review The datatype descriptions. Co-authored-by: Chris Markiewicz * Apply suggestions from code review Make utility functions public. Co-authored-by: Chris Markiewicz * Apply suggestions from code review Thanks @Remi-Gau! Co-authored-by: Remi Gau * Explain entity "types" a bit better. * Try fixing the markdown style issues. * Update README.md * Update README.md * Update README.md Co-authored-by: Chris Markiewicz Co-authored-by: Remi Gau --- .yamllint.yml | 3 + src/schema/README.md | 500 ++- src/schema/associated_data.yaml | 9 - src/schema/metadata/Acknowledgements.yaml | 6 - src/schema/metadata/AcquisitionDuration.yaml | 9 - src/schema/metadata/AcquisitionMode.yaml | 5 - src/schema/metadata/AcquisitionVoxelSize.yaml | 16 - src/schema/metadata/Anaesthesia.yaml | 5 - src/schema/metadata/AnalyticalApproach.yaml | 14 - .../AnatomicalLandmarkCoordinateSystem.yaml | 13 - ...alLandmarkCoordinateSystemDescription.yaml | 7 - .../AnatomicalLandmarkCoordinateUnits.yaml | 11 - .../AnatomicalLandmarkCoordinates.yaml | 16 - .../AnatomicalLandmarkCoordinates_mri.yaml | 18 - .../metadata/ArterialSpinLabelingType.yaml | 9 - src/schema/metadata/AssociatedEmptyRoom.yaml | 17 - src/schema/metadata/Atlas.yaml | 5 - .../metadata/AttenuationCorrection.yaml | 5 - .../AttenuationCorrectionMethodReference.yaml | 5 - src/schema/metadata/Authors.yaml | 7 - src/schema/metadata/B0FieldIdentifier.yaml | 13 - src/schema/metadata/B0FieldSource.yaml | 16 - src/schema/metadata/BIDSVersion.yaml | 5 - .../metadata/BackgroundSuppression.yaml | 5 - .../BackgroundSuppressionNumberPulses.yaml | 9 - .../BackgroundSuppressionPulseTime.yaml | 13 - src/schema/metadata/BasedOn.yaml | 12 - src/schema/metadata/BloodDensity.yaml | 6 - src/schema/metadata/BodyPart.yaml | 6 - src/schema/metadata/BolusCutOffDelayTime.yaml | 20 - src/schema/metadata/BolusCutOffFlag.yaml | 6 - src/schema/metadata/BolusCutOffTechnique.yaml | 6 - src/schema/metadata/BrainLocation.yaml | 12 - src/schema/metadata/CASLType.yaml | 9 - src/schema/metadata/CapManufacturer.yaml | 5 - .../metadata/CapManufacturersModelName.yaml | 6 - src/schema/metadata/CellType.yaml | 7 - src/schema/metadata/Code.yaml | 10 - src/schema/metadata/CogAtlasID.yaml | 8 - src/schema/metadata/CogPOID.yaml | 7 - .../metadata/CoilCombinationMethod.yaml | 9 - src/schema/metadata/Columns.yaml | 7 - .../metadata/ContinuousHeadLocalization.yaml | 6 - .../metadata/ContrastBolusIngredient.yaml | 14 - src/schema/metadata/DCOffsetCorrection.yaml | 7 - src/schema/metadata/DatasetDOI.yaml | 10 - src/schema/metadata/DatasetType.yaml | 10 - .../metadata/DecayCorrectionFactor.yaml | 7 - src/schema/metadata/DelayAfterTrigger.yaml | 10 - src/schema/metadata/DelayTime.yaml | 13 - src/schema/metadata/Density.yaml | 11 - src/schema/metadata/Description.yaml | 5 - src/schema/metadata/DeviceSerialNumber.yaml | 7 - src/schema/metadata/DewarPosition.yaml | 7 - src/schema/metadata/DigitizedHeadPoints.yaml | 6 - .../DigitizedHeadPointsCoordinateSystem.yaml | 14 - ...HeadPointsCoordinateSystemDescription.yaml | 7 - .../DigitizedHeadPointsCoordinateUnits.yaml | 11 - src/schema/metadata/DigitizedLandmarks.yaml | 6 - src/schema/metadata/DispersionConstant.yaml | 7 - src/schema/metadata/DispersionCorrected.yaml | 6 - .../metadata/DoseCalibrationFactor.yaml | 6 - src/schema/metadata/DwellTime.yaml | 15 - src/schema/metadata/ECGChannelCount.yaml | 6 - src/schema/metadata/ECOGChannelCount.yaml | 6 - src/schema/metadata/EEGChannelCount.yaml | 6 - src/schema/metadata/EEGCoordinateSystem.yaml | 15 - .../EEGCoordinateSystemDescription.yaml | 7 - src/schema/metadata/EEGCoordinateUnits.yaml | 11 - src/schema/metadata/EEGGround.yaml | 6 - src/schema/metadata/EEGPlacementScheme.yaml | 7 - src/schema/metadata/EEGReference.yaml | 10 - src/schema/metadata/EMGChannelCount.yaml | 6 - src/schema/metadata/EOGChannelCount.yaml | 6 - src/schema/metadata/EchoTime.yaml | 26 - src/schema/metadata/EchoTime1.yaml | 7 - src/schema/metadata/EchoTime2.yaml | 7 - src/schema/metadata/EchoTime_fmap.yaml | 8 - src/schema/metadata/EffectiveEchoSpacing.yaml | 16 - .../metadata/ElectricalStimulation.yaml | 7 - .../ElectricalStimulationParameters.yaml | 7 - .../metadata/ElectrodeManufacturer.yaml | 8 - .../ElectrodeManufacturersModelName.yaml | 6 - src/schema/metadata/EpochLength.yaml | 8 - src/schema/metadata/EstimationAlgorithm.yaml | 6 - src/schema/metadata/EstimationReference.yaml | 5 - src/schema/metadata/EthicsApprovals.yaml | 8 - .../metadata/FiducialsCoordinateSystem.yaml | 15 - .../FiducialsCoordinateSystemDescription.yaml | 7 - .../metadata/FiducialsCoordinateUnits.yaml | 12 - src/schema/metadata/FiducialsCoordinates.yaml | 16 - src/schema/metadata/FiducialsDescription.yaml | 8 - src/schema/metadata/FlipAngle.yaml | 29 - src/schema/metadata/FrameDuration.yaml | 10 - src/schema/metadata/FrameTimesStart.yaml | 8 - src/schema/metadata/Funding.yaml | 7 - src/schema/metadata/GeneratedBy.yaml | 29 - src/schema/metadata/GeneticLevel.yaml | 11 - src/schema/metadata/Genetics.Database.yaml | 7 - src/schema/metadata/Genetics.Dataset.yaml | 7 - src/schema/metadata/Genetics.Descriptors.yaml | 12 - src/schema/metadata/Genetics.yaml | 12 - src/schema/metadata/GradientSetType.yaml | 8 - src/schema/metadata/HED.yaml | 10 - src/schema/metadata/HEDVersion.yaml | 6 - src/schema/metadata/Haematocrit.yaml | 6 - .../HardcopyDeviceSoftwareVersion.yaml | 7 - src/schema/metadata/HardwareFilters.yaml | 15 - src/schema/metadata/HeadCircumference.yaml | 7 - .../metadata/HeadCoilCoordinateSystem.yaml | 14 - .../HeadCoilCoordinateSystemDescription.yaml | 7 - .../metadata/HeadCoilCoordinateUnits.yaml | 11 - src/schema/metadata/HeadCoilCoordinates.yaml | 21 - src/schema/metadata/HeadCoilFrequency.yaml | 14 - src/schema/metadata/HowToAcknowledge.yaml | 8 - src/schema/metadata/ImageDecayCorrected.yaml | 5 - .../metadata/ImageDecayCorrectionTime.yaml | 7 - .../metadata/InfusionRadioactivity.yaml | 8 - src/schema/metadata/InfusionSpeed.yaml | 5 - src/schema/metadata/InfusionSpeedUnits.yaml | 6 - src/schema/metadata/InfusionStart.yaml | 7 - src/schema/metadata/InjectedMass.yaml | 13 - .../metadata/InjectedMassPerWeight.yaml | 5 - .../metadata/InjectedMassPerWeightUnits.yaml | 7 - src/schema/metadata/InjectedMassUnits.yaml | 13 - .../metadata/InjectedRadioactivity.yaml | 8 - .../metadata/InjectedRadioactivityUnits.yaml | 6 - src/schema/metadata/InjectedVolume.yaml | 6 - src/schema/metadata/InjectionEnd.yaml | 7 - src/schema/metadata/InjectionStart.yaml | 9 - src/schema/metadata/InstitutionAddress.yaml | 6 - src/schema/metadata/InstitutionName.yaml | 6 - .../metadata/InstitutionalDepartmentName.yaml | 6 - src/schema/metadata/Instructions.yaml | 5 - src/schema/metadata/IntendedFor.yaml | 15 - src/schema/metadata/InversionTime.yaml | 11 - src/schema/metadata/LabelingDistance.yaml | 11 - src/schema/metadata/LabelingDuration.yaml | 24 - src/schema/metadata/LabelingEfficiency.yaml | 7 - .../metadata/LabelingLocationDescription.yaml | 11 - src/schema/metadata/LabelingOrientation.yaml | 10 - .../metadata/LabelingPulseAverageB1.yaml | 8 - .../LabelingPulseAverageGradient.yaml | 7 - .../metadata/LabelingPulseDuration.yaml | 7 - .../metadata/LabelingPulseFlipAngle.yaml | 10 - .../metadata/LabelingPulseInterval.yaml | 7 - .../LabelingPulseMaximumGradient.yaml | 8 - .../metadata/LabelingSlabThickness.yaml | 9 - src/schema/metadata/Levels.yaml | 8 - src/schema/metadata/License.yaml | 9 - src/schema/metadata/LongName.yaml | 5 - src/schema/metadata/LookLocker.yaml | 5 - src/schema/metadata/M0Estimate.yaml | 8 - src/schema/metadata/M0Type.yaml | 15 - src/schema/metadata/MEGChannelCount.yaml | 6 - src/schema/metadata/MEGCoordinateSystem.yaml | 13 - .../MEGCoordinateSystemDescription.yaml | 7 - src/schema/metadata/MEGCoordinateUnits.yaml | 11 - src/schema/metadata/MEGREFChannelCount.yaml | 8 - src/schema/metadata/MRAcquisitionType.yaml | 10 - .../metadata/MRTransmitCoilSequence.yaml | 6 - src/schema/metadata/MTNumberOfPulses.yaml | 5 - src/schema/metadata/MTOffsetFrequency.yaml | 7 - src/schema/metadata/MTPulseBandwidth.yaml | 6 - src/schema/metadata/MTPulseDuration.yaml | 6 - src/schema/metadata/MTPulseShape.yaml | 17 - src/schema/metadata/MTState.yaml | 6 - .../metadata/MagneticFieldStrength.yaml | 6 - src/schema/metadata/Manual.yaml | 6 - src/schema/metadata/Manufacturer.yaml | 5 - .../metadata/ManufacturersModelName.yaml | 5 - src/schema/metadata/MatrixCoilMode.yaml | 9 - src/schema/metadata/MaxMovement.yaml | 7 - src/schema/metadata/MetaboliteAvail.yaml | 7 - src/schema/metadata/MetaboliteMethod.yaml | 5 - .../MetaboliteRecoveryCorrectionApplied.yaml | 8 - src/schema/metadata/MiscChannelCount.yaml | 6 - src/schema/metadata/MixingTime.yaml | 10 - src/schema/metadata/ModeOfAdministration.yaml | 6 - src/schema/metadata/MolarActivity.yaml | 6 - .../metadata/MolarActivityMeasTime.yaml | 7 - src/schema/metadata/MolarActivityUnits.yaml | 6 - .../metadata/MultibandAccelerationFactor.yaml | 6 - src/schema/metadata/MultipartID.yaml | 6 - src/schema/metadata/Name.yaml | 5 - src/schema/metadata/NegativeContrast.yaml | 10 - .../metadata/NonlinearGradientCorrection.yaml | 6 - .../NumberOfVolumesDiscardedByScanner.yaml | 15 - .../NumberOfVolumesDiscardedByUser.yaml | 12 - src/schema/metadata/NumberShots.yaml | 18 - src/schema/metadata/OperatingSystem.yaml | 6 - src/schema/metadata/PASLType.yaml | 6 - src/schema/metadata/PCASLType.yaml | 9 - .../ParallelAcquisitionTechnique.yaml | 6 - .../ParallelReductionFactorInPlane.yaml | 8 - src/schema/metadata/PartialFourier.yaml | 6 - .../metadata/PartialFourierDirection.yaml | 6 - .../metadata/PharmaceuticalDoseAmount.yaml | 9 - .../metadata/PharmaceuticalDoseRegimen.yaml | 7 - .../metadata/PharmaceuticalDoseTime.yaml | 16 - .../metadata/PharmaceuticalDoseUnits.yaml | 7 - src/schema/metadata/PharmaceuticalName.yaml | 5 - .../metadata/PhaseEncodingDirection.yaml | 22 - src/schema/metadata/PlasmaAvail.yaml | 5 - src/schema/metadata/PlasmaFreeFraction.yaml | 9 - .../metadata/PlasmaFreeFractionMethod.yaml | 5 - src/schema/metadata/PostLabelingDelay.yaml | 24 - src/schema/metadata/PowerLineFrequency.yaml | 12 - src/schema/metadata/PromptRate.yaml | 7 - src/schema/metadata/PulseSequenceDetails.yaml | 9 - src/schema/metadata/PulseSequenceType.yaml | 7 - src/schema/metadata/Purity.yaml | 7 - src/schema/metadata/RandomRate.yaml | 7 - src/schema/metadata/RawSources.yaml | 9 - .../metadata/ReceiveCoilActiveElements.yaml | 7 - src/schema/metadata/ReceiveCoilName.yaml | 9 - src/schema/metadata/ReconFilterSize.yaml | 11 - src/schema/metadata/ReconFilterType.yaml | 9 - .../ReconMethodImplementationVersion.yaml | 5 - src/schema/metadata/ReconMethodName.yaml | 5 - .../metadata/ReconMethodParameterLabels.yaml | 7 - .../metadata/ReconMethodParameterUnits.yaml | 8 - .../metadata/ReconMethodParameterValues.yaml | 7 - src/schema/metadata/RecordingDuration.yaml | 6 - src/schema/metadata/RecordingType.yaml | 11 - src/schema/metadata/ReferencesAndLinks.yaml | 9 - src/schema/metadata/RepetitionTime.yaml | 22 - .../metadata/RepetitionTimeExcitation.yaml | 20 - .../metadata/RepetitionTimePreparation.yaml | 22 - src/schema/metadata/Resolution.yaml | 11 - src/schema/metadata/SEEGChannelCount.yaml | 6 - src/schema/metadata/SampleOrigin.yaml | 16 - src/schema/metadata/SamplingFrequency.yaml | 7 - src/schema/metadata/ScaleFactor.yaml | 7 - src/schema/metadata/ScanDate.yaml | 8 - src/schema/metadata/ScanOptions.yaml | 10 - src/schema/metadata/ScanStart.yaml | 6 - src/schema/metadata/ScanningSequence.yaml | 10 - src/schema/metadata/ScatterFraction.yaml | 9 - src/schema/metadata/SequenceName.yaml | 6 - src/schema/metadata/SequenceVariant.yaml | 10 - src/schema/metadata/SinglesRate.yaml | 7 - src/schema/metadata/SkullStripped.yaml | 5 - .../metadata/SliceEncodingDirection.yaml | 23 - src/schema/metadata/SliceTiming.yaml | 22 - src/schema/metadata/SoftwareFilters.yaml | 17 - src/schema/metadata/SoftwareName.yaml | 5 - src/schema/metadata/SoftwareRRID.yaml | 9 - src/schema/metadata/SoftwareVersion.yaml | 5 - src/schema/metadata/SoftwareVersions.yaml | 6 - src/schema/metadata/SourceDatasets.yaml | 20 - src/schema/metadata/Sources.yaml | 15 - src/schema/metadata/SpatialReference.yaml | 24 - .../metadata/SpecificRadioactivity.yaml | 11 - .../SpecificRadioactivityMeasTime.yaml | 7 - .../metadata/SpecificRadioactivityUnits.yaml | 12 - .../metadata/SpoilingGradientDuration.yaml | 8 - .../metadata/SpoilingGradientMoment.yaml | 7 - .../metadata/SpoilingRFPhaseIncrement.yaml | 8 - src/schema/metadata/SpoilingState.yaml | 6 - src/schema/metadata/SpoilingType.yaml | 10 - src/schema/metadata/StartTime.yaml | 7 - src/schema/metadata/StationName.yaml | 6 - src/schema/metadata/StimulusPresentation.yaml | 20 - .../metadata/SubjectArtefactDescription.yaml | 8 - src/schema/metadata/TaskDescription.yaml | 5 - src/schema/metadata/TaskName.yaml | 10 - src/schema/metadata/TermURL.yaml | 6 - src/schema/metadata/TimeZero.yaml | 8 - src/schema/metadata/TissueOrigin.yaml | 14 - src/schema/metadata/TotalAcquiredPairs.yaml | 7 - src/schema/metadata/TotalReadoutTime.yaml | 11 - .../metadata/TracerMolecularWeight.yaml | 5 - .../metadata/TracerMolecularWeightUnits.yaml | 6 - src/schema/metadata/TracerName.yaml | 5 - src/schema/metadata/TracerRadLex.yaml | 5 - src/schema/metadata/TracerRadionuclide.yaml | 5 - src/schema/metadata/TracerSNOMED.yaml | 6 - src/schema/metadata/TriggerChannelCount.yaml | 6 - src/schema/metadata/TubingLength.yaml | 6 - src/schema/metadata/TubingType.yaml | 6 - src/schema/metadata/Type.yaml | 12 - src/schema/metadata/Units.yaml | 8 - src/schema/metadata/VascularCrushing.yaml | 6 - src/schema/metadata/VascularCrushingVENC.yaml | 15 - src/schema/metadata/VolumeTiming.yaml | 16 - src/schema/metadata/WholeBloodAvail.yaml | 7 - src/schema/metadata/WithdrawalRate.yaml | 7 - src/schema/metadata/_CoordUnits.yaml | 7 - src/schema/metadata/_EEGCoordSys.yaml | 7 - src/schema/metadata/_GeneticLevelEnum.yaml | 9 - src/schema/metadata/_LandmarkCoordinates.yaml | 8 - src/schema/metadata/_MEGCoordSys.yaml | 9 - .../metadata/_StandardTemplateCoordSys.yaml | 25 - .../_StandardTemplateDeprecatedCoordSys.yaml | 17 - src/schema/metadata/_iEEGCoordSys.yaml | 7 - src/schema/metadata/_template.yaml | 5 - .../iEEGCoordinateProcessingDescription.yaml | 6 - .../iEEGCoordinateProcessingReference.yaml | 6 - src/schema/metadata/iEEGCoordinateSystem.yaml | 19 - .../iEEGCoordinateSystemDescription.yaml | 7 - src/schema/metadata/iEEGCoordinateUnits.yaml | 12 - src/schema/metadata/iEEGElectrodeGroups.yaml | 8 - src/schema/metadata/iEEGGround.yaml | 6 - src/schema/metadata/iEEGPlacementScheme.yaml | 9 - src/schema/metadata/iEEGReference.yaml | 13 - src/schema/modalities.yaml | 29 - src/schema/objects/associated_data.yaml | 28 + src/schema/objects/datatypes.yaml | 40 + src/schema/{ => objects}/entities.yaml | 281 +- src/schema/objects/metadata.yaml | 2790 +++++++++++++++++ src/schema/objects/modalities.yaml | 26 + src/schema/objects/suffixes.yaml | 560 ++++ src/schema/objects/top_level_files.yaml | 79 + src/schema/rules/associated_data.yaml | 11 + src/schema/{ => rules}/datatypes/anat.yaml | 138 +- src/schema/{ => rules}/datatypes/beh.yaml | 21 +- src/schema/{ => rules}/datatypes/dwi.yaml | 21 +- src/schema/{ => rules}/datatypes/eeg.yaml | 49 +- src/schema/{ => rules}/datatypes/fmap.yaml | 84 +- src/schema/{ => rules}/datatypes/func.yaml | 37 +- src/schema/{ => rules}/datatypes/ieeg.yaml | 51 +- src/schema/{ => rules}/datatypes/meg.yaml | 60 +- src/schema/{ => rules}/datatypes/perf.yaml | 22 +- src/schema/{ => rules}/datatypes/pet.yaml | 22 +- src/schema/rules/entities.yaml | 27 + src/schema/rules/modalities.yaml | 24 + src/schema/{ => rules}/top_level_files.yaml | 18 +- src/schema/suffixes/Chimap.yaml | 10 - src/schema/suffixes/FLAIR.yaml | 8 - src/schema/suffixes/FLASH.yaml | 12 - src/schema/suffixes/IRT1.yaml | 6 - src/schema/suffixes/M0map.yaml | 9 - src/schema/suffixes/MEGRE.yaml | 6 - src/schema/suffixes/MESE.yaml | 7 - src/schema/suffixes/MP2RAGE.yaml | 7 - src/schema/suffixes/MPM.yaml | 10 - src/schema/suffixes/MTR.yaml | 5 - src/schema/suffixes/MTRmap.yaml | 11 - src/schema/suffixes/MTS.yaml | 8 - src/schema/suffixes/MTVmap.yaml | 7 - src/schema/suffixes/MTsat.yaml | 7 - src/schema/suffixes/MWFmap.yaml | 11 - src/schema/suffixes/PD.yaml | 6 - src/schema/suffixes/PDT2.yaml | 8 - src/schema/suffixes/PDT2map.yaml | 7 - src/schema/suffixes/PDmap.yaml | 7 - src/schema/suffixes/PDw.yaml | 11 - src/schema/suffixes/R1map.yaml | 7 - src/schema/suffixes/R2map.yaml | 7 - src/schema/suffixes/R2starmap.yaml | 7 - src/schema/suffixes/RB1COR.yaml | 7 - src/schema/suffixes/RB1map.yaml | 10 - src/schema/suffixes/S0map.yaml | 11 - src/schema/suffixes/T1map.yaml | 9 - src/schema/suffixes/T1rho.yaml | 7 - src/schema/suffixes/T1w.yaml | 14 - src/schema/suffixes/T2map.yaml | 7 - src/schema/suffixes/T2star.yaml | 8 - src/schema/suffixes/T2starmap.yaml | 7 - src/schema/suffixes/T2starw.yaml | 13 - src/schema/suffixes/T2w.yaml | 12 - src/schema/suffixes/TB1AFI.yaml | 6 - src/schema/suffixes/TB1DAM.yaml | 9 - src/schema/suffixes/TB1EPI.yaml | 8 - src/schema/suffixes/TB1RFM.yaml | 7 - src/schema/suffixes/TB1SRGE.yaml | 10 - src/schema/suffixes/TB1TFL.yaml | 7 - src/schema/suffixes/TB1map.yaml | 10 - src/schema/suffixes/UNIT1.yaml | 12 - src/schema/suffixes/VFA.yaml | 8 - src/schema/suffixes/_template.yaml | 3 - src/schema/suffixes/angio.yaml | 6 - src/schema/suffixes/asl.yaml | 6 - src/schema/suffixes/aslcontext.yaml | 4 - src/schema/suffixes/asllabeling.yaml | 6 - src/schema/suffixes/beh.yaml | 6 - src/schema/suffixes/blood.yaml | 6 - src/schema/suffixes/bold.yaml | 4 - src/schema/suffixes/cbv.yaml | 4 - src/schema/suffixes/channels.yaml | 4 - src/schema/suffixes/coordsystem.yaml | 5 - src/schema/suffixes/defacemask.yaml | 5 - src/schema/suffixes/dwi.yaml | 4 - src/schema/suffixes/eeg.yaml | 4 - src/schema/suffixes/electrodes.yaml | 4 - src/schema/suffixes/epi.yaml | 6 - src/schema/suffixes/events.yaml | 4 - src/schema/suffixes/fieldmap.yaml | 5 - src/schema/suffixes/headshape.yaml | 5 - src/schema/suffixes/ieeg.yaml | 4 - src/schema/suffixes/inplaneT1.yaml | 6 - src/schema/suffixes/inplaneT2.yaml | 6 - src/schema/suffixes/m0scan.yaml | 5 - src/schema/suffixes/magnitude.yaml | 6 - src/schema/suffixes/magnitude1.yaml | 5 - src/schema/suffixes/magnitude2.yaml | 5 - src/schema/suffixes/markers.yaml | 8 - src/schema/suffixes/meg.yaml | 5 - src/schema/suffixes/pet.yaml | 7 - src/schema/suffixes/phase.yaml | 12 - src/schema/suffixes/phase1.yaml | 5 - src/schema/suffixes/phase2.yaml | 5 - src/schema/suffixes/phasediff.yaml | 7 - src/schema/suffixes/photo.yaml | 5 - src/schema/suffixes/physio.yaml | 4 - src/schema/suffixes/sbref.yaml | 4 - src/schema/suffixes/stim.yaml | 4 - tools/schemacode/schema.py | 168 +- tools/schemacode/utils.py | 53 + 410 files changed, 4512 insertions(+), 4001 deletions(-) delete mode 100644 src/schema/associated_data.yaml delete mode 100644 src/schema/metadata/Acknowledgements.yaml delete mode 100644 src/schema/metadata/AcquisitionDuration.yaml delete mode 100644 src/schema/metadata/AcquisitionMode.yaml delete mode 100644 src/schema/metadata/AcquisitionVoxelSize.yaml delete mode 100644 src/schema/metadata/Anaesthesia.yaml delete mode 100644 src/schema/metadata/AnalyticalApproach.yaml delete mode 100644 src/schema/metadata/AnatomicalLandmarkCoordinateSystem.yaml delete mode 100644 src/schema/metadata/AnatomicalLandmarkCoordinateSystemDescription.yaml delete mode 100644 src/schema/metadata/AnatomicalLandmarkCoordinateUnits.yaml delete mode 100644 src/schema/metadata/AnatomicalLandmarkCoordinates.yaml delete mode 100644 src/schema/metadata/AnatomicalLandmarkCoordinates_mri.yaml delete mode 100644 src/schema/metadata/ArterialSpinLabelingType.yaml delete mode 100644 src/schema/metadata/AssociatedEmptyRoom.yaml delete mode 100644 src/schema/metadata/Atlas.yaml delete mode 100644 src/schema/metadata/AttenuationCorrection.yaml delete mode 100644 src/schema/metadata/AttenuationCorrectionMethodReference.yaml delete mode 100644 src/schema/metadata/Authors.yaml delete mode 100644 src/schema/metadata/B0FieldIdentifier.yaml delete mode 100644 src/schema/metadata/B0FieldSource.yaml delete mode 100644 src/schema/metadata/BIDSVersion.yaml delete mode 100644 src/schema/metadata/BackgroundSuppression.yaml delete mode 100644 src/schema/metadata/BackgroundSuppressionNumberPulses.yaml delete mode 100644 src/schema/metadata/BackgroundSuppressionPulseTime.yaml delete mode 100644 src/schema/metadata/BasedOn.yaml delete mode 100644 src/schema/metadata/BloodDensity.yaml delete mode 100644 src/schema/metadata/BodyPart.yaml delete mode 100644 src/schema/metadata/BolusCutOffDelayTime.yaml delete mode 100644 src/schema/metadata/BolusCutOffFlag.yaml delete mode 100644 src/schema/metadata/BolusCutOffTechnique.yaml delete mode 100644 src/schema/metadata/BrainLocation.yaml delete mode 100644 src/schema/metadata/CASLType.yaml delete mode 100644 src/schema/metadata/CapManufacturer.yaml delete mode 100644 src/schema/metadata/CapManufacturersModelName.yaml delete mode 100644 src/schema/metadata/CellType.yaml delete mode 100644 src/schema/metadata/Code.yaml delete mode 100644 src/schema/metadata/CogAtlasID.yaml delete mode 100644 src/schema/metadata/CogPOID.yaml delete mode 100644 src/schema/metadata/CoilCombinationMethod.yaml delete mode 100644 src/schema/metadata/Columns.yaml delete mode 100644 src/schema/metadata/ContinuousHeadLocalization.yaml delete mode 100644 src/schema/metadata/ContrastBolusIngredient.yaml delete mode 100644 src/schema/metadata/DCOffsetCorrection.yaml delete mode 100644 src/schema/metadata/DatasetDOI.yaml delete mode 100644 src/schema/metadata/DatasetType.yaml delete mode 100644 src/schema/metadata/DecayCorrectionFactor.yaml delete mode 100644 src/schema/metadata/DelayAfterTrigger.yaml delete mode 100644 src/schema/metadata/DelayTime.yaml delete mode 100644 src/schema/metadata/Density.yaml delete mode 100644 src/schema/metadata/Description.yaml delete mode 100644 src/schema/metadata/DeviceSerialNumber.yaml delete mode 100644 src/schema/metadata/DewarPosition.yaml delete mode 100644 src/schema/metadata/DigitizedHeadPoints.yaml delete mode 100644 src/schema/metadata/DigitizedHeadPointsCoordinateSystem.yaml delete mode 100644 src/schema/metadata/DigitizedHeadPointsCoordinateSystemDescription.yaml delete mode 100644 src/schema/metadata/DigitizedHeadPointsCoordinateUnits.yaml delete mode 100644 src/schema/metadata/DigitizedLandmarks.yaml delete mode 100644 src/schema/metadata/DispersionConstant.yaml delete mode 100644 src/schema/metadata/DispersionCorrected.yaml delete mode 100644 src/schema/metadata/DoseCalibrationFactor.yaml delete mode 100644 src/schema/metadata/DwellTime.yaml delete mode 100644 src/schema/metadata/ECGChannelCount.yaml delete mode 100644 src/schema/metadata/ECOGChannelCount.yaml delete mode 100644 src/schema/metadata/EEGChannelCount.yaml delete mode 100644 src/schema/metadata/EEGCoordinateSystem.yaml delete mode 100644 src/schema/metadata/EEGCoordinateSystemDescription.yaml delete mode 100644 src/schema/metadata/EEGCoordinateUnits.yaml delete mode 100644 src/schema/metadata/EEGGround.yaml delete mode 100644 src/schema/metadata/EEGPlacementScheme.yaml delete mode 100644 src/schema/metadata/EEGReference.yaml delete mode 100644 src/schema/metadata/EMGChannelCount.yaml delete mode 100644 src/schema/metadata/EOGChannelCount.yaml delete mode 100644 src/schema/metadata/EchoTime.yaml delete mode 100644 src/schema/metadata/EchoTime1.yaml delete mode 100644 src/schema/metadata/EchoTime2.yaml delete mode 100644 src/schema/metadata/EchoTime_fmap.yaml delete mode 100644 src/schema/metadata/EffectiveEchoSpacing.yaml delete mode 100644 src/schema/metadata/ElectricalStimulation.yaml delete mode 100644 src/schema/metadata/ElectricalStimulationParameters.yaml delete mode 100644 src/schema/metadata/ElectrodeManufacturer.yaml delete mode 100644 src/schema/metadata/ElectrodeManufacturersModelName.yaml delete mode 100644 src/schema/metadata/EpochLength.yaml delete mode 100644 src/schema/metadata/EstimationAlgorithm.yaml delete mode 100644 src/schema/metadata/EstimationReference.yaml delete mode 100644 src/schema/metadata/EthicsApprovals.yaml delete mode 100644 src/schema/metadata/FiducialsCoordinateSystem.yaml delete mode 100644 src/schema/metadata/FiducialsCoordinateSystemDescription.yaml delete mode 100644 src/schema/metadata/FiducialsCoordinateUnits.yaml delete mode 100644 src/schema/metadata/FiducialsCoordinates.yaml delete mode 100644 src/schema/metadata/FiducialsDescription.yaml delete mode 100644 src/schema/metadata/FlipAngle.yaml delete mode 100644 src/schema/metadata/FrameDuration.yaml delete mode 100644 src/schema/metadata/FrameTimesStart.yaml delete mode 100644 src/schema/metadata/Funding.yaml delete mode 100644 src/schema/metadata/GeneratedBy.yaml delete mode 100644 src/schema/metadata/GeneticLevel.yaml delete mode 100644 src/schema/metadata/Genetics.Database.yaml delete mode 100644 src/schema/metadata/Genetics.Dataset.yaml delete mode 100644 src/schema/metadata/Genetics.Descriptors.yaml delete mode 100644 src/schema/metadata/Genetics.yaml delete mode 100644 src/schema/metadata/GradientSetType.yaml delete mode 100644 src/schema/metadata/HED.yaml delete mode 100644 src/schema/metadata/HEDVersion.yaml delete mode 100644 src/schema/metadata/Haematocrit.yaml delete mode 100644 src/schema/metadata/HardcopyDeviceSoftwareVersion.yaml delete mode 100644 src/schema/metadata/HardwareFilters.yaml delete mode 100644 src/schema/metadata/HeadCircumference.yaml delete mode 100644 src/schema/metadata/HeadCoilCoordinateSystem.yaml delete mode 100644 src/schema/metadata/HeadCoilCoordinateSystemDescription.yaml delete mode 100644 src/schema/metadata/HeadCoilCoordinateUnits.yaml delete mode 100644 src/schema/metadata/HeadCoilCoordinates.yaml delete mode 100644 src/schema/metadata/HeadCoilFrequency.yaml delete mode 100644 src/schema/metadata/HowToAcknowledge.yaml delete mode 100644 src/schema/metadata/ImageDecayCorrected.yaml delete mode 100644 src/schema/metadata/ImageDecayCorrectionTime.yaml delete mode 100644 src/schema/metadata/InfusionRadioactivity.yaml delete mode 100644 src/schema/metadata/InfusionSpeed.yaml delete mode 100644 src/schema/metadata/InfusionSpeedUnits.yaml delete mode 100644 src/schema/metadata/InfusionStart.yaml delete mode 100644 src/schema/metadata/InjectedMass.yaml delete mode 100644 src/schema/metadata/InjectedMassPerWeight.yaml delete mode 100644 src/schema/metadata/InjectedMassPerWeightUnits.yaml delete mode 100644 src/schema/metadata/InjectedMassUnits.yaml delete mode 100644 src/schema/metadata/InjectedRadioactivity.yaml delete mode 100644 src/schema/metadata/InjectedRadioactivityUnits.yaml delete mode 100644 src/schema/metadata/InjectedVolume.yaml delete mode 100644 src/schema/metadata/InjectionEnd.yaml delete mode 100644 src/schema/metadata/InjectionStart.yaml delete mode 100644 src/schema/metadata/InstitutionAddress.yaml delete mode 100644 src/schema/metadata/InstitutionName.yaml delete mode 100644 src/schema/metadata/InstitutionalDepartmentName.yaml delete mode 100644 src/schema/metadata/Instructions.yaml delete mode 100644 src/schema/metadata/IntendedFor.yaml delete mode 100644 src/schema/metadata/InversionTime.yaml delete mode 100644 src/schema/metadata/LabelingDistance.yaml delete mode 100644 src/schema/metadata/LabelingDuration.yaml delete mode 100644 src/schema/metadata/LabelingEfficiency.yaml delete mode 100644 src/schema/metadata/LabelingLocationDescription.yaml delete mode 100644 src/schema/metadata/LabelingOrientation.yaml delete mode 100644 src/schema/metadata/LabelingPulseAverageB1.yaml delete mode 100644 src/schema/metadata/LabelingPulseAverageGradient.yaml delete mode 100644 src/schema/metadata/LabelingPulseDuration.yaml delete mode 100644 src/schema/metadata/LabelingPulseFlipAngle.yaml delete mode 100644 src/schema/metadata/LabelingPulseInterval.yaml delete mode 100644 src/schema/metadata/LabelingPulseMaximumGradient.yaml delete mode 100644 src/schema/metadata/LabelingSlabThickness.yaml delete mode 100644 src/schema/metadata/Levels.yaml delete mode 100644 src/schema/metadata/License.yaml delete mode 100644 src/schema/metadata/LongName.yaml delete mode 100644 src/schema/metadata/LookLocker.yaml delete mode 100644 src/schema/metadata/M0Estimate.yaml delete mode 100644 src/schema/metadata/M0Type.yaml delete mode 100644 src/schema/metadata/MEGChannelCount.yaml delete mode 100644 src/schema/metadata/MEGCoordinateSystem.yaml delete mode 100644 src/schema/metadata/MEGCoordinateSystemDescription.yaml delete mode 100644 src/schema/metadata/MEGCoordinateUnits.yaml delete mode 100644 src/schema/metadata/MEGREFChannelCount.yaml delete mode 100644 src/schema/metadata/MRAcquisitionType.yaml delete mode 100644 src/schema/metadata/MRTransmitCoilSequence.yaml delete mode 100644 src/schema/metadata/MTNumberOfPulses.yaml delete mode 100644 src/schema/metadata/MTOffsetFrequency.yaml delete mode 100644 src/schema/metadata/MTPulseBandwidth.yaml delete mode 100644 src/schema/metadata/MTPulseDuration.yaml delete mode 100644 src/schema/metadata/MTPulseShape.yaml delete mode 100644 src/schema/metadata/MTState.yaml delete mode 100644 src/schema/metadata/MagneticFieldStrength.yaml delete mode 100644 src/schema/metadata/Manual.yaml delete mode 100644 src/schema/metadata/Manufacturer.yaml delete mode 100644 src/schema/metadata/ManufacturersModelName.yaml delete mode 100644 src/schema/metadata/MatrixCoilMode.yaml delete mode 100644 src/schema/metadata/MaxMovement.yaml delete mode 100644 src/schema/metadata/MetaboliteAvail.yaml delete mode 100644 src/schema/metadata/MetaboliteMethod.yaml delete mode 100644 src/schema/metadata/MetaboliteRecoveryCorrectionApplied.yaml delete mode 100644 src/schema/metadata/MiscChannelCount.yaml delete mode 100644 src/schema/metadata/MixingTime.yaml delete mode 100644 src/schema/metadata/ModeOfAdministration.yaml delete mode 100644 src/schema/metadata/MolarActivity.yaml delete mode 100644 src/schema/metadata/MolarActivityMeasTime.yaml delete mode 100644 src/schema/metadata/MolarActivityUnits.yaml delete mode 100644 src/schema/metadata/MultibandAccelerationFactor.yaml delete mode 100644 src/schema/metadata/MultipartID.yaml delete mode 100644 src/schema/metadata/Name.yaml delete mode 100644 src/schema/metadata/NegativeContrast.yaml delete mode 100644 src/schema/metadata/NonlinearGradientCorrection.yaml delete mode 100644 src/schema/metadata/NumberOfVolumesDiscardedByScanner.yaml delete mode 100644 src/schema/metadata/NumberOfVolumesDiscardedByUser.yaml delete mode 100644 src/schema/metadata/NumberShots.yaml delete mode 100644 src/schema/metadata/OperatingSystem.yaml delete mode 100644 src/schema/metadata/PASLType.yaml delete mode 100644 src/schema/metadata/PCASLType.yaml delete mode 100644 src/schema/metadata/ParallelAcquisitionTechnique.yaml delete mode 100644 src/schema/metadata/ParallelReductionFactorInPlane.yaml delete mode 100644 src/schema/metadata/PartialFourier.yaml delete mode 100644 src/schema/metadata/PartialFourierDirection.yaml delete mode 100644 src/schema/metadata/PharmaceuticalDoseAmount.yaml delete mode 100644 src/schema/metadata/PharmaceuticalDoseRegimen.yaml delete mode 100644 src/schema/metadata/PharmaceuticalDoseTime.yaml delete mode 100644 src/schema/metadata/PharmaceuticalDoseUnits.yaml delete mode 100644 src/schema/metadata/PharmaceuticalName.yaml delete mode 100644 src/schema/metadata/PhaseEncodingDirection.yaml delete mode 100644 src/schema/metadata/PlasmaAvail.yaml delete mode 100644 src/schema/metadata/PlasmaFreeFraction.yaml delete mode 100644 src/schema/metadata/PlasmaFreeFractionMethod.yaml delete mode 100644 src/schema/metadata/PostLabelingDelay.yaml delete mode 100644 src/schema/metadata/PowerLineFrequency.yaml delete mode 100644 src/schema/metadata/PromptRate.yaml delete mode 100644 src/schema/metadata/PulseSequenceDetails.yaml delete mode 100644 src/schema/metadata/PulseSequenceType.yaml delete mode 100644 src/schema/metadata/Purity.yaml delete mode 100644 src/schema/metadata/RandomRate.yaml delete mode 100644 src/schema/metadata/RawSources.yaml delete mode 100644 src/schema/metadata/ReceiveCoilActiveElements.yaml delete mode 100644 src/schema/metadata/ReceiveCoilName.yaml delete mode 100644 src/schema/metadata/ReconFilterSize.yaml delete mode 100644 src/schema/metadata/ReconFilterType.yaml delete mode 100644 src/schema/metadata/ReconMethodImplementationVersion.yaml delete mode 100644 src/schema/metadata/ReconMethodName.yaml delete mode 100644 src/schema/metadata/ReconMethodParameterLabels.yaml delete mode 100644 src/schema/metadata/ReconMethodParameterUnits.yaml delete mode 100644 src/schema/metadata/ReconMethodParameterValues.yaml delete mode 100644 src/schema/metadata/RecordingDuration.yaml delete mode 100644 src/schema/metadata/RecordingType.yaml delete mode 100644 src/schema/metadata/ReferencesAndLinks.yaml delete mode 100644 src/schema/metadata/RepetitionTime.yaml delete mode 100644 src/schema/metadata/RepetitionTimeExcitation.yaml delete mode 100644 src/schema/metadata/RepetitionTimePreparation.yaml delete mode 100644 src/schema/metadata/Resolution.yaml delete mode 100644 src/schema/metadata/SEEGChannelCount.yaml delete mode 100644 src/schema/metadata/SampleOrigin.yaml delete mode 100644 src/schema/metadata/SamplingFrequency.yaml delete mode 100644 src/schema/metadata/ScaleFactor.yaml delete mode 100644 src/schema/metadata/ScanDate.yaml delete mode 100644 src/schema/metadata/ScanOptions.yaml delete mode 100644 src/schema/metadata/ScanStart.yaml delete mode 100644 src/schema/metadata/ScanningSequence.yaml delete mode 100644 src/schema/metadata/ScatterFraction.yaml delete mode 100644 src/schema/metadata/SequenceName.yaml delete mode 100644 src/schema/metadata/SequenceVariant.yaml delete mode 100644 src/schema/metadata/SinglesRate.yaml delete mode 100644 src/schema/metadata/SkullStripped.yaml delete mode 100644 src/schema/metadata/SliceEncodingDirection.yaml delete mode 100644 src/schema/metadata/SliceTiming.yaml delete mode 100644 src/schema/metadata/SoftwareFilters.yaml delete mode 100644 src/schema/metadata/SoftwareName.yaml delete mode 100644 src/schema/metadata/SoftwareRRID.yaml delete mode 100644 src/schema/metadata/SoftwareVersion.yaml delete mode 100644 src/schema/metadata/SoftwareVersions.yaml delete mode 100644 src/schema/metadata/SourceDatasets.yaml delete mode 100644 src/schema/metadata/Sources.yaml delete mode 100644 src/schema/metadata/SpatialReference.yaml delete mode 100644 src/schema/metadata/SpecificRadioactivity.yaml delete mode 100644 src/schema/metadata/SpecificRadioactivityMeasTime.yaml delete mode 100644 src/schema/metadata/SpecificRadioactivityUnits.yaml delete mode 100644 src/schema/metadata/SpoilingGradientDuration.yaml delete mode 100644 src/schema/metadata/SpoilingGradientMoment.yaml delete mode 100644 src/schema/metadata/SpoilingRFPhaseIncrement.yaml delete mode 100644 src/schema/metadata/SpoilingState.yaml delete mode 100644 src/schema/metadata/SpoilingType.yaml delete mode 100644 src/schema/metadata/StartTime.yaml delete mode 100644 src/schema/metadata/StationName.yaml delete mode 100644 src/schema/metadata/StimulusPresentation.yaml delete mode 100644 src/schema/metadata/SubjectArtefactDescription.yaml delete mode 100644 src/schema/metadata/TaskDescription.yaml delete mode 100644 src/schema/metadata/TaskName.yaml delete mode 100644 src/schema/metadata/TermURL.yaml delete mode 100644 src/schema/metadata/TimeZero.yaml delete mode 100644 src/schema/metadata/TissueOrigin.yaml delete mode 100644 src/schema/metadata/TotalAcquiredPairs.yaml delete mode 100644 src/schema/metadata/TotalReadoutTime.yaml delete mode 100644 src/schema/metadata/TracerMolecularWeight.yaml delete mode 100644 src/schema/metadata/TracerMolecularWeightUnits.yaml delete mode 100644 src/schema/metadata/TracerName.yaml delete mode 100644 src/schema/metadata/TracerRadLex.yaml delete mode 100644 src/schema/metadata/TracerRadionuclide.yaml delete mode 100644 src/schema/metadata/TracerSNOMED.yaml delete mode 100644 src/schema/metadata/TriggerChannelCount.yaml delete mode 100644 src/schema/metadata/TubingLength.yaml delete mode 100644 src/schema/metadata/TubingType.yaml delete mode 100644 src/schema/metadata/Type.yaml delete mode 100644 src/schema/metadata/Units.yaml delete mode 100644 src/schema/metadata/VascularCrushing.yaml delete mode 100644 src/schema/metadata/VascularCrushingVENC.yaml delete mode 100644 src/schema/metadata/VolumeTiming.yaml delete mode 100644 src/schema/metadata/WholeBloodAvail.yaml delete mode 100644 src/schema/metadata/WithdrawalRate.yaml delete mode 100644 src/schema/metadata/_CoordUnits.yaml delete mode 100644 src/schema/metadata/_EEGCoordSys.yaml delete mode 100644 src/schema/metadata/_GeneticLevelEnum.yaml delete mode 100644 src/schema/metadata/_LandmarkCoordinates.yaml delete mode 100644 src/schema/metadata/_MEGCoordSys.yaml delete mode 100644 src/schema/metadata/_StandardTemplateCoordSys.yaml delete mode 100644 src/schema/metadata/_StandardTemplateDeprecatedCoordSys.yaml delete mode 100644 src/schema/metadata/_iEEGCoordSys.yaml delete mode 100644 src/schema/metadata/_template.yaml delete mode 100644 src/schema/metadata/iEEGCoordinateProcessingDescription.yaml delete mode 100644 src/schema/metadata/iEEGCoordinateProcessingReference.yaml delete mode 100644 src/schema/metadata/iEEGCoordinateSystem.yaml delete mode 100644 src/schema/metadata/iEEGCoordinateSystemDescription.yaml delete mode 100644 src/schema/metadata/iEEGCoordinateUnits.yaml delete mode 100644 src/schema/metadata/iEEGElectrodeGroups.yaml delete mode 100644 src/schema/metadata/iEEGGround.yaml delete mode 100644 src/schema/metadata/iEEGPlacementScheme.yaml delete mode 100644 src/schema/metadata/iEEGReference.yaml delete mode 100644 src/schema/modalities.yaml create mode 100644 src/schema/objects/associated_data.yaml create mode 100644 src/schema/objects/datatypes.yaml rename src/schema/{ => objects}/entities.yaml (95%) create mode 100644 src/schema/objects/metadata.yaml create mode 100644 src/schema/objects/modalities.yaml create mode 100644 src/schema/objects/suffixes.yaml create mode 100644 src/schema/objects/top_level_files.yaml create mode 100644 src/schema/rules/associated_data.yaml rename src/schema/{ => rules}/datatypes/anat.yaml (71%) rename src/schema/{ => rules}/datatypes/beh.yaml (71%) rename src/schema/{ => rules}/datatypes/dwi.yaml (75%) rename src/schema/{ => rules}/datatypes/eeg.yaml (74%) rename src/schema/{ => rules}/datatypes/fmap.yaml (75%) rename src/schema/{ => rules}/datatypes/func.yaml (82%) rename src/schema/{ => rules}/datatypes/ieeg.yaml (74%) rename src/schema/{ => rules}/datatypes/meg.yaml (74%) rename src/schema/{ => rules}/datatypes/perf.yaml (81%) rename src/schema/{ => rules}/datatypes/pet.yaml (83%) create mode 100644 src/schema/rules/entities.yaml create mode 100644 src/schema/rules/modalities.yaml rename src/schema/{ => rules}/top_level_files.yaml (75%) delete mode 100644 src/schema/suffixes/Chimap.yaml delete mode 100644 src/schema/suffixes/FLAIR.yaml delete mode 100644 src/schema/suffixes/FLASH.yaml delete mode 100644 src/schema/suffixes/IRT1.yaml delete mode 100644 src/schema/suffixes/M0map.yaml delete mode 100644 src/schema/suffixes/MEGRE.yaml delete mode 100644 src/schema/suffixes/MESE.yaml delete mode 100644 src/schema/suffixes/MP2RAGE.yaml delete mode 100644 src/schema/suffixes/MPM.yaml delete mode 100644 src/schema/suffixes/MTR.yaml delete mode 100644 src/schema/suffixes/MTRmap.yaml delete mode 100644 src/schema/suffixes/MTS.yaml delete mode 100644 src/schema/suffixes/MTVmap.yaml delete mode 100644 src/schema/suffixes/MTsat.yaml delete mode 100644 src/schema/suffixes/MWFmap.yaml delete mode 100644 src/schema/suffixes/PD.yaml delete mode 100644 src/schema/suffixes/PDT2.yaml delete mode 100644 src/schema/suffixes/PDT2map.yaml delete mode 100644 src/schema/suffixes/PDmap.yaml delete mode 100644 src/schema/suffixes/PDw.yaml delete mode 100644 src/schema/suffixes/R1map.yaml delete mode 100644 src/schema/suffixes/R2map.yaml delete mode 100644 src/schema/suffixes/R2starmap.yaml delete mode 100644 src/schema/suffixes/RB1COR.yaml delete mode 100644 src/schema/suffixes/RB1map.yaml delete mode 100644 src/schema/suffixes/S0map.yaml delete mode 100644 src/schema/suffixes/T1map.yaml delete mode 100644 src/schema/suffixes/T1rho.yaml delete mode 100644 src/schema/suffixes/T1w.yaml delete mode 100644 src/schema/suffixes/T2map.yaml delete mode 100644 src/schema/suffixes/T2star.yaml delete mode 100644 src/schema/suffixes/T2starmap.yaml delete mode 100644 src/schema/suffixes/T2starw.yaml delete mode 100644 src/schema/suffixes/T2w.yaml delete mode 100644 src/schema/suffixes/TB1AFI.yaml delete mode 100644 src/schema/suffixes/TB1DAM.yaml delete mode 100644 src/schema/suffixes/TB1EPI.yaml delete mode 100644 src/schema/suffixes/TB1RFM.yaml delete mode 100644 src/schema/suffixes/TB1SRGE.yaml delete mode 100644 src/schema/suffixes/TB1TFL.yaml delete mode 100644 src/schema/suffixes/TB1map.yaml delete mode 100644 src/schema/suffixes/UNIT1.yaml delete mode 100644 src/schema/suffixes/VFA.yaml delete mode 100644 src/schema/suffixes/_template.yaml delete mode 100644 src/schema/suffixes/angio.yaml delete mode 100644 src/schema/suffixes/asl.yaml delete mode 100644 src/schema/suffixes/aslcontext.yaml delete mode 100644 src/schema/suffixes/asllabeling.yaml delete mode 100644 src/schema/suffixes/beh.yaml delete mode 100644 src/schema/suffixes/blood.yaml delete mode 100644 src/schema/suffixes/bold.yaml delete mode 100644 src/schema/suffixes/cbv.yaml delete mode 100644 src/schema/suffixes/channels.yaml delete mode 100644 src/schema/suffixes/coordsystem.yaml delete mode 100644 src/schema/suffixes/defacemask.yaml delete mode 100644 src/schema/suffixes/dwi.yaml delete mode 100644 src/schema/suffixes/eeg.yaml delete mode 100644 src/schema/suffixes/electrodes.yaml delete mode 100644 src/schema/suffixes/epi.yaml delete mode 100644 src/schema/suffixes/events.yaml delete mode 100644 src/schema/suffixes/fieldmap.yaml delete mode 100644 src/schema/suffixes/headshape.yaml delete mode 100644 src/schema/suffixes/ieeg.yaml delete mode 100644 src/schema/suffixes/inplaneT1.yaml delete mode 100644 src/schema/suffixes/inplaneT2.yaml delete mode 100644 src/schema/suffixes/m0scan.yaml delete mode 100644 src/schema/suffixes/magnitude.yaml delete mode 100644 src/schema/suffixes/magnitude1.yaml delete mode 100644 src/schema/suffixes/magnitude2.yaml delete mode 100644 src/schema/suffixes/markers.yaml delete mode 100644 src/schema/suffixes/meg.yaml delete mode 100644 src/schema/suffixes/pet.yaml delete mode 100644 src/schema/suffixes/phase.yaml delete mode 100644 src/schema/suffixes/phase1.yaml delete mode 100644 src/schema/suffixes/phase2.yaml delete mode 100644 src/schema/suffixes/phasediff.yaml delete mode 100644 src/schema/suffixes/photo.yaml delete mode 100644 src/schema/suffixes/physio.yaml delete mode 100644 src/schema/suffixes/sbref.yaml delete mode 100644 src/schema/suffixes/stim.yaml diff --git a/.yamllint.yml b/.yamllint.yml index baed83012b..c18c17fe43 100644 --- a/.yamllint.yml +++ b/.yamllint.yml @@ -3,3 +3,6 @@ extends: default rules: line-length: max: 120 + indentation: + # See https://github.com/yaml/pyyaml/issues/545 for why + indent-sequences: false diff --git a/src/schema/README.md b/src/schema/README.md index 10a177ae0d..948d687a52 100644 --- a/src/schema/README.md +++ b/src/schema/README.md @@ -9,57 +9,144 @@ Any changes to the specification should be mirrored in the schema. ## The format of the schema -The schema reflects the files and objects in the specification, as well as -associations between these objects. Here is a list of the files and subfolders -of the schema, roughly in order of importance: - -- `datatypes/*.yaml`: Data types supported by the specification. Each datatype - may support many suffixes. These suffixes are divided into groups based on - what extensions and entities are allowed for each. Data types correspond to - subfolders (for example, `anat`, `func`) in the BIDS structure. - -- `entities.yaml`: A list of entities (key/value pairs in folder and - filenames) with associated descriptions and formatting rules. The order of - the entities in the file determines the order in which entities must appear - in filenames. - -- `top_level_files.yaml`: Modality-agnostic files stored at the top level of a - BIDS dataset. The schema specifies whether these files are required or - optional, as well as acceptable extensions for each. - -- `modalities.yaml`: Modalities supported by the specification, along with a - list of associated data types. Modalities are not reflected directly in the - BIDS structure, but data types are modality-specific. - -- `associated_data.yaml`: Folders that are commonly contained within the same - folder as a BIDS dataset, but which do not follow the BIDS structure - internally, such as `code` or `sourcedata`. The schema specifies which - folders are accepted and whether they are required or optional. - -- `suffixes/*.yaml`: Suffixes supported by the specification. - Each suffix schema file contains, at minimum, `name` and `description` - fields. Additionally, it may have a `unit` field defining possible - units for data associated with that suffix, as well as fields - defining the range or types of values which are allowed for the data, - such as `minValue` and `maxValue`. - -- `metadata/*.yaml`: Valid fields for sidecar metadata json files. - These files contain, at minimum, the following fields: `name`, - `description`, and a set of fields for describing the field's data type. - - The data types include `type`, which MUST have a value of - `array`, `string`, `integer`, `number`, `object`, or `boolean`. - There are additional fields which may define rules that apply to a given - type. - - - `array`: If `type` is `array`, then there MUST be an `items` field at - the same level as `type`. `items` describes the data type and rules that - apply to the individual items in the array. The same rules that apply to - describing data types for the field itself apply to `items`. - Additionally, there may be any of the following fields at the same level - as `type`: `minItems`, `maxItems`. - Here is an example of a field that MUST have three `integer` items: - ```yaml +The schema is divided into two parts: the object definitions and the rules. + +The object definitions (files in `objects/`) describe attributes of individual +objects or data types in the specification. +Common information in these files includes full names, descriptions, and +constraints on valid values. +These files **do not** describe how objects of different types +(for example file suffixes and file entities) interact with one another, or +whether objects are required in a given dataset or file. + +The rules (files in `rules/`) describe how objects related to one another, +as well as their requirement levels. + +## Object files + +The types of objects currently supported in the schema are: + +- modalities, +- datatypes, +- entities, +- suffixes, +- metadata, +- top-level files, +- and non-BIDS associated folders. + +Each of these object types has a single file in the `objects/` folder. + +- `modalities.yaml`: The modalities, or types of technology, used to acquire data in a BIDS dataset. + These modalities are not reflected directly in the specification. + For example, while both fMRI and DWI data are acquired with an MRI, + in a BIDS dataset they are stored in different folders reflecting the two different `datatypes`. + +- `datatypes.yaml`: Data types supported by the specification. + The only information provided in the file is: + + 1. a full list of valid BIDS datatypes + 1. each datatype's full name + 1. a free text description of the datatype. + +- `entities.yaml`: Entities (key/value pairs in folder and filenames). + +- `metadata.yaml`: All valid metadata fields that are explicitly supported in BIDS sidecar JSON files. + +- `suffixes.yaml`: Valid file suffixes. + +- `top_level_files.yaml`: Valid top-level files which may appear in a BIDS dataset. + +- `associated_data.yaml`: Folders that may appear within a dataset folder without following BIDS rules. + +### `modalities.yaml` + +This file contains a dictionary in which each modality is defined. +Keys are modality abbreviations (for example, `mri` for magnetic resonance imaging), +and each associated value is a dictionary with two keys: `name` and `description`. + +The `name` field is the full name of the modality. +The `description` field is a freeform description of the modality. + +### `datatypes.yaml` + +This file contains a dictionary in which each datatype is defined. +Keys are the folder names associated with each datatype (for example, `anat` for anatomical MRI), +and each associated value is a dictionary with two keys: `name` and `description`. + +The `name` field is the full name of the datatype. +The `description` field is a freeform description of the datatype. + +### `entities.yaml` + +This file contains a dictionary in which each entity (key/value pair in filenames) is defined. +Keys are long-form versions of the entities, which are distinct from both the entities as +they appear in filenames _and_ their full names. +For example, the key for the "Contrast Enhancing Agent" entity, which appears in filenames as `ce-