Repository navigation
fix(beam): date a session by its first non-null time_anchor - #17
Open
100yenadmin wants to merge 1 commit into
Open
100yenadmin wants to merge 1 commit into
100yenadmin wants to merge 1 commit into
Conversation
BEAM-10M conversation 7 session 0 opens with null time_anchor values, so parse_beam_time(None) raised AttributeError before any of that user's sessions was ingested. Use the first non-empty anchor in the session and fall back to the existing default. The other 99 10M sessions start with an anchor and keep their dates.
2 tasks done
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.
Fixes #16.
Change
scripts/beam/beam_ingestion.py: newsession_time_anchor(messages, default="January-01-2024")returns the first non-emptytime_anchorin a session, else the default. Ingestion dates each session with it.scripts/beam/beam_streaming.py: both session-date sites use the same helper.scripts/tests/unit/test_beam_time_anchor.py: covers three cases: first-message anchor used, a null leading anchor falls through to the first non-null one, and missing or empty anchors fall back to the default.Effect
AttributeErrorthat skipped the whole conversation; it is now datedMarch-05-2020. The other 99 sessions start with an anchor and keep the same date.Tests
pytest scripts/tests/unit: 157 passed.