Skip to content

Commit

Permalink
Fix get_crds_parameters for ModelContainer (spacetelescope#846)
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamJamieson authored and mairanteodoro committed Sep 12, 2023
1 parent 7fef78d commit 59f1d66
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
5 changes: 4 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
0.13.0 (unreleased)
===================

-
general
-------

- Fix bug with ``ModelContainer.get_crds_parameters`` being a property not a method [#846]

0.12.0 (2023-08-18)
===================
Expand Down
1 change: 0 additions & 1 deletion romancal/datamodels/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,6 @@ def crds_observatory(self):
"""
return "roman"

@property
def get_crds_parameters(self):
"""
Get parameters used by CRDS to select references for this model.
Expand Down
10 changes: 2 additions & 8 deletions romancal/datamodels/tests/test_datamodels.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,17 +359,11 @@ def test_get_crds_parameters(n, obj_type, tmp_path, request):
n, obj_type, tmp_path
)

mc = ModelContainer(filepath_list)

res = mc.get_crds_parameters

assert isinstance(res, dict)
assert isinstance(ModelContainer(filepath_list).get_crds_parameters(), dict)


def test_get_crds_parameters_empty():
mc = ModelContainer()

crds_param = mc.get_crds_parameters
crds_param = ModelContainer().get_crds_parameters()

assert isinstance(crds_param, dict)
assert len(crds_param) == 0
Expand Down

0 comments on commit 59f1d66

Please sign in to comment.