Skip to content

Commit acc1395

Browse files
committed
Fix the issue in dependencies #46
1 parent e11d766 commit acc1395

File tree

3 files changed

+44
-25
lines changed

3 files changed

+44
-25
lines changed

deeptables/eda/utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@
44
55
"""
66

7-
import numpy as np
8-
import pandas as pd
97
import itertools
8+
9+
import numpy as np
1010
import seaborn as sns
1111
from matplotlib import pyplot as plt
12-
from matplotlib_venn import venn2
13-
1412

1513

1614
def columns_info(dataframe, topN=10):
@@ -99,6 +97,8 @@ def hist_continuous(df, continuous_features, bins=30, df2=None):
9997

10098

10199
def venn_diagram(train, test, category_features, names=('train', 'test'), figsize=(18, 13)):
100+
from matplotlib_venn import venn2
101+
102102
"""
103103
category_features: max==6
104104
"""

requirements.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ pandas>=0.25.3
33
tensorflow>=2.0.0
44
scikit-learn>=0.20.3
55
numpy>=1.17.4
6-
catboost==0.20.2
6+
catboost>=0.20.2
77
lightgbm>=2.3.0
88
scikit-optimize==0.7.1
9-
tables==3.6.1
10-
category_encoders==2.1.0
11-
hypernets>=0.1.2
12-
h5py==2.10.0
9+
tables>=3.6.1
10+
category_encoders>=2.1.0
11+
hypernets>=0.1.5
12+
h5py>=2.10.0
1313
eli5

setup.py

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,42 @@
55
from setuptools import find_packages
66
from setuptools import setup
77

8-
version = '0.1.12'
98

10-
requirements = [
11-
'scipy>=1.3.1',
12-
'pandas>=0.25.3',
13-
'scikit-learn>=0.20.3',
14-
'tensorflow>=2.0.0',
15-
'numpy>=1.17.4',
16-
'catboost==0.20.2',
17-
'lightgbm>=2.3.0',
18-
'scikit-optimize==0.7.1',
19-
'category_encoders==2.1.0',
20-
'tables==3.6.1',
21-
'hypernets>=0.1.2',
22-
'h5py==2.10.0',
23-
'eli5',
24-
]
9+
def read_requirements(file_path='requirements.txt'):
10+
import os
11+
12+
if not os.path.exists(file_path):
13+
return []
14+
15+
with open(file_path, 'r')as f:
16+
lines = f.readlines()
17+
18+
lines = [x.strip('\n').strip(' ') for x in lines]
19+
lines = list(filter(lambda x: len(x) > 0 and not x.startswith('#'), lines))
20+
21+
return lines
22+
23+
24+
def read_extra_requirements():
25+
import glob
26+
import re
27+
28+
extra = {}
29+
30+
for file_name in glob.glob('requirements-*.txt'):
31+
key = re.search('requirements-(.+).txt', file_name).group(1)
32+
req = read_requirements(file_name)
33+
if req:
34+
extra[key] = req
35+
36+
if extra and 'all' not in extra.keys():
37+
extra['all'] = sorted({v for req in extra.values() for v in req})
38+
39+
return extra
40+
41+
42+
version = '0.1.12'
43+
requirements = read_requirements()
2544

2645
MIN_PYTHON_VERSION = '>=3.6.*'
2746

0 commit comments

Comments
 (0)