Skip to content

hotfix to handle bools in serialized test data#75

Merged
fmalatino merged 1 commit into
NOAA-GFDL:developfrom
oelbert:hotfix/bool_test
Sep 9, 2024
Merged

hotfix to handle bools in serialized test data#75
fmalatino merged 1 commit into
NOAA-GFDL:developfrom
oelbert:hotfix/bool_test

Conversation

@oelbert

@oelbert oelbert commented Sep 9, 2024

Copy link
Copy Markdown
Collaborator

Description
Previously, boolean namelist parameters were being cast to floats, which passed typechecks because native Python can handle int or float values as bools, but GT4Py does not, which caused problems with non-boolean conditionals inside stencils. This fixes that behavior by preserving boolean parameters in the translate test data.

Fixes # (issue)
If this is a hotfix to a released version, please specify it.

How Has This Been Tested?
Tested with physics translate tests

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • New check tests, if applicable, are included

@FlorianDeconinck FlorianDeconinck left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fmalatino fmalatino merged commit 4ff66a9 into NOAA-GFDL:develop Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants