Resolve CodeQL code-quality findings + metpo-edit.owl whitespace#453
Merged
Conversation
CodeQL standard findings: - audit_metatraits_substrate_curies.py: collapse implicit string concatenation in a list into single-line literals (no missing-comma ambiguity) - filter_ols_chromadb.py, metpo_assessor.py: add explanatory comments to the bare except clauses (collection-may-not-exist; not-valid-YAML fallback) - analyze_ontogpt_grounding.py: drop the unused totals/per_file unpacking at the __main__ guard - make_bacdive_utilization_enum.py: remove a commented-out description block - analyze_ontology_value.py: remove a dead filter expression with no effect AI findings (metpo-edit.owl): remove inconsistent leading whitespace before AnnotationAssertion declarations. The metpo_sheet.tsv content findings are handled separately: corrections go through the Google Sheet (source of truth), and the 'branced' upstream value + cross-ontology correction-note comments are retained intentionally. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Cleanup PR addressing CodeQL code-quality findings and AI-detected whitespace issues in metpo-edit.owl. Changes are minor: comment additions, dead code removal, and string literal consolidation.
Changes:
- Consolidated implicit string concatenations and removed dead/unused code in several Python scripts.
- Added explanatory comments to bare
exceptclauses. - Removed inconsistent leading whitespace before
AnnotationAssertionlines inmetpo-edit.owl.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/ontology/metpo-edit.owl | Strip leading whitespace before AnnotationAssertion lines |
| metpo/tools/make_bacdive_utilization_enum.py | Remove commented-out description block |
| metpo/scripts/audit_metatraits_substrate_curies.py | Convert implicit string concatenations to single-line literals |
| metpo/presentations/analyze_ontogpt_grounding.py | Drop unused tuple unpacking from main() call |
| metpo/literature_mining/analysis/metpo_assessor.py | Add explanatory comment to bare except |
| metpo/database/filter_ols_chromadb.py | Add explanatory comment to bare except |
| metpo/analysis/analyze_ontology_value.py | Remove dead filter expression |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Why
Resolves the open CodeQL "standard findings" and the
metpo-edit.owlAI findings from the Security & quality scan.CodeQL standard findings
audit_metatraits_substrate_curies.py: implicit string concatenation in a list → single-line literals (removes missing-comma ambiguity).filter_ols_chromadb.py,metpo_assessor.py: explanatory comments added to the bareexceptclauses.analyze_ontogpt_grounding.py: dropped the unusedtotals, per_fileunpacking at the__main__guard.make_bacdive_utilization_enum.py: removed a commented-out description block.analyze_ontology_value.py: removed a dead filter expression that had no effect.AI findings
src/ontology/metpo-edit.owl: removed inconsistent leading whitespace beforeAnnotationAssertiondeclarations.Deliberately handled elsewhere
The
metpo_sheet.tsvcontent findings are not in this PR: corrections (GC wording,qualitydefinition source, the NaCl-delta formula direction) go through the Google Sheet (source of truth); and thebrancedupstream value + the cross-ontology correction-note comments are retained intentionally (verbatim upstream source / valuable provenance).Verified locally:
ruff check .,ruff format --check, andpytest(26 passed) all green; no new mypy errors.🤖 Generated with Claude Code