Skip to content

Add tables.load docstring#3453

Open
hyanwong wants to merge 1 commit intotskit-dev:mainfrom
hyanwong:doc-tables-load
Open

Add tables.load docstring#3453
hyanwong wants to merge 1 commit intotskit-dev:mainfrom
hyanwong:doc-tables-load

Conversation

@hyanwong
Copy link
Copy Markdown
Member

Fixes #3406

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.66%. Comparing base (f268aef) to head (2545b34).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3453   +/-   ##
=======================================
  Coverage   91.66%   91.66%           
=======================================
  Files          38       38           
  Lines       32184    32184           
  Branches     5150     5150           
=======================================
  Hits        29503    29503           
  Misses       2348     2348           
  Partials      333      333           
Flag Coverage Δ
C 82.23% <ø> (ø)
c-python 77.54% <ø> (ø)
python-tests 96.40% <ø> (ø)
python-tests-no-jit 33.19% <ø> (ø)

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

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

Comment thread python/tskit/tables.py Outdated
"""
Load a TableCollection from a file or path, saved in the format defined by
:meth:`.dump`. If the file is not in a valid format, an exception will be
raised.
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.

This doesn't do any validation, right? (e.g., doing tables.tree_sequence() might produce an error) This would be a useful thing to point out here, since that's one of the main uses for this function (loading up tables that don't validate).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Correct -- no validation happens. The relevant logic is line 4943 of _tskitmodule.c.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah, great point. I will add that comment

@hyanwong hyanwong force-pushed the doc-tables-load branch from 5af5c97 to c4b0a68 Compare May 1, 2026 11:12
@hyanwong hyanwong force-pushed the doc-tables-load branch from c4b0a68 to 2545b34 Compare May 1, 2026 11:43
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.

Add docstring to TableCollection.load()

3 participants