Skip to content

Commit eb88e65

Browse files
authored
Remove IPython as a dependency (#1331)
1 parent 31159b3 commit eb88e65

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Darts is still in an early development phase, and we cannot always guarantee bac
55

66
## [Unreleased](https://github.com/unit8co/darts/tree/master)
77
- Fixed edge case in ShapExplainer for regression models where covariates series > target series [#1310](https://https://github.com/unit8co/darts/pull/1310) by [Rijk van der Meulen](https://github.com/rijkvandermeulen)
8+
- Removed `IPython` as a dependency. [#1331](https://github.com/unit8co/darts/pull/1331) by [Erik Hasse](https://github.com/erik-hasse)
89

910
[Full Changelog](https://github.com/unit8co/darts/compare/0.22.0...master)
1011

@@ -824,4 +825,4 @@ All implementations of `GlobalForecastingModel`s support multivariate time serie
824825

825826
## Older releases
826827

827-
[Full Changelog](https://github.com/unit8co/darts/compare/f618c4536bf7ed6e3b6a2239fbca4e3089736426...0.2.3)
828+
[Full Changelog](https://github.com/unit8co/darts/compare/f618c4536bf7ed6e3b6a2239fbca4e3089736426...0.2.3)

darts/utils/utils.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,18 @@
1010

1111
import numpy as np
1212
import pandas as pd
13-
from IPython import get_ipython
1413
from joblib import Parallel, delayed
1514
from tqdm import tqdm
1615
from tqdm.notebook import tqdm as tqdm_notebook
1716

1817
from darts import TimeSeries
1918
from darts.logging import get_logger, raise_if, raise_if_not, raise_log
2019

20+
try:
21+
from IPython import get_ipython
22+
except ModuleNotFoundError:
23+
get_ipython = None
24+
2125
logger = get_logger(__name__)
2226

2327

@@ -88,6 +92,8 @@ def _build_tqdm_iterator(iterable, verbose, **kwargs):
8892
"""
8993

9094
def _isnotebook():
95+
if get_ipython is None:
96+
return False
9197
try:
9298
shell = get_ipython().__class__.__name__
9399
if shell == "ZMQInteractiveShell":

requirements/core.txt

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
catboost>=1.0.6
22
holidays>=0.11.1
3-
ipython>=5.0.0
43
joblib>=0.16.0
54
lightgbm>=3.2.0
65
matplotlib>=3.3.0

0 commit comments

Comments
 (0)