forked from tdda/tdda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
70 lines (65 loc) · 2.39 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import os
from setuptools import setup, find_packages
# version import is from tdda subdirectory here, not from some other install.
from tdda.version import version as __version__
def read(fname):
# read contents of file
return open(os.path.join(os.path.dirname(__file__), fname)).read()
def data(path, pathitems, exclusions=None):
# build list of additional files to package up from a subdirectory
names = []
for relpath in pathitems:
subpath = path + [relpath]
dirname = os.path.join(*subpath)
for name in os.listdir(dirname):
if exclusions and name in exclusions:
continue
pathname = os.path.join(relpath, name)
fullpathname = os.path.join(dirname, name)
if os.path.isdir(fullpathname):
names.extend(data(path, [pathname]))
else:
names.append(pathname)
return names
setup(
name='tdda',
version=__version__,
description='Test Driven Data Analysis',
long_description=read('README.md'),
author='Stochastic Solutions Limited',
author_email='[email protected]',
license='MIT',
url='http://www.stochasticsolutions.com',
download_url='https://github.com/tdda/tdda',
keywords='tdda constraint referencetest rexpy',
packages=find_packages(),
package_data={
'tdda.referencetest': data(['tdda', 'referencetest'], ['examples']),
'tdda.referencetest.tests': data(['tdda', 'referencetest', 'tests'],
['testdata']),
'tdda.constraints': data(['tdda', 'constraints'],
['testdata', 'examples'],
exclusions=['accounts1k.csv',
'accounts25k.csv'])
+ ['tdda_json_file_format.md'],
'tdda.rexpy': data(['tdda', 'rexpy'], ['examples']),
'tdda.gentest': data(['tdda', 'gentest'], ['examples']),
'tdda': ['README.md', 'LICENSE.txt'],
},
entry_points = {
'console_scripts': [
'tdda = tdda.constraints.console:main',
'rexpy = tdda.rexpy.rexpy:main',
],
},
zip_safe=False,
install_requires=[
'numpy>=1.20.3',
'pandas>=1.5.2',
'pyarrow >= 15.0',
'pyyaml >= 6.0',
'pytest',
'chardet >= 5.2',
'rich >= 13.3',
],
)