aiondata
Advanced tools
+12
-13
@@ -47,4 +47,5 @@ import io | ||
| @staticmethod | ||
| def _convert_to_numeric(prop_name: str, value: str) -> Union[int, float, str, None]: | ||
| def _convert_to_numeric( | ||
| self, prop_name: str, value: str | ||
| ) -> Union[int, float, str, None]: | ||
| """ | ||
@@ -76,3 +77,3 @@ Converts a property value to numeric type. | ||
| @staticmethod | ||
| def from_url(url: str) -> "BindingDB": | ||
| def from_url(url: str) -> io.BufferedReader: | ||
| """ | ||
@@ -85,3 +86,3 @@ Creates a BindingDB instance from a URL containing a compressed SDF file, using streaming. | ||
| Returns: | ||
| A BindingDB instance. | ||
| A BufferedReader instance containing the content of the SDF file. | ||
| """ | ||
@@ -93,6 +94,6 @@ with urllib.request.urlopen(url) as response: | ||
| sdf_content = io.BufferedReader(sdf_file) | ||
| return BindingDB(sdf_content) | ||
| return sdf_content | ||
| @staticmethod | ||
| def from_compressed_file(file_path: str) -> "BindingDB": | ||
| def from_compressed_file(file_path: str) -> io.BufferedReader: | ||
| """ | ||
@@ -105,3 +106,3 @@ Creates a BindingDB instance from a compressed SDF file. | ||
| Returns: | ||
| A BindingDB instance. | ||
| A BufferedReader instance containing the content of the SDF file. | ||
| """ | ||
@@ -112,6 +113,6 @@ with zipfile.ZipFile(file_path) as z: | ||
| sdf_content = io.BufferedReader(sdf_file) | ||
| return BindingDB(sdf_content) | ||
| return sdf_content | ||
| @staticmethod | ||
| def from_uncompressed_file(file_path: str) -> "BindingDB": | ||
| def from_uncompressed_file(file_path: str) -> io.BufferedReader: | ||
| """ | ||
@@ -124,5 +125,5 @@ Creates a BindingDB instance from an uncompressed SDF file. | ||
| Returns: | ||
| A BindingDB instance. | ||
| A BufferedReader instance containing the content of the SDF file. | ||
| """ | ||
| return BindingDB(open(file_path, "rb")) | ||
| return open(file_path, "rb") | ||
@@ -165,4 +166,2 @@ def to_generator(self, progress_bar: bool = True) -> Generator[dict, None, None]: | ||
| yield record | ||
| else: | ||
| break | ||
@@ -169,0 +168,0 @@ # Re-enable logging |
+1
-1
| Metadata-Version: 2.1 | ||
| Name: aiondata | ||
| Version: 0.4.3 | ||
| Version: 0.4.4 | ||
| Summary: A common data access layer for AI-driven drug discovery. | ||
@@ -5,0 +5,0 @@ Home-page: https://www.github.com/aion-labs/aiondata |
+1
-1
| [tool.poetry] | ||
| name = "aiondata" | ||
| version = "0.4.3" | ||
| version = "0.4.4" | ||
| description = "A common data access layer for AI-driven drug discovery." | ||
@@ -5,0 +5,0 @@ authors = ["JJ Ben-Joseph <jj@tensorspace.ai>"] |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
50498
0.14%579
-0.17%