Skip to content

Resolve CodeQL code-quality findings + metpo-edit.owl whitespace#453

Merged
turbomam merged 1 commit into
mainfrom
quality/codeql-findings
Jun 1, 2026
Merged

Resolve CodeQL code-quality findings + metpo-edit.owl whitespace#453
turbomam merged 1 commit into
mainfrom
quality/codeql-findings

Conversation

@turbomam

@turbomam turbomam commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Why

Resolves the open CodeQL "standard findings" and the metpo-edit.owl AI 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 bare except clauses.
  • analyze_ontogpt_grounding.py: dropped the unused totals, per_file unpacking 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 before AnnotationAssertion declarations.

Deliberately handled elsewhere

The metpo_sheet.tsv content findings are not in this PR: corrections (GC wording, quality definition source, the NaCl-delta formula direction) go through the Google Sheet (source of truth); and the branced upstream value + the cross-ontology correction-note comments are retained intentionally (verbatim upstream source / valuable provenance).

Verified locally: ruff check ., ruff format --check, and pytest (26 passed) all green; no new mypy errors.

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings June 1, 2026 21:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 except clauses.
  • Removed inconsistent leading whitespace before AnnotationAssertion lines in metpo-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.

@turbomam turbomam merged commit 64fe05a into main Jun 1, 2026
8 checks passed
@turbomam turbomam deleted the quality/codeql-findings branch June 1, 2026 21:17
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