Skip to content

Check minknow experiment folder on startup - #86

Open
berndbohmeier wants to merge 2 commits into
mainfrom
feature/check-minknow-folder-directly
Open

berndbohmeier wants to merge 2 commits into
mainfrom
feature/check-minknow-folder-directly

Conversation

@berndbohmeier

Copy link
Copy Markdown
Collaborator

We checked that the minknow experiment folder is created only a few sec after the minknow experiment is started, probably after some checks are run. We decided this is good enough to check it so that people who misspelled something will be notified. Some folders inside are only created much later, so we should not wait for that.

We checked that the minknow experiment folder is created only a few
sec after the minknow experiment is started, probably after some checks
are run. We decided this is good enough to check it so that people who
misspelled something will be notified. Some folders inside are only
created much later, so we should not wait for that.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Four moderate findings remain unresolved.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds startup validation for MinKNOW experiment folders and improved typo suggestions for experiment and metadata names.

Changes:

  • Validates experiment directories during path resolution.
  • Adds close-match suggestions for experiments and metadata files.
  • Routes input errors through user-facing CLI messages.
File summaries
File Summary and findings
src/nomadic/util/minknow.py Adds experiment validation and similarity matching. Moderate findings: use is_dir(), exclude reserved directories, and normalize case-insensitive comparisons (3, 3, and 1 votes).
src/nomadic/realtime/commands.py Adds metadata matching and error handling. Moderate finding: restrict candidates to .csv and .xlsx files (2 votes).
Review details

Suppressed comments (1)

src/nomadic/util/minknow.py:140

  • The query is lowercased but the candidate directory names are not, so the supposed close-match lookup is still case-sensitive. For an uppercase MinKNOW experiment such as ABCDEF, even a one-character typo can fall through to the generic message; normalize both sides for comparison while returning the original directory name.
    close_matches = difflib.get_close_matches(
        experiment_name.lower(),
        [d.name for d in minknow_path.glob("*") if d.is_dir()],
        cutoff=0.8,
  • Files reviewed: 2/2 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/nomadic/realtime/commands.py Outdated
Comment thread src/nomadic/util/minknow.py Outdated
Comment thread src/nomadic/util/minknow.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@berndbohmeier
berndbohmeier force-pushed the feature/check-minknow-folder-directly branch from 3b97e10 to 60a077d Compare September 11, 2026 15:24
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.

2 participants