Skip to content

Fix documentation for incrementing VCF positions - #3517

Merged
petrelharp merged 2 commits into
tskit-dev:mainfrom
jwgarber:fix-doc
Nov 29, 2026
Merged

petrelharp merged 2 commits into
tskit-dev:mainfrom
jwgarber:fix-doc

Conversation

@jwgarber

Copy link
Copy Markdown
Contributor

The suggested documentation for incrementing positions doesn't work, since sometimes the positions will be a list instead of a numpy array (so adding 1 to the list throws an error because + is concatenation). Convert the list to an array first to prevent this.

PR Checklist:

  • Tests that fully cover new/changed functionality.
  • Documentation including tutorial content if appropriate.
  • Changelogs, if there are API changes.

Sometimes the positions will be a list instead of a numpy array,
so adding 1 to the list throws an error (because + is concatenation).
Convert the list to an array first to prevent this.

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

Hey, thanks for that!

@codecov

codecov Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.72%. Comparing base (9c21a80) to head (e097f95).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3517   +/-   ##
=======================================
  Coverage   91.72%   91.72%           
=======================================
  Files          37       37           
  Lines       30839    30839           
  Branches     4921     4921           
=======================================
  Hits        28286    28286           
  Misses       2223     2223           
  Partials      330      330           
Flag Coverage Δ
C 82.32% <ø> (ø)
c-python 77.05% <ø> (ø)
python-tests 96.44% <ø> (ø)
python-tests-no-jit 33.26% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Python API 98.73% <ø> (ø)
Python C interface 91.21% <ø> (ø)
C library 91.27% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread python/tskit/vcf.py Resolved
@petrelharp
petrelharp added this pull request to the merge queue Nov 29, 2026
Merged via the queue into tskit-dev:main with commit b647632 Nov 29, 2026
17 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.

2 participants