From 9c03f19d1f9ab9bba858d119becf549f2c934667 Mon Sep 17 00:00:00 2001 From: Cedric Bouysset Date: Thu, 21 Mar 2024 11:40:49 +0000 Subject: [PATCH 1/2] fix: IPython as an optional dependency --- CHANGELOG.md | 5 +++++ bokehmol/utils.py | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a9512d..5289874 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 --- +### Changed + +- Made `IPython` an optional dependency (in case one only wants to save the HTML file instead of + displaying it in a notebook) + ## [0.1.0] - 2023/07/21 ### Added diff --git a/bokehmol/utils.py b/bokehmol/utils.py index 43cae74..140492f 100644 --- a/bokehmol/utils.py +++ b/bokehmol/utils.py @@ -6,7 +6,6 @@ from bokeh.models import Model from bokeh.plotting import save from bokeh.resources import Resources -from IPython.display import HTML from bokehmol.config import settings @@ -55,6 +54,8 @@ def show(plot): and display the content using an `IPython.display.HTML` object. Works on Windows too... """ + from IPython.display import HTML + try: # save plot to tempfile, delete=False for Windows with NamedTemporaryFile("w", suffix=".html", delete=False) as tf: From 5829afc43f59aca43fec967016c27fe22864a96d Mon Sep 17 00:00:00 2001 From: Cedric Bouysset Date: Thu, 21 Mar 2024 11:44:16 +0000 Subject: [PATCH 2/2] chore: bump changelog and versions --- CHANGELOG.md | 4 ++++ bokehmol/_version.py | 2 +- package.json | 3 +-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5289874..9a62d7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,11 +8,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 --- +## [0.1.1] - 2024/03/21 + ### Changed - Made `IPython` an optional dependency (in case one only wants to save the HTML file instead of displaying it in a notebook) +--- + ## [0.1.0] - 2023/07/21 ### Added diff --git a/bokehmol/_version.py b/bokehmol/_version.py index 3dc1f76..485f44a 100644 --- a/bokehmol/_version.py +++ b/bokehmol/_version.py @@ -1 +1 @@ -__version__ = "0.1.0" +__version__ = "0.1.1" diff --git a/package.json b/package.json index 431d691..1238b3d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bokehmol", - "version": "0.1.0", + "version": "0.1.1", "description": "Handle molecules with bokeh", "homepage": "https://github.com/cbouy/bokehmol", "bugs": { @@ -25,7 +25,6 @@ "dist/**/*.map", "dist/**/*.js", "dist/**/*.d.ts" - ], "main": "dist/bokehmol.min.js", "types": "dist/lib/index.d.ts",