Draft
Add regression tests for nullable_nonnegative decode filter in write_tables#1087
Conversation
…x-code-for-review-comment
…llable_nonnegative)
Copilot
AI
changed the title
[WIP] Fix code based on review comment
Add regression tests for nullable_nonnegative decode filter in write_tables
Jul 13, 2026
jpn--
approved these changes
Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No test coverage existed for
decode_columnsmappings where the target column contains nulls and/or-1sentinel values — the scenario addressed by thenullable_nonnegativefilter added in this PR.Changes
activitysim/core/steps/_decode.py(new): Extracts_decode_output_columnand_apply_decode_filterout ofoutput.pyinto a pandas/numpy-only module, breaking the circular import chain (output → estimation → simulate → estimation) that prevented unit testing.activitysim/core/steps/output.py: Imports the two helpers from_decode.py; behavior is unchanged.activitysim/core/test/test_output.py(new): 7 focused unit tests covering all decode filter paths and the key regression scenario — a column mixingpd.NAnulls and-1sentinels withnullable_nonnegative: