Skip to content

Commit

Permalink
all tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlKCarlK committed Feb 1, 2024
1 parent 4674d68 commit 5f520bc
Show file tree
Hide file tree
Showing 12 changed files with 133 additions and 1,709 deletions.
2 changes: 0 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 9 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repository = "https://github.com/fastlmm/bed-reader"
readme = "README-rust.md"
documentation = "https://docs.rs/bed-reader/latest/bed_reader/"
authors = ["FaST-LMM Team <[email protected]>"]
license = "Apache-2.0"
license = "Apache-2.0" # toml-ignore
keywords = ["bioinformatics", "plink", "genomics", "genotype", "snps"]
categories = ["science"]
edition = "2021"
Expand All @@ -26,17 +26,17 @@ crate-type = ["cdylib", "rlib"]
# https://github.com/PyO3/pyo3/discussions/2271
# https://pyo3.rs/latest/faq.html#i-cant-run-cargo-test-or-i-cant-build-in-a-cargo-workspace-im-having-linker-issues-like-symbol-not-found-or-undefined-reference-to-_pyexc_systemerror
[features]
extension-module = ["pyo3/extension-module", "pyo3-asyncio", "cloud"]
extension-module = ["pyo3/extension-module", "pyo3-asyncio", "cloud", "tokio/full"]
cloud = [
"cloud-file",
"object_store",
"pyo3-asyncio",
"tokio/full",
"futures-util",
"bytecount",
"itertools",
"futures-util",
"bytes",
"url"
# "pyo3-asyncio",
# "tokio/full",
# "bytecount",
# "url"
]
default = ["cloud", "extension-module"] # remove extension-module from default

Expand Down Expand Up @@ -65,7 +65,8 @@ bytecount = { version = "0.6.7", optional = true }
itertools = { version = "0.12.0", optional = true }
bytes = { version = "1.5.0", optional = true }
url = { version = "2.5.0", optional = true }
cloud-file = { version = "0.1.0-beta.2", optional = true }
# cmk cloud-file = { version = "0.1.0-beta.2", optional = true }
cloud-file = {path="../cloud-file", optional = true}

[dev-dependencies]
ndarray-rand = "0.14.0"
Expand Down
5 changes: 2 additions & 3 deletions README-rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,10 @@ for details specifying a file in the cloud.)
# #[cfg(feature = "cloud")] // '#' needed for doctest
# { use {bed_reader::BedErrorPlus, tokio::runtime::Runtime};
use ndarray as nd;
use bed_reader::{assert_eq_nan, BedCloud, ReadOptions, EMPTY_OPTIONS};
use bed_reader::{assert_eq_nan, BedCloud, ReadOptions};
# Runtime::new().unwrap().block_on(async {
let mut bed_cloud = BedCloud::new(
"https://raw.githubusercontent.com/fastlmm/bed-sample-files/main/small.bed",
EMPTY_OPTIONS,
"https://raw.githubusercontent.com/fastlmm/bed-sample-files/main/small.bed"
).await?;
let val = ReadOptions::builder().sid_index(2).f64().read_cloud(&mut bed_cloud).await?;
assert_eq_nan(&val, &nd::array![[f64::NAN], [f64::NAN], [2.0]]);
Expand Down
Loading

0 comments on commit 5f520bc

Please sign in to comment.