From 00de96f96ea5cf6793fe93fa81ff4a86dab13c5b Mon Sep 17 00:00:00 2001 From: Brett Date: Fri, 8 Nov 2024 08:59:51 -0500 Subject: [PATCH 1/4] update docs to reflect lack of assignment validation --- docs/roman/datamodels/metadata.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/roman/datamodels/metadata.rst b/docs/roman/datamodels/metadata.rst index 24a42bd34..33e7baab8 100644 --- a/docs/roman/datamodels/metadata.rst +++ b/docs/roman/datamodels/metadata.rst @@ -10,9 +10,8 @@ observation was made:: print(model.meta.observation.start_time) -Metadata values are automatically type-checked against the schema when -they are set. Therefore, setting a attribute which expects a number to a -string will raise an exception. +Metadata values will be validated against the schema when ``validate`` +is called, when the data model is saved or when a file is read. .. code-block:: python @@ -20,7 +19,8 @@ string will raise an exception. >>> from roman_datamodels.maker_utils import mk_datamodel >>> model = mk_datamodel(rdm.ImageModel) - >>> model.meta.pointing.target_ra = "foo" # doctest: +IGNORE_EXCEPTION_DETAIL + >>> model.meta.pointing.target_ra = "foo" + >>> model.validate() # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): File "", line 1, in File "/path/to/python/lib/python3.12/site-packages/roman_datamodels/stnode/_node.py", line 251, in __setattr__ From 8acc3fe9a26a35b31290791f06b04fa85ad8e623 Mon Sep 17 00:00:00 2001 From: Brett Date: Fri, 8 Nov 2024 11:45:40 -0500 Subject: [PATCH 2/4] add changelog --- changes/1504.docs.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changes/1504.docs.rst diff --git a/changes/1504.docs.rst b/changes/1504.docs.rst new file mode 100644 index 000000000..ff94ee2ef --- /dev/null +++ b/changes/1504.docs.rst @@ -0,0 +1 @@ +Remove assignment validation example from docs. From bb2f30bdcacf03f7155e5834cc55a66d12e6b69d Mon Sep 17 00:00:00 2001 From: Brett Date: Wed, 20 Nov 2024 09:21:16 -0500 Subject: [PATCH 3/4] TMP: point roman_datamodels to PR branch --- pyproject.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index fabf6978f..132ba8d84 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,10 +23,10 @@ dependencies = [ "photutils >=1.13.0", "pyparsing >=2.4.7", "requests >=2.26", - "roman_datamodels>=0.22.0,<0.23.0", - # "roman_datamodels @ git+https://github.com/spacetelescope/roman_datamodels.git", + # "roman_datamodels>=0.22.0,<0.23.0", + "roman_datamodels @ git+https://github.com/braingram/roman_datamodels.git@no_assignment_validation", "scipy >=1.11", - "stcal>=1.10.0,<1.11.0", + "stcal>=1.10.0,<1.11.0", # "stcal @ git+https://github.com/spacetelescope/stcal.git@main", "stpipe >=0.7.0,<0.8.0", # "stpipe @ git+https://github.com/spacetelescope/stpipe.git@main", From df0ca7656793da070ac0c68933305245e87bdb5f Mon Sep 17 00:00:00 2001 From: Brett Date: Fri, 22 Nov 2024 13:17:00 -0500 Subject: [PATCH 4/4] switch roman_datamodels back to dev --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 132ba8d84..009457079 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ dependencies = [ "pyparsing >=2.4.7", "requests >=2.26", # "roman_datamodels>=0.22.0,<0.23.0", - "roman_datamodels @ git+https://github.com/braingram/roman_datamodels.git@no_assignment_validation", + "roman_datamodels @ git+https://github.com/spacetelescope/roman_datamodels.git", "scipy >=1.11", "stcal>=1.10.0,<1.11.0", # "stcal @ git+https://github.com/spacetelescope/stcal.git@main",