forked from great-expectations/great_expectations
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
96 lines (84 loc) · 3.09 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import re
from glob import glob
import pkg_resources
from setuptools import find_packages, setup
import versioneer
def get_extras_require():
results = {}
extra_key_mapping = {
"aws_secrets": "boto",
"azure_secrets": "azure",
"gcp": "bigquery",
"s3": "boto",
}
sqla_keys = (
"athena",
"bigquery",
"dremio",
"mssql",
"mysql",
"postgresql",
"redshift",
"snowflake",
"teradata",
)
ignore_keys = ("contrib", "sqlalchemy", "test")
rx_fname_part = re.compile(r"requirements-dev-(.*).txt")
for fname in sorted(glob("requirements-dev-*.txt")):
key = rx_fname_part.match(fname).group(1)
if key in ignore_keys:
continue
with open(fname) as f:
parsed = [str(req) for req in pkg_resources.parse_requirements(f)]
results[key] = parsed
lite = results.pop("lite")
results["boto"] = [req for req in lite if req.startswith("boto")]
results["sqlalchemy"] = [req for req in lite if req.startswith("sqlalchemy")]
for new_key, existing_key in extra_key_mapping.items():
results[new_key] = results[existing_key]
for key in sqla_keys:
results[key] += results["sqlalchemy"]
results.pop("boto")
return results
# Parse requirements.txt
with open("requirements.txt") as f:
required = f.read().splitlines()
# try:
# import pypandoc
# long_description = pypandoc.convert_file('README.md', 'rst')
# except (IOError, ImportError):
long_description = "Always know what to expect from your data. (See https://github.com/great-expectations/great_expectations for full description)."
config = {
"description": "Always know what to expect from your data.",
"author": "The Great Expectations Team",
"url": "https://github.com/great-expectations/great_expectations",
"author_email": "[email protected]",
"version": versioneer.get_version(),
"cmdclass": versioneer.get_cmdclass(),
"install_requires": required,
"extras_require": get_extras_require(),
"packages": find_packages(exclude=["contrib*", "docs*", "tests*", "examples*"]),
"entry_points": {
"console_scripts": ["great_expectations=great_expectations.cli:main"]
},
"name": "great_expectations",
"long_description": long_description,
"license": "Apache-2.0",
"keywords": "data science testing pipeline data quality dataquality validation datavalidation",
"include_package_data": True,
"classifiers": [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Intended Audience :: Other Audience",
"Topic :: Scientific/Engineering",
"Topic :: Software Development",
"Topic :: Software Development :: Testing",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
],
}
setup(**config)