Skip to content

chore: address CodeRabbit follow-up findings#107

Merged
ypriverol merged 1 commit into
devfrom
chore/coderabbit-followups
May 23, 2026
Merged

chore: address CodeRabbit follow-up findings#107
ypriverol merged 1 commit into
devfrom
chore/coderabbit-followups

Conversation

@ypriverol

Copy link
Copy Markdown
Member

Summary

Acts on the actionable findings from a CodeRabbit --agent review of the branch. Each item was verified against current code before fixing.

  • docs/use-cases.md:262 (major) — replace non-portable grep -oP (PCRE lookbehind, GNU-only) with sed -E so the per-chromosome ENSEMBL example works on default macOS / BSD grep. Also handles the .vcf.gz variant in one pass.
  • pgatk/commands/gencode_downloader.py:69 (minor) — also catch subprocess.CalledProcessError from gffread. Matches what ensembl_downloader.py:139 and ncbi_downloader.py already do; previously a gffread failure during --generate-transcripts would bubble up as an uncaught traceback.
  • pgatk/commands/ensembl_downloader.py:130 (minor) — when no genome matches a GTF's prefix, the loop silently fell back to next(iter(genome_map.values())). Now warns with the missing prefix and the fallback assembly name so users can spot a GRCh38-GTF / GRCh37-genome mismatch.
  • pgatk/testdata/clinvar/mini_clinvar.vcf:8-10 (minor) — add a header comment documenting that the two records at 1:69550 G>A are intentional: rs00002 (Benign, missense) exercises CLNSIG filtering and rs00004 (Pathogenic, synonymous) exercises consequence filtering. Both assertions live in test_clinvar_service.py / test_clinvar_integration.py.

Skipped

  • pgatk/commands/cbioportal_to_proteindb.py:99 — CodeRabbit suggested changing if workers > 1 to if workers is not None. The click option defaults to 1 and CancerGenomesService also defaults to 1 when WORKERS is unset (cgenomes_proteindb.py:411), so --workers 1 and "no flag" produce identical behaviour. The guard is not a user-visible bug.

Test plan

  • python -m pytest pgatk/tests/ -q — 315 passed
  • python -m unittest discover -s pgatk/tests -p "*_tests.py" — 20/20 passed

- docs/use-cases.md: replace non-portable `grep -oP` with a portable
  `sed -E` extraction so the per-chromosome ENSEMBL example works on
  systems without GNU grep (e.g. default macOS).
- gencode_downloader: also catch `subprocess.CalledProcessError` when
  running gffread (matches ensembl_downloader and ncbi_downloader).
- ensembl_downloader: when no genome matches the GTF prefix, emit a
  warning naming the missing prefix and the fallback assembly before
  using it — previously a GRCh38 GTF could silently pair with a GRCh37
  genome (or vice versa) with no indication to the user.
- mini_clinvar.vcf: document that rs00002 and rs00004 are intentionally
  at the same 1:69550 G>A position so the two filtering paths
  (CLNSIG-based and MC-based) are independently exercised.

Skipped: CodeRabbit also flagged the `workers > 1` guard in
cbioportal_to_proteindb. The click option defaults to 1 and the service
also defaults to 1 when WORKERS is unset, so `--workers 1` and "no flag"
produce identical behaviour; the guard is not a user-visible bug.
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@coderabbitai

coderabbitai Bot commented May 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 63dea717-5823-45b8-8c48-075544215355

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/coderabbit-followups

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ypriverol ypriverol merged commit dac9ff6 into dev May 23, 2026
5 checks passed
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.

1 participant