Skip to content

Feature/coverage next 20260519 - #146

Open
ChrisChilders-USDA wants to merge 7 commits into
masterfrom
feature/coverage-next-20260519
Open

Feature/coverage next 20260519#146
ChrisChilders-USDA wants to merge 7 commits into
masterfrom
feature/coverage-next-20260519

Conversation

@ChrisChilders-USDA

Copy link
Copy Markdown
Contributor

Expand test coverage, enforce artifact hygiene, update handoff

Summary

  • 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

Reviewers

Assisted-by

  • Assisted-by: GitHub Copilot (GPT-5.4)

- 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

codecov Bot commented May 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.16%. Comparing base (e2e6bbd) to head (ebd7b9e).
⚠️ Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
gff3tool/bin/gff3_to_fasta.py 75.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             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     
Files with missing lines Coverage Δ
gff3tool/bin/gff3_to_fasta.py 51.96% <75.00%> (+8.54%) ⬆️

... and 6 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e2e6bbd...ebd7b9e. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 validate user_defined arguments before opening the output file.
  • Add a handoff markdown file and extend tests.sh to 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.

Comment thread docs/HANDOFF.md Outdated
Comment on lines +1 to +8
# 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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Updated in commit 2099a7b: HANDOFF.md is now located at docs/HANDOFF.md so the location matches the PR references.

Comment thread handoff/HANDOFF.md Outdated
Comment on lines +66 to +73
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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.

Comment thread tests.sh Outdated
Comment on lines +66 to +73
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 MonicaPoelchau-USDA 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.

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>
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.

5 participants