Repository navigation
fix(config): resolve duplicate session IDs without excluding every session - #143
Open
ehennestad wants to merge 2 commits into
Open
ehennestad wants to merge 2 commits into
ehennestad wants to merge 2 commits into
Conversation
…ssion Session initialization removed every session whose session ID occurred more than once. When the session level of a data location is a file, every file in a folder gives one session, so each session ID occurred several times and no sessions were left. - Add nansen.manage.excludeSameFolderDuplicates and call it in initializeSessionTable. It keeps the first of the sessions that have the same session ID and the same session folder in every data location, without a dialog. - Add nansen.manage.excludeDuplicateSessions with a KeepFirst option. - Offer "Keep first", "Exclude all" and "Resolve manually" in uiresolveDuplicateSessions. "Keep first" prints the excluded folders, because detectNewSessions skips folders whose session ID is already in the session table. - Tell the user in the dialog to change the session ID extraction when the folders hold different sessions. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
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.
Mechanism
nansen.config.initializeSessionTablecreates oneSessionobject for each entry thatnansen.dataio.session.listSessionFoldersreturns. When the session level of a data location is a file (SubfolderStructure(end).IsFolderis false), every matching file is one entry.Session.getSessionFoldermaps a file to its parent folder, so several files in one folder with the same session ID give several sessions with the same session ID and the same session folder.Problem
When session IDs were duplicated,
nansen.manage.uiresolveDuplicateSessionsoffered "Exclude duplicates", which removed every session whose ID occurred more than once. For a flat folder with several files per session this removed all sessions, and initialization failed withNANSEN:InitializeSessionArray:DuplicateSessionIDs.Changes
nansen.manage.excludeSameFolderDuplicates. It keeps the first of the sessions that have the same session ID and the same session folder in every data location.initializeSessionTablecalls it after constructing the sessions, also whenSkipInteractiveStepsis true. No dialog is shown for these sessions.nansen.manage.excludeDuplicateSessionswith aKeepFirstoption. It returns the remaining sessions and a table of the excluded sessions.uiresolveDuplicateSessionsnow offers "Keep first", "Exclude all" and "Resolve manually". The dialog is shown only when the same session ID comes from different folders. "Keep first" prints the excluded folders to the command window, becausenansen.manage.detectNewSessionsskips folders whose session ID is already in the session table. The default button is "Exclude all".DuplicateSessionResolutionTest.🤖 Generated with Claude Code