Skip to content

Commit

Permalink
Add maxLength validation keywords matching nvarchar values in `ar…
Browse files Browse the repository at this point in the history
…chive_catalog` (#448)
  • Loading branch information
braingram authored Sep 30, 2024
2 parents f3648f3 + 057bf92 commit 8a4452a
Show file tree
Hide file tree
Showing 25 changed files with 115 additions and 0 deletions.
1 change: 1 addition & 0 deletions changes/448.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add maxLength keywords to schemas matching nvarchar archive_catalog datatypes.
1 change: 1 addition & 0 deletions src/rad/resources/schemas/aperture-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ properties:
special_processing: VALUE_REQUIRED
source:
origin: PSS:aperture.AperName
maxLength: 40
archive_catalog:
datatype: nvarchar(40)
destination: [WFIExposure.aperture_name, GuideWindow.aperture_name]
Expand Down
1 change: 1 addition & 0 deletions src/rad/resources/schemas/coordinates-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ properties:
type: string
default: ICRS
enum: [ICRS]
maxLength: 10
archive_catalog:
datatype: nvarchar(10)
destination: [WFIExposure.reference_frame, WFIMosaic.reference_frame, GuideWindow.reference_frame]
Expand Down
2 changes: 2 additions & 0 deletions src/rad/resources/schemas/ephemeris-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ properties:
special_processing: VALUE_REQUIRED
source:
origin: TBD
maxLength: 10
archive_catalog:
datatype: nvarchar(10)
destination: [WFIExposure.ephemeris_reference_frame, GuideWindow.ephemeris_reference_frame]
Expand All @@ -64,6 +65,7 @@ properties:
special_processing: VALUE_REQUIRED
source:
origin: TBD
maxLength: 10
archive_catalog:
datatype: nvarchar(10)
destination: [WFIExposure.ephemeris_type, GuideWindow.ephemeris_type]
Expand Down
2 changes: 2 additions & 0 deletions src/rad/resources/schemas/exposure-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ properties:
special_processing: VALUE_REQUIRED
source:
origin: TBD
maxLength: 25
archive_catalog:
datatype: nvarchar(25)
destination: [WFIExposure.exposure_type, GuideWindow.exposure_type, WFICommon.exposure_type]
Expand Down Expand Up @@ -143,6 +144,7 @@ properties:
special_processing: VALUE_REQUIRED
source:
origin: TBD
maxLength: 50
archive_catalog:
datatype: nvarchar(50)
destination: [WFIExposure.ma_table_name, GuideWindow.ma_table_name, WFICommon.ma_table_name]
Expand Down
5 changes: 5 additions & 0 deletions src/rad/resources/schemas/guidestar-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ properties:
special_processing: VALUE_REQUIRED
source:
origin: TBD
maxLength: 20
archive_catalog:
datatype: nvarchar(20)
destination: [WFIExposure.gw_id, GuideWindow.gw_id, WFICommon.gw_id]
Expand All @@ -25,6 +26,7 @@ properties:
special_processing: VALUE_REQUIRED
source:
origin: TBD
maxLength: 18
archive_catalog:
datatype: nvarchar(18)
destination: [WFIExposure.gw_fgs_mode, GuideWindow.gw_fgs_mode, WFICommon.gw_fgs_mode]
Expand Down Expand Up @@ -141,6 +143,7 @@ properties:
special_processing: VALUE_REQUIRED
source:
origin: TBD
maxLength: 20
archive_catalog:
datatype: nvarchar(20)
destination: [WFIExposure.gs_id, GuideWindow.gs_id]
Expand All @@ -153,6 +156,7 @@ properties:
special_processing: VALUE_REQUIRED
source:
origin: TBD
maxLength: 20
archive_catalog:
datatype: nvarchar(20)
destination: [WFIExposure.gs_catalog_version]
Expand Down Expand Up @@ -295,6 +299,7 @@ properties:
special_processing: VALUE_REQUIRED
source:
origin: TBD
maxLength: 10
archive_catalog:
datatype: nvarchar(10)
destination: [WFIExposure.gs_epoch, GuideWindow.gs_epoch]
Expand Down
3 changes: 3 additions & 0 deletions src/rad/resources/schemas/guidewindow-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ properties:
special_processing: VALUE_REQUIRED
source:
origin: Science Data Formatting
maxLength: 15
archive_catalog:
datatype: nvarchar(15)
destination: [GuideWindow.gw_acq_exec_stat]
Expand Down Expand Up @@ -138,6 +139,7 @@ properties:
special_processing: VALUE_REQUIRED
source:
origin: Science Data Formatting
maxLength: 120
archive_catalog:
datatype: nvarchar(120)
destination: [GuideWindow.gw_science_file_source]
Expand All @@ -147,6 +149,7 @@ properties:
special_processing: VALUE_REQUIRED
source:
origin: Science Data Formatting
maxLength: 18
archive_catalog:
datatype: nvarchar(18)
destination: [GuideWindow.gw_mode]
Expand Down
15 changes: 15 additions & 0 deletions src/rad/resources/schemas/l2_cal_step-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ properties:
science image.
type: string
enum: ['N/A', 'COMPLETE', 'SKIPPED', 'INCOMPLETE']
maxLength: 15
archive_catalog:
datatype: nvarchar(15)
destination: [ScienceRefData.s_assign_wcs]
Expand All @@ -25,6 +26,7 @@ properties:
flatfield reference image.
type: string
enum: ['N/A', 'COMPLETE', 'SKIPPED', 'INCOMPLETE']
maxLength: 15
archive_catalog:
datatype: nvarchar(15)
destination: [ScienceRefData.s_flat_field]
Expand All @@ -35,6 +37,7 @@ properties:
dark current reference data from science data.
type: string
enum: ['N/A', 'COMPLETE', 'SKIPPED', 'INCOMPLETE']
maxLength: 15
archive_catalog:
datatype: nvarchar(15)
destination: [ScienceRefData.s_dark]
Expand All @@ -45,6 +48,7 @@ properties:
using the MASK reference file is initialized.
type: string
enum: ['N/A', 'COMPLETE', 'SKIPPED', 'INCOMPLETE']
maxLength: 15
archive_catalog:
datatype: nvarchar(15)
destination: [ScienceRefData.s_dq_init]
Expand All @@ -55,6 +59,7 @@ properties:
The data are converted from DN/s to MJy/sr.
type: string
enum: ['N/A', 'COMPLETE', 'SKIPPED', 'INCOMPLETE']
maxLength: 15
archive_catalog:
datatype: nvarchar(15)
destination: [ScienceRefData.s_flux]
Expand All @@ -65,6 +70,7 @@ properties:
may be associated with cosmic rays.
type: string
enum: ['N/A', 'COMPLETE', 'SKIPPED', 'INCOMPLETE']
maxLength: 15
archive_catalog:
datatype: nvarchar(15)
destination: [ScienceRefData.s_jump]
Expand All @@ -75,6 +81,7 @@ properties:
detector response.
type: string
enum: ['N/A', 'COMPLETE', 'SKIPPED', 'INCOMPLETE']
maxLength: 15
archive_catalog:
datatype: nvarchar(15)
destination: [ScienceRefData.s_linearity]
Expand All @@ -85,6 +92,7 @@ properties:
data product.
type: string
enum: ['N/A', 'COMPLETE', 'SKIPPED', 'INCOMPLETE']
maxLength: 15
archive_catalog:
datatype: nvarchar(15)
destination: [ScienceRefData.s_photom]
Expand All @@ -94,6 +102,7 @@ properties:
Step in ROMANCAL to detect point sources in an image and catalog them.
type: string
enum: ['N/A', 'COMPLETE', 'SKIPPED', 'INCOMPLETE']
maxLength: 15
archive_catalog:
datatype: nvarchar(15)
destination: [ScienceRefData.s_source_detection]
Expand All @@ -104,6 +113,7 @@ properties:
thus estimate the count rate for each pixel.
type: string
enum: ['N/A', 'COMPLETE', 'SKIPPED', 'INCOMPLETE']
maxLength: 15
archive_catalog:
datatype: nvarchar(15)
destination: [ScienceRefData.s_ramp_fit]
Expand All @@ -114,6 +124,7 @@ properties:
contributing to (e.g. 1/f noise) using the reference pixels.
type: string
enum: ['N/A', 'COMPLETE', 'SKIPPED', 'INCOMPLETE']
maxLength: 15
archive_catalog:
datatype: nvarchar(15)
destination: [ScienceRefData.s_refpix]
Expand All @@ -125,6 +136,7 @@ properties:
or negative are also flagged.
type: string
enum: ['N/A', 'COMPLETE', 'SKIPPED', 'INCOMPLETE']
maxLength: 15
archive_catalog:
datatype: nvarchar(15)
destination: [ScienceRefData.s_saturation]
Expand All @@ -134,6 +146,7 @@ properties:
Step in ROMANCAL which detects and flags outliers in a science image.
type: string
enum: ['N/A', 'COMPLETE', 'SKIPPED', 'INCOMPLETE']
maxLength: 15
archive_catalog:
datatype: nvarchar(15)
destination: [ScienceRefData.s_outlier_detection]
Expand All @@ -145,6 +158,7 @@ properties:
World Coordinate System alignment.
type: string
enum: ['N/A', 'COMPLETE', 'SKIPPED', 'INCOMPLETE']
maxLength: 15
archive_catalog:
datatype: nvarchar(15)
destination: [ScienceRefData.s_tweakreg]
Expand All @@ -155,6 +169,7 @@ properties:
and derives scalings to equalize overlapping regions.
type: string
enum: ['N/A', 'COMPLETE', 'SKIPPED', 'INCOMPLETE']
maxLength: 15
archive_catalog:
datatype: nvarchar(15)
destination: [ScienceRefData.s_skymatch]
Expand Down
4 changes: 4 additions & 0 deletions src/rad/resources/schemas/l3_cal_step-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ properties:
The data are converted from DN/s to MJy/sr.
type: string
enum: ['N/A', 'COMPLETE', 'SKIPPED', 'INCOMPLETE']
maxLength: 15
archive_catalog:
datatype: nvarchar(15)
destination: [ScienceRefData.s_flux]
Expand All @@ -22,6 +23,7 @@ properties:
Step in ROMANCAL which detects and flags outliers in a science image.
type: string
enum: ['N/A', 'COMPLETE', 'SKIPPED', 'INCOMPLETE']
maxLength: 15
archive_catalog:
datatype: nvarchar(15)
destination: [ScienceRefData.s_outlier_detection]
Expand All @@ -32,6 +34,7 @@ properties:
and derives scalings to equalize overlapping regions.
type: string
enum: ['N/A', 'COMPLETE', 'SKIPPED', 'INCOMPLETE']
maxLength: 15
archive_catalog:
datatype: nvarchar(15)
destination: [ScienceRefData.s_skymatch]
Expand All @@ -43,6 +46,7 @@ properties:
multiple resampled images into a single, undistorted product.
type: string
enum: ['N/A', 'COMPLETE', 'SKIPPED', 'INCOMPLETE']
maxLength: 15
archive_catalog:
datatype: nvarchar(15)
destination: [ScienceRefData.s_resample]
Expand Down
5 changes: 5 additions & 0 deletions src/rad/resources/schemas/mosaic_basic-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ properties:
survey:
title: Observation Survey
type: string
maxLength: 15
archive_catalog:
datatype: nvarchar(15)
destination: [WFIMosaic.survey, SourceCatalog.survey, SegmentationMap.survey]
Expand All @@ -113,6 +114,7 @@ properties:
special_processing: VALUE_REQUIRED
source:
origin: TBD
maxLength: 20
archive_catalog:
datatype: nvarchar(20)
destination: [WFIMosaic.optical_element, SourceCatalog.optical_element, SegmentationMap.optical_element]
Expand All @@ -124,6 +126,7 @@ properties:
special_processing: VALUE_REQUIRED
source:
origin: TBD
maxLength: 5
archive_catalog:
datatype: nvarchar(5)
destination: [WFIMosaic.instrument_name, SourceCatalog.instrument_name, SegmentationMap.instrument_name]
Expand All @@ -134,6 +137,7 @@ properties:
special_processing: VALUE_REQUIRED
source:
origin: TBD
maxLength: 25
archive_catalog:
datatype: nvarchar(25)
destination: [WFIMosaic.location_name, SourceCatalog.location_name, SegmentationMap.location_name]
Expand All @@ -144,6 +148,7 @@ properties:
special_processing: VALUE_REQUIRED
source:
origin: TBD
maxLength: 25
archive_catalog:
datatype: nvarchar(25)
destination: [WFIMosaic.product_type, SourceCatalog.product_type, SegmentationMap.product_type]
Expand Down
1 change: 1 addition & 0 deletions src/rad/resources/schemas/mosaic_wcsinfo-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ properties:
special_processing: VALUE_REQUIRED
source:
origin: TBD
maxLength: 50
archive_catalog:
datatype: nvarchar(50)
destination: [WFIMosaic.projection]
Expand Down
5 changes: 5 additions & 0 deletions src/rad/resources/schemas/observation-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ properties:
special_processing: VALUE_REQUIRED
source:
origin: TBD
maxLength: 28
archive_catalog:
datatype: nvarchar(28)
destination: [WFIExposure.obs_id, GuideWindow.obs_id]
Expand All @@ -37,6 +38,7 @@ properties:
special_processing: VALUE_REQUIRED
source:
origin: TBD
maxLength: 19
archive_catalog:
datatype: nvarchar(19)
destination: [WFIExposure.visit_id, GuideWindow.visit_id]
Expand Down Expand Up @@ -154,6 +156,7 @@ properties:
special_processing: VALUE_REQUIRED
source:
origin: TBD
maxLength: 2
archive_catalog:
datatype: nvarchar(2)
destination: [WFIExposure.visit_file_activity, GuideWindow.visit_file_activity]
Expand All @@ -179,6 +182,7 @@ properties:
special_processing: VALUE_REQUIRED
source:
origin: PSS:dms_visit.template
maxLength: 50
archive_catalog:
datatype: nvarchar(50)
destination: [WFIExposure.template, GuideWindow.template]
Expand All @@ -203,6 +207,7 @@ properties:
survey not otherwise defined here.
type: string
enum: [HLS, EMS, SN, N/A]
maxLength: 15
archive_catalog:
datatype: nvarchar(15)
destination: [WFIExposure.survey, GuideWindow.survey]
Expand Down
5 changes: 5 additions & 0 deletions src/rad/resources/schemas/program-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ properties:
special_processing: VALUE_REQUIRED
source:
origin: PSS:dms_program.title
maxLength: 200
archive_catalog:
datatype: nvarchar(200)
destination: [WFIExposure.program_title, WFIMosaic.program_title, GuideWindow.program_title,
Expand All @@ -30,6 +31,7 @@ properties:
# There are a number of ways to get the pi_name. Here is one
# of them: "= apt('./ProposalInformation/PrincipalInvestigator/InvestigatorAddress/LastName') + ', ' + apt('./ProposalInformation/PrincipalInvestigator/InvestigatorAddress/FirstName')"
origin: TBD
maxLength: 100
archive_catalog:
datatype: nvarchar(100)
destination: [WFIExposure.pi_name, WFIMosaic.pi_name, GuideWindow.pi_name,
Expand All @@ -43,6 +45,7 @@ properties:
special_processing: VALUE_REQUIRED
source:
origin: PSS:dms_program.category
maxLength: 6
archive_catalog:
datatype: nvarchar(6)
destination: [WFIExposure.program_category, WFIMosaic.program_category, GuideWindow.program_category,
Expand All @@ -56,6 +59,7 @@ properties:
special_processing: VALUE_REQUIRED
source:
origin: PSS:dms_program.subcategory
maxLength: 15
archive_catalog:
datatype: nvarchar(15)
destination: [WFIExposure.program_subcategory, WFIMosaic.program_subcategory, GuideWindow.program_subcategory,
Expand All @@ -70,6 +74,7 @@ properties:
special_processing: VALUE_REQUIRED
source:
origin: PSS:dms_program.science_category
maxLength: 50
archive_catalog:
datatype: nvarchar(50)
destination: [WFIExposure.science_category, WFIMosaic.science_category, GuideWindow.science_category,
Expand Down
Loading

0 comments on commit 8a4452a

Please sign in to comment.