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. 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__ diff --git a/pyproject.toml b/pyproject.toml index fabf6978f..009457079 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/spacetelescope/roman_datamodels.git", "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",