Log DIAMOND version before prefilter and assert it is emitted in test#284
Log DIAMOND version before prefilter and assert it is emitted in test#284
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 20d8aaaf8b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| diamond_version = extern.run("diamond --version").strip() | ||
| logging.info("DIAMOND version: %s", diamond_version) |
There was a problem hiding this comment.
Guard DIAMOND version check to preserve SRA cleanup
If diamond --version fails (e.g., DIAMOND missing or misconfigured) and input_sra_files was used, the exception now happens before the existing try/except block that logs the DIAMOND failure and calls finish_sra_extraction_processes. That means the kingfisher extraction processes started above can be left running or blocked on their FIFOs with no cleanup, which didn’t occur before this change. This only shows up when SRA input is active and the version check errors, but in that case it can leak subprocesses and leave temp resources behind.
Useful? React with 👍 / 👎.
Motivation
Description
extern.run("diamond --version")andlogging.info("DIAMOND version: %s", diamond_version)insinglem/pipe.pyimmediately before the DIAMOND prefilter blastx invocation.test/test_pipe.py::test_fast_protein_package_prefilterto run thepipecommand withsubprocess.run(..., capture_output=True)and assert that the stderr contains the"DIAMOND version:"message while preserving the existing stdout OTU table assertion.Testing
pixi run -e dev pytest testto exercise the change and capture CI-style results.test/test_pipe.py::Tests::test_genome_input_dereplicationwhich exhibited an assertion mismatch (unrelated to the added logging).Codex Task