Feature/coverage next 20260519 - #146
Conversation
- Expanded test coverage in gff3.py, replace_OGS.py, gff3_sort.py, gff3_ID_generator.py - Added/updated tests for parser edge cases, error paths, and ID generation - Enforced artifact hygiene (no out_user_defined.fa, tests/__init__.py cleanup) - All tests passing, coverage up to 69% (gff3.py 60%, replace_OGS.py 62%, gff3_sort.py 68%, gff3_ID_generator.py 82%) - Created and populated docs/HANDOFF.md for seamless handoff/resume Assisted-by: GitHub Copilot (GPT-5.4)
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #146 +/- ##
===========================================
+ Coverage 54.86% 69.16% +14.30%
===========================================
Files 28 28
Lines 5313 5313
===========================================
+ Hits 2915 3675 +760
+ Misses 2398 1638 -760
... and 6 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR primarily expands unit-test coverage across core parsing/QC and CLI entrypoints, while also adjusting gff3_to_fasta argument-validation order to reduce unintended output artifacts during invalid invocations. It also adds a handoff document and a small test-run cleanup step.
Changes:
- Add/expand unit tests for parser edge cases, intra-model QC checks, replace logic, sorting behavior, and ID generation.
- Update
gff3_to_fasta.main()to validateuser_definedarguments before opening the output file. - Add a handoff markdown file and extend
tests.shto remove a couple of local-run artifacts.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
gff3tool/bin/gff3_to_fasta.py |
Reorders validation vs. output-file creation to avoid creating output on invalid user_defined args. |
tests/unit/test_gff3_to_fasta_cli.py |
Adds coverage for CLI error paths and output formatting (pep/user_defined). |
tests/unit/test_gff3_core.py |
Adds parser/directive/reference/phase/IO edge-case coverage. |
tests/unit/test_intra_model_engine.py |
Adds coverage for intra-model QC error paths (redundant length, pseudo child type, distinct isoforms, internal stops). |
tests/unit/test_replace_OGS.py |
Adds tests for UTR generation and replacer behaviors; extends FakeGff test harness. |
tests/unit/test_gff3_sort_functions.py |
Adds coverage for PositionSort/StrandSort/TypeSort edge behavior. |
tests/unit/test_gff3_sort_main.py |
New tests covering gff3_sort.main() paths (sorting order, isoform sort, omitted lines, embedded FASTA). |
tests/unit/test_gff3_id_generator.py |
Adds coverage for main() exit conditions and UUID/non-UUID ID generation behavior. |
tests/unit/test_gff3_fix_engine.py |
Extends FakeGff surface and adds fix-engine behavior tests (boundary/remove/delete/pseudogene/components). |
tests.sh |
Adds post-run cleanup of a couple of local-run artifacts. |
handoff/HANDOFF.md |
Adds a session handoff document describing coverage work and next steps. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Handoff - Coverage Expansion Session | ||
|
|
||
| Date: 2026-05-19 | ||
| Workspace: /Users/cchilders/git-repos/GFF3toolkit | ||
|
|
||
| ## Current State | ||
| - Active branch: `feature/coverage-next-20260519` | ||
| - Working tree is intentionally dirty with test/coverage work in progress. |
There was a problem hiding this comment.
Updated in commit 2099a7b: HANDOFF.md is now located at docs/HANDOFF.md so the location matches the PR references.
| def test_check_pseudo_child_type_flags_non_transcript_child(self): | ||
| root = { | ||
| "line_type": "feature", | ||
| "line_index": 0, | ||
| "type": "pseudogene", | ||
| "attributes": {"ID": "ps1"}, | ||
| "children": [{"type": "mRNA"}], | ||
| } |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/NAL-i5K/GFF3toolkit/sessions/000b4082-1660-49ee-b17d-74a8478b1330 Co-authored-by: ChrisChilders-USDA <126100971+ChrisChilders-USDA@users.noreply.github.com>
| def test_check_pseudo_child_type_flags_non_transcript_child(self): | ||
| root = { | ||
| "line_type": "feature", | ||
| "line_index": 0, | ||
| "type": "pseudogene", | ||
| "attributes": {"ID": "ps1"}, | ||
| "children": [{"type": "mRNA"}], | ||
| } |
MonicaPoelchau-USDA
left a comment
There was a problem hiding this comment.
I tested this branch on a separate test dataset - look good.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Expand test coverage, enforce artifact hygiene, update handoff
Summary
Reviewers
Assisted-by