From a77f2c3cd1b71327123172b0f03b831b6dea9bb9 Mon Sep 17 00:00:00 2001 From: Ed Slavich Date: Thu, 20 Jun 2019 12:37:30 -0400 Subject: [PATCH 1/2] Changes necessary to support jsonschema 3.x --- jwst/associations/lib/asn_schema_jw_level2b.json | 2 +- jwst/associations/lib/asn_schema_jw_level3.json | 2 +- jwst/datamodels/fits_support.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jwst/associations/lib/asn_schema_jw_level2b.json b/jwst/associations/lib/asn_schema_jw_level2b.json index f2072358b8..5a8e76f5f3 100644 --- a/jwst/associations/lib/asn_schema_jw_level2b.json +++ b/jwst/associations/lib/asn_schema_jw_level2b.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/schema#", + "$schema": "http://json-schema.org/draft-04/schema", "title": "Association: JWST DMS Level2a->Level2b", "description": "The data structure that, within the JWST DMS processing system, defines how to group level2a exposures to produce Level2b data products.", "type": "object", diff --git a/jwst/associations/lib/asn_schema_jw_level3.json b/jwst/associations/lib/asn_schema_jw_level3.json index ebe8cbcd23..1a7da4238a 100644 --- a/jwst/associations/lib/asn_schema_jw_level3.json +++ b/jwst/associations/lib/asn_schema_jw_level3.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/schema#", + "$schema": "http://json-schema.org/draft-04/schema", "title": "Association: JWST DMS Level2b->Level3", "description": "The data structure that, within the JWST DMS processing system, defines how to group level2b exposures to produce Level3 data products.", "type": "object", diff --git a/jwst/datamodels/fits_support.py b/jwst/datamodels/fits_support.py index 7dcfedc1de..4af50d9f6b 100644 --- a/jwst/datamodels/fits_support.py +++ b/jwst/datamodels/fits_support.py @@ -293,7 +293,7 @@ def _fits_item_recurse(validator, items, instance, schema): def _fits_type(validator, items, instance, schema): if instance in ('N/A', '#TODO', '', None): return - return validators._validators.type_draft4(validator, items, instance, schema) + return validators.Draft4Validator.VALIDATORS["type"](validator, items, instance, schema) FITS_VALIDATORS = HashableDict(asdf_schema.YAML_VALIDATORS) From b4a9633d6a9917d2d894806e58a258ad66b0aaa4 Mon Sep 17 00:00:00 2001 From: Ed Slavich Date: Mon, 24 Jun 2019 10:54:26 -0400 Subject: [PATCH 2/2] Add CHANGES.rst entry --- CHANGES.rst | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 9444798c4b..f98c792dbd 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,12 @@ +0.14.0 (Unreleased) +=================== + +datamodels +---------- + +- Use public API of jsonschema to ease upgrade to 3.x. + + 0.13.8 (Unreleased) =================== @@ -29,7 +38,7 @@ datamodels - Fixed corruption of FITS tables wiht unsigned int columns. [#3680] - + 0.13.5 (2019-06-19) =================== @@ -242,7 +251,7 @@ extract_2d - Replaced a white space in the names of grism objects with an underscore. [#3517] -- Update WFSS slit names to use simple integer value, and add accompanying unit +- Update WFSS slit names to use simple integer value, and add accompanying unit test for NIRCAM grism extract_2d [#3632]. master_background