-
Notifications
You must be signed in to change notification settings - Fork 78
Dump/load from file objects #599
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
32dfd9e to
cbbad63
Compare
|
Need to fix tskit-dev/kastore#121 before taking this up again. |
6702127 to
3499210
Compare
|
I think I'm going to leave it here with just the C changes required for working with files, and push the Python changes needed to a later release. Managing arbitrary file handles isn't on anyones critical path for Python, I think, so we don't need to push it. @grahamgower, would you mind taking a look over this please? Are you OK with this just being in the C API for now, or do you want file streams in Python also for your apps? Should be ready to merge after we've pulling in kastore C API 2.0.0 and a rebase/tidyup. |
3499210 to
8564247
Compare
|
This is excellent, thanks @jeromekelleher! The C API is the bit I wanted to use, yes. Of course, I'm sure I'll use the Python interface too when it exists, but I don't have any immediate plans for that. |
|
Thanks @grahamgower - I'll queue the Python version up for release 3.1 so. It'd be nice to just do it now, but there's too much going on. |
Codecov Report
@@ Coverage Diff @@
## master #599 +/- ##
==========================================
+ Coverage 87.64% 87.66% +0.02%
==========================================
Files 23 23
Lines 17431 17501 +70
Branches 3434 3450 +16
==========================================
+ Hits 15277 15342 +65
- Misses 1055 1058 +3
- Partials 1099 1101 +2
Continue to review full report at Codecov.
|
d123456 to
2078e08
Compare
|
This is ready for review, whenever suits @benjeffery (no hurry) |
2078e08 to
57c0c79
Compare
|
The coverage is a little low on this one, but I think I've covered everything that can be hit. In particular, the |
benjeffery
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Just the one typo.
Are we planning on bringing this functionality to the cli? e.g. tskit info < stream.trees
- Fix issue in which TSK_NO_INIT was not being observed for load_tables.
ef91dae to
0199fbb
Compare
Great, let's get this one queued up for merging then.
Yes, but let's put it off until 0.3.1. There's enough going on for 0.3 for now, and this was really to get the change into the C API. |
Support loading/dumping tree sequences to real files rather than just paths.
See #565 for background.
Not for merging - this temporarily pulls in kastore, but needs rebasing when we bring in kastore 2.0 properly as noted in the first commit.