Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pollination/handlers-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.9.6
Choose a base ref
...
head repository: pollination/handlers-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.10.0
Choose a head ref
  • 1 commit
  • 3 files changed
  • 1 contributor

Commits on May 16, 2023

  1. Copy the full SHA
    62fe930 View commit details
Showing with 17 additions and 2 deletions.
  1. +5 −0 pollination_handlers/inputs/model.py
  2. +1 −0 tests/assets/no_grid.hbjson
  3. +11 −2 tests/input_model_test.py
5 changes: 5 additions & 0 deletions pollination_handlers/inputs/model.py
Original file line number Diff line number Diff line change
@@ -117,6 +117,11 @@ def model_to_json_grid_check(model_obj):
if len(model_obj.properties.radiance.sensor_grids) == 0:
raise ValueError(
'Model contains no sensor girds. This is required for this recipe.')
if isinstance(model_obj, str) and os.path.isfile(model_obj):
model_obj = Model.from_file(model_obj)
if len(model_obj.properties.radiance.sensor_grids) == 0:
raise ValueError(
'Model contains no sensor girds. This is required for this recipe.')
if isinstance(model_obj, str) and os.path.isdir(model_obj):
return _process_model_rad_folder(model_obj)
return model_to_json(model_obj)
Loading