Skip to content

Preserve boolean values when writing mixed FAST tables - #91

Open
maoji-y wants to merge 1 commit into
OpenFAST:mainfrom
maoji-y:fix/hydrodyn-table-booleans
Open

maoji-y wants to merge 1 commit into
OpenFAST:mainfrom
maoji-y:fix/hydrodyn-table-booleans

Conversation

@maoji-y

@maoji-y maoji-y commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

HydroDyn's PropPot column expects logical tokens. When a caller puts a Python bool or numpy.bool_ in a mixed table, the formatter treats it as a number and writes 1 or 0.

Format boolean cells as True or False before numeric formatting. The regression test edits the Members table in the existing HydroDyn fixture, writes it through FASTInputFile.write(), and reads it back. It covers both boolean types and checks the other cells in the table.

Closes #35. Thanks to the reporter for identifying the formatter and the OpenFAST input error.

Validation

  • The new test fails on main (d986c9a), where the four flags read back as 1, 0, 1, 0.
  • Windows, Python 3.9 / pandas 2.3.3. All 93 tests passed with python -m unittest discover -v.
  • Windows, Python 3.12 / pandas 3.1.1. All 12 FAST input tests passed.
  • git diff --check passed.

CI follow-up

The Ubuntu job could not install Python 3.9 and the other four jobs were cancelled. On Windows with pandas 3.1.1, the full suite hit the same 11 errors on main and this branch. With the runner and pandas fixes from #90 applied locally alongside this change, all 95 tests passed using Python 3.12 and pandas 3.1.1. CI run

This contribution was prepared with assistance from OpenAI Codex.

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.

Error writing Bool in tabulated data

1 participant