Align june_events sentinel handling with engine's consistent-sentinel rollout#19
Merged
mtcorread merged 8 commits intoJul 23, 2026
Merged
Conversation
added 7 commits
May 28, 2026 15:00
Reproducible conda environment for building and running JUNE2. Includes cxx-compiler (GCC on Linux), cmake, hdf5, yaml-cpp, openmpi, Python test deps (h5py, numpy), and optional deps metis and gperftools.
…ollout IDAS-Durham#16 narrowed infector_symptom_id uint16_t->uint8_t & made the engine write kNoSymptomId (255) directly for no-infector rows (seed/fomite/compartmental), replacing the old ambiguous 0 ("recovered"). june_events predated that fix: decode/sentinels.py only had one generic UNSET_REGISTRY_INDEX=255, and load_enriched.py worked around the ambiguity with a manual NaN-masking pass keyed on infector_id==-1 before registry decode. - decode/sentinels.py, decode/__init__.py: split UNSET_REGISTRY_INDEX into DEFAULT_ENCOUNTER_TYPE_ID and NO_SYMPTOM_ID, mirroring kDefaultEncounterTypeId and kNoSymptomId in include/core/types.h even though both are 255 - the engine no longer treats them as one concept, so neither should this module. - load_enriched.py: drop _mask_infector_symptom_for_no_infector; register infector_symptom_id's sentinel/label in REGISTRY_SENTINELS/ UNSET_LABEL_OVERRIDES instead, same path already used for encounter_type_id. - tests/test_load_enriched.py: update no-infector fixture row to uint8/255 (was uint16/0) to match the engine's actual wire format post-IDAS-Durham#16. - CONTEXT.md, PDR.md: document the two distinct 255 sentinels and flag that tests/fixtures/simulation_events_fixture.h5 still predates IDAS-Durham#16 (uint16 infector_symptom_id, 0 for no-infector) until rebuilt via build_fixture.py against a current simulation_events.h5.
mtcorread
approved these changes
Jul 23, 2026
mtcorread
approved these changes
Jul 23, 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.
Summary
infector_symptom_iduint16_t -> uint8_t and made the engine writekNoSymptomId(255) directly for no-infector rows (seed/fomite/compartmental infections), replacing the old ambiguous0("recovered").june_eventspredated that fix.decode/sentinels.py's single genericUNSET_REGISTRY_INDEXintoDEFAULT_ENCOUNTER_TYPE_IDandNO_SYMPTOM_ID, mirroringkDefaultEncounterTypeId/kNoSymptomIdininclude/core/types.h, even though both are 255.load_enriched.py's manual NaN-masking workaround forinfector_symptom_id; it's now handled byREGISTRY_SENTINELS/UNSET_LABEL_OVERRIDES, the same path already used forencounter_type_id.CONTEXT.md/PDR.mdto document the two distinct 255 sentinels, and flagged thattests/fixtures/simulation_events_fixture.h5still predates Consistent sentinels for event-logging IDs, encounter types, symptoms #16 (uint16infector_symptom_id, 0 for no-infector) until rebuilt viabuild_fixture.pyagainst a currentsimulation_events.h5.Test plan
pytest analysis_tools/june_events/tests/— 41 passed