-
Notifications
You must be signed in to change notification settings - Fork 52
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
Add async alignment reader #288
Conversation
I think the async I'll move on to the Builder after you're happy with everything up to this point @zaeleus. Also, I figured doing all of this in one PR, with reviews at each stage on the checklist, would be best. Though I guess we could do separate PRs for the Reader and Writer. Up to you. |
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.
so if I am too slow and you want to work on this sooner you can use where I got to (if you want).
No rush and no worries.
I haven't added doc examples yet as these will be easier to do once I have implemented the Builder for the Reader.
Examples are not dependent on the builder. The enum variants are public, and one can be selected for the test, e.g., this example written before the builder was available:
noodles/noodles-util/src/variant/async/io/reader.rs
Lines 22 to 40 in 21486a1
/// Reads the VCF header. | |
/// | |
/// # Examples | |
/// | |
/// ``` | |
/// # #[tokio::main] | |
/// # async fn main() -> tokio::io::Result<()> { | |
/// use noodles_util::variant::r#async::io::Reader; | |
/// use noodles_vcf as vcf; | |
/// | |
/// let data = b"##fileformat=VCFv4.5 | |
/// #CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO | |
/// "; | |
/// | |
/// let mut reader = Reader::Vcf(vcf::r#async::io::Reader::new(&data[..])); | |
/// let _header = reader.read_header().await?; | |
/// # Ok(()) | |
/// # } | |
/// ``` |
Though I guess we could do separate PRs for the Reader and Writer.
I recommend splitting the reader and writer into two PRs. The features are independent, and smaller patches are always easier to reason.
I've nearly added the
I can see that this seems to be coming from having an No doubt you'll see a simple solution that I am to naive to think of myself (as always) 😅 |
This is to better match `util_variant_view_async`.
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.
Great work, thanks!
See #286 for more details.
Creating this as a draft so if I am too slow and you want to work on this sooner you can use where I got to (if you want).
Checklist
examples/
entry