You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix get_postprocessing_steps: The function was returning raw ontology entries instead of formatted step strings. Now correctly formats {ont}, {ontology}, and {db} placeholders in post-processing commands.
Fix ontology_from_target_path: Replace fragile regex with pathlib-based extraction that handles hyphenated ontology names (e.g. reactome-mm). The old \w+ pattern silently failed on these.
Add CMSO and ASMO to the ontology registry with their prefix mappings and Makefile download rules.
Add tests for post-processing step formatting, missing ontology handling, and target path parsing.
Issue: The # noqa S602 comment acknowledges this bandit security warning but shell=True with user-controlled input is dangerous
Context: step comes from ontology registry post-processing steps, so risk is limited to registry maintainers
Recommendation: Consider using subprocess.run(step.split(), shell=False) or shlex.split(step) for safer execution
⚡ Performance - Good
Path operations using pathlib are efficient
No unnecessary loops or expensive operations
Registry loading is done once per function call (appropriate)
Minor Suggestions
1. Error Handling
The new ontology_from_target_path function could benefit from explicit error handling for malformed paths, though current implementation with early returns is acceptable.
2. Consistency
Consider adding type hints to the new ontology_from_target_path function to match the codebase style:
Adds valuable ontology support with proper metadata
Uses defensive programming practices
Recommendation: Approve with consideration for the shell injection mitigation.
The fixes are solid improvements that replace fragile regex/string manipulation with robust pathlib operations and proper string formatting. The test coverage is thorough and follows project standards.
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
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
get_postprocessing_steps: The function was returning raw ontology entries instead of formatted step strings. Now correctly formats{ont},{ontology}, and{db}placeholders in post-processing commands.ontology_from_target_path: Replace fragile regex withpathlib-based extraction that handles hyphenated ontology names (e.g.reactome-mm). The old\w+pattern silently failed on these.Test plan
test_get_postprocessing_steps— verifies placeholder substitutiontest_get_postprocessing_steps_missing_ontology— returns empty list for unregistered ontologytest_ontology_from_target_path— covers normal, hyphenated, wrong-dir, and wrong-extension casesontology_from_target_path🤖 Generated with Claude Code