From 47085a3f3b92e54d0683ec6d56d1bae79a07ca96 Mon Sep 17 00:00:00 2001 From: Carl Kadie Date: Wed, 3 Jul 2024 15:54:01 -0700 Subject: [PATCH] version = "1.0.5" --- Cargo.lock | 2 +- Cargo.toml | 2 +- bed_reader/_open_bed.py | 2 -- src/python_module.rs | 10 +++++----- useful.md | 1 - 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 410511e..ae72ee2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -142,7 +142,7 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bed-reader" -version = "1.0.5-beta.3" +version = "1.0.5" dependencies = [ "anyhow", "anyinput", diff --git a/Cargo.toml b/Cargo.toml index 71b16a4..19f12cf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -version = "1.0.5-beta.3" +version = "1.0.5" name = "bed-reader" description = "Read and write the PLINK BED format, simply and efficiently." repository = "https://github.com/fastlmm/bed-reader" diff --git a/bed_reader/_open_bed.py b/bed_reader/_open_bed.py index 4ab392b..383e1ab 100644 --- a/bed_reader/_open_bed.py +++ b/bed_reader/_open_bed.py @@ -1832,8 +1832,6 @@ def _convert_to_dtype(str_arr, dtype): return str_arr try: - if str_arr[0].startswith("np."): - raise ValueError("invalid cmk for int: 'np.'") new_arr = str_arr.astype(dtype) except ValueError as e: if dtype == np.float32: diff --git a/src/python_module.rs b/src/python_module.rs index f5a2e42..5533a67 100644 --- a/src/python_module.rs +++ b/src/python_module.rs @@ -50,7 +50,7 @@ fn bed_reader(_py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> { #[pyfn(m)] fn url_to_bytes(location: &str, options: &Bound<'_, PyDict>) -> Result, PyErr> { - let options: HashMap = options.extract()?; // cmk + let options: HashMap = options.extract()?; let cloud_file = CloudFile::new_with_options(location, options) .map_err(|e| Box::new(BedErrorPlus::CloudFileError(e)))?; let rt = runtime::Runtime::new()?; @@ -178,7 +178,7 @@ fn bed_reader(_py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> { #[pyfn(m)] fn check_file_cloud(location: &str, options: &Bound<'_, PyDict>) -> Result<(), PyErr> { - let options: HashMap = options.extract()?; // cmk + let options: HashMap = options.extract()?; runtime::Runtime::new()?.block_on(async { BedCloud::new_with_options(location, options).await?; Ok(()) @@ -200,7 +200,7 @@ fn bed_reader(_py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> { max_concurrent_requests: usize, max_chunk_bytes: usize, ) -> Result<(), PyErr> { - let options: HashMap = options.extract()?; // cmk + let options: HashMap = options.extract()?; let iid_index = iid_index.readonly(); let sid_index = sid_index.readonly(); @@ -247,7 +247,7 @@ fn bed_reader(_py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> { max_concurrent_requests: usize, max_chunk_bytes: usize, ) -> Result<(), PyErr> { - let options: HashMap = options.extract()?; // cmk + let options: HashMap = options.extract()?; let iid_index = iid_index.readonly(); let sid_index = sid_index.readonly(); @@ -294,7 +294,7 @@ fn bed_reader(_py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> { max_concurrent_requests: usize, max_chunk_bytes: usize, ) -> Result<(), PyErr> { - let options: HashMap = options.extract()?; // cmk + let options: HashMap = options.extract()?; let iid_index = iid_index.readonly(); let sid_index = sid_index.readonly(); diff --git a/useful.md b/useful.md index fbb6eec..ddc1446 100644 --- a/useful.md +++ b/useful.md @@ -4,7 +4,6 @@ To get some Rust PyO3 debugging to work I had to set this before starting vscode: - ```cmd set PYO3_PYTHON=C:/Users/carlk/OneDrive/programs/bed-reader/.venv\Scripts\python.exe ```