scigantic-bindingdb 0.2.5__tar.gz → 0.2.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. {scigantic_bindingdb-0.2.5/src/scigantic_bindingdb.egg-info → scigantic_bindingdb-0.2.7}/PKG-INFO +9 -1
  2. {scigantic_bindingdb-0.2.5 → scigantic_bindingdb-0.2.7}/README.md +4 -0
  3. {scigantic_bindingdb-0.2.5 → scigantic_bindingdb-0.2.7}/pyproject.toml +5 -1
  4. {scigantic_bindingdb-0.2.5 → scigantic_bindingdb-0.2.7}/src/scigantic_bindingdb/connection.py +9 -1
  5. {scigantic_bindingdb-0.2.5 → scigantic_bindingdb-0.2.7/src/scigantic_bindingdb.egg-info}/PKG-INFO +9 -1
  6. {scigantic_bindingdb-0.2.5 → scigantic_bindingdb-0.2.7}/src/scigantic_bindingdb.egg-info/SOURCES.txt +1 -0
  7. scigantic_bindingdb-0.2.7/tests/test_jupyter_progress_bar.py +45 -0
  8. {scigantic_bindingdb-0.2.5 → scigantic_bindingdb-0.2.7}/LICENSE +0 -0
  9. {scigantic_bindingdb-0.2.5 → scigantic_bindingdb-0.2.7}/setup.cfg +0 -0
  10. {scigantic_bindingdb-0.2.5 → scigantic_bindingdb-0.2.7}/src/scigantic_bindingdb/__init__.py +0 -0
  11. {scigantic_bindingdb-0.2.5 → scigantic_bindingdb-0.2.7}/src/scigantic_bindingdb/__main__.py +0 -0
  12. {scigantic_bindingdb-0.2.5 → scigantic_bindingdb-0.2.7}/src/scigantic_bindingdb/_constants.py +0 -0
  13. {scigantic_bindingdb-0.2.5 → scigantic_bindingdb-0.2.7}/src/scigantic_bindingdb/cache.py +0 -0
  14. {scigantic_bindingdb-0.2.5 → scigantic_bindingdb-0.2.7}/src/scigantic_bindingdb/chembl_bridge.py +0 -0
  15. {scigantic_bindingdb-0.2.5 → scigantic_bindingdb-0.2.7}/src/scigantic_bindingdb/cli.py +0 -0
  16. {scigantic_bindingdb-0.2.5 → scigantic_bindingdb-0.2.7}/src/scigantic_bindingdb/dti_pairs.py +0 -0
  17. {scigantic_bindingdb-0.2.5 → scigantic_bindingdb-0.2.7}/src/scigantic_bindingdb/measurements.py +0 -0
  18. {scigantic_bindingdb-0.2.5 → scigantic_bindingdb-0.2.7}/src/scigantic_bindingdb/py.typed +0 -0
  19. {scigantic_bindingdb-0.2.5 → scigantic_bindingdb-0.2.7}/src/scigantic_bindingdb/releases.py +0 -0
  20. {scigantic_bindingdb-0.2.5 → scigantic_bindingdb-0.2.7}/src/scigantic_bindingdb.egg-info/dependency_links.txt +0 -0
  21. {scigantic_bindingdb-0.2.5 → scigantic_bindingdb-0.2.7}/src/scigantic_bindingdb.egg-info/entry_points.txt +0 -0
  22. {scigantic_bindingdb-0.2.5 → scigantic_bindingdb-0.2.7}/src/scigantic_bindingdb.egg-info/requires.txt +0 -0
  23. {scigantic_bindingdb-0.2.5 → scigantic_bindingdb-0.2.7}/src/scigantic_bindingdb.egg-info/top_level.txt +0 -0
  24. {scigantic_bindingdb-0.2.5 → scigantic_bindingdb-0.2.7}/tests/test_cache.py +0 -0
  25. {scigantic_bindingdb-0.2.5 → scigantic_bindingdb-0.2.7}/tests/test_chembl_bridge.py +0 -0
  26. {scigantic_bindingdb-0.2.5 → scigantic_bindingdb-0.2.7}/tests/test_cli.py +0 -0
  27. {scigantic_bindingdb-0.2.5 → scigantic_bindingdb-0.2.7}/tests/test_connection.py +0 -0
  28. {scigantic_bindingdb-0.2.5 → scigantic_bindingdb-0.2.7}/tests/test_dti_pairs.py +0 -0
  29. {scigantic_bindingdb-0.2.5 → scigantic_bindingdb-0.2.7}/tests/test_measurements.py +0 -0
  30. {scigantic_bindingdb-0.2.5 → scigantic_bindingdb-0.2.7}/tests/test_releases.py +0 -0
@@ -1,12 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scigantic-bindingdb
3
- Version: 0.2.5
3
+ Version: 0.2.7
4
4
  Summary: Query BindingDB directly from a public S3 mirror with DuckDB, including a ChEMBL cross-reference bridge table and a ready drug-target-interaction training table.
5
5
  Author: Scigantic
6
6
  License: MIT-0
7
7
  Project-URL: Homepage, https://scigantic.com
8
8
  Project-URL: Repository, https://github.com/Scigantic/scigantic-bindingdb
9
9
  Project-URL: Issues, https://github.com/Scigantic/scigantic-bindingdb/issues
10
+ Project-URL: Documentation, https://github.com/Scigantic/scigantic-bindingdb#readme
10
11
  Keywords: bindingdb,cheminformatics,duckdb,drug-discovery,binding-affinity
11
12
  Classifier: License :: OSI Approved :: MIT No Attribution License (MIT-0)
12
13
  Classifier: Programming Language :: Python :: 3
@@ -18,6 +19,9 @@ Classifier: Programming Language :: Python :: 3.14
18
19
  Classifier: Typing :: Typed
19
20
  Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
20
21
  Classifier: Topic :: Scientific/Engineering :: Chemistry
22
+ Classifier: Development Status :: 4 - Beta
23
+ Classifier: Intended Audience :: Science/Research
24
+ Classifier: Topic :: Database
21
25
  Requires-Python: >=3.10
22
26
  Description-Content-Type: text/markdown
23
27
  License-File: LICENSE
@@ -45,6 +49,10 @@ Dynamic: license-file
45
49
 
46
50
  Query BindingDB directly from a public S3 mirror with DuckDB.
47
51
 
52
+ Browse more open scientific datasets in the [Scigantic catalog](https://scigantic.com).
53
+
54
+ ## Quickstart
55
+
48
56
  ```python
49
57
  import scigantic_bindingdb as bindingdb
50
58
 
@@ -13,6 +13,10 @@
13
13
 
14
14
  Query BindingDB directly from a public S3 mirror with DuckDB.
15
15
 
16
+ Browse more open scientific datasets in the [Scigantic catalog](https://scigantic.com).
17
+
18
+ ## Quickstart
19
+
16
20
  ```python
17
21
  import scigantic_bindingdb as bindingdb
18
22
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "scigantic-bindingdb"
7
- version = "0.2.5"
7
+ version = "0.2.7"
8
8
  description = "Query BindingDB directly from a public S3 mirror with DuckDB, including a ChEMBL cross-reference bridge table and a ready drug-target-interaction training table."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -22,6 +22,9 @@ classifiers = [
22
22
  "Typing :: Typed",
23
23
  "Topic :: Scientific/Engineering :: Bio-Informatics",
24
24
  "Topic :: Scientific/Engineering :: Chemistry",
25
+ "Development Status :: 4 - Beta",
26
+ "Intended Audience :: Science/Research",
27
+ "Topic :: Database",
25
28
  ]
26
29
 
27
30
  dependencies = [
@@ -36,6 +39,7 @@ dev = ["pytest>=7", "pytest-cov>=5", "mypy>=1.10", "pandas-stubs"]
36
39
  Homepage = "https://scigantic.com"
37
40
  Repository = "https://github.com/Scigantic/scigantic-bindingdb"
38
41
  Issues = "https://github.com/Scigantic/scigantic-bindingdb/issues"
42
+ Documentation = "https://github.com/Scigantic/scigantic-bindingdb#readme"
39
43
 
40
44
  [project.scripts]
41
45
  scigantic-bindingdb = "scigantic_bindingdb.cli:main"
@@ -69,7 +69,15 @@ def _get_base_connection(release: str) -> "duckdb.DuckDBPyConnection":
69
69
  # whether that's a real terminal. Surprising output for a
70
70
  # library call in a notebook or script, so it's off here by
71
71
  # default.
72
- new_con.execute("SET enable_progress_bar=false")
72
+ # Inside a Jupyter kernel without ipywidgets, DuckDB (1.5.5) raises
73
+ # InvalidInputException on ANY change to enable_progress_bar, even turning
74
+ # it off ("required package 'ipywidgets' is missing"). Plain Python never
75
+ # hits it; a notebook on an image without ipywidgets fails on the first
76
+ # call. The setting is cosmetic; skip it rather than fail the connection.
77
+ try:
78
+ new_con.execute("SET enable_progress_bar=false")
79
+ except duckdb.Error:
80
+ pass
73
81
  new_con.execute("INSTALL httpfs")
74
82
  new_con.execute("LOAD httpfs")
75
83
  new_con.execute(f"SET s3_region='{REGION}'")
@@ -1,12 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scigantic-bindingdb
3
- Version: 0.2.5
3
+ Version: 0.2.7
4
4
  Summary: Query BindingDB directly from a public S3 mirror with DuckDB, including a ChEMBL cross-reference bridge table and a ready drug-target-interaction training table.
5
5
  Author: Scigantic
6
6
  License: MIT-0
7
7
  Project-URL: Homepage, https://scigantic.com
8
8
  Project-URL: Repository, https://github.com/Scigantic/scigantic-bindingdb
9
9
  Project-URL: Issues, https://github.com/Scigantic/scigantic-bindingdb/issues
10
+ Project-URL: Documentation, https://github.com/Scigantic/scigantic-bindingdb#readme
10
11
  Keywords: bindingdb,cheminformatics,duckdb,drug-discovery,binding-affinity
11
12
  Classifier: License :: OSI Approved :: MIT No Attribution License (MIT-0)
12
13
  Classifier: Programming Language :: Python :: 3
@@ -18,6 +19,9 @@ Classifier: Programming Language :: Python :: 3.14
18
19
  Classifier: Typing :: Typed
19
20
  Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
20
21
  Classifier: Topic :: Scientific/Engineering :: Chemistry
22
+ Classifier: Development Status :: 4 - Beta
23
+ Classifier: Intended Audience :: Science/Research
24
+ Classifier: Topic :: Database
21
25
  Requires-Python: >=3.10
22
26
  Description-Content-Type: text/markdown
23
27
  License-File: LICENSE
@@ -45,6 +49,10 @@ Dynamic: license-file
45
49
 
46
50
  Query BindingDB directly from a public S3 mirror with DuckDB.
47
51
 
52
+ Browse more open scientific datasets in the [Scigantic catalog](https://scigantic.com).
53
+
54
+ ## Quickstart
55
+
48
56
  ```python
49
57
  import scigantic_bindingdb as bindingdb
50
58
 
@@ -23,5 +23,6 @@ tests/test_chembl_bridge.py
23
23
  tests/test_cli.py
24
24
  tests/test_connection.py
25
25
  tests/test_dti_pairs.py
26
+ tests/test_jupyter_progress_bar.py
26
27
  tests/test_measurements.py
27
28
  tests/test_releases.py
@@ -0,0 +1,45 @@
1
+ """Regression: DuckDB inside a Jupyter kernel without ipywidgets.
2
+
3
+ DuckDB 1.5.5 detects Jupyter and raises InvalidInputException on any change to
4
+ enable_progress_bar when ipywidgets is absent, even `SET enable_progress_bar=false`.
5
+ The connection setup must survive that. The real condition needs an ipykernel on
6
+ an image without ipywidgets (scigantic's minimal/database images); this test
7
+ reproduces the raise by wrapping duckdb.connect so that one SET fails the way
8
+ DuckDB fails it.
9
+ """
10
+
11
+ from __future__ import annotations
12
+
13
+ import duckdb
14
+ import pytest
15
+
16
+ from scigantic_bindingdb import connection
17
+ from scigantic_bindingdb.connection import connect
18
+
19
+
20
+ class _JupyterLikeConnection:
21
+ def __init__(self, real: duckdb.DuckDBPyConnection) -> None:
22
+ self._real = real
23
+
24
+ def execute(self, sql: str, *a: object, **k: object) -> duckdb.DuckDBPyConnection:
25
+ if "enable_progress_bar" in sql:
26
+ raise duckdb.InvalidInputException(
27
+ "Invalid Input Error: Could not change the progress bar setting because: "
28
+ "'required package 'ipywidgets' is missing, which is needed to render progress bars in Jupyter'"
29
+ )
30
+ return self._real.execute(sql, *a, **k)
31
+
32
+ def __getattr__(self, name: str) -> object:
33
+ return getattr(self._real, name)
34
+
35
+
36
+ def test_connection_survives_jupyter_progress_bar_refusal(monkeypatch: pytest.MonkeyPatch) -> None:
37
+ real_connect = duckdb.connect
38
+ monkeypatch.setattr(duckdb, "connect", lambda *a, **k: _JupyterLikeConnection(real_connect(*a, **k)))
39
+ connection._base_cons.clear() # force a fresh base connection through the patched connect
40
+ con = connect()
41
+ try:
42
+ assert con.execute("SELECT 1").fetchone() == (1,)
43
+ finally:
44
+ con.close()
45
+ connection._base_cons.clear()