-
Notifications
You must be signed in to change notification settings - Fork 87
/
setup.py
97 lines (81 loc) · 3.11 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
97
import os
import sys
from setuptools import find_packages, setup
from setuptools.command.install import install
PACKAGE_NAME = "hyppo"
DESCRIPTION = "A comprehensive independence testing package"
LONG_DESCRIPTION = """
hyppo (**HYP**othesis Testing in **P**yth**O**n, pronounced "Hippo") is an open-source
software package for multivariate hypothesis testing. We decided to develop hyppo for
the following reasons:
* With the increase in the amount of data in many fields, hypothesis testing for high
dimensional and nonlinear data is important
* Libraries in R exist, but their interfaces are inconsistent and most are not available
in Python
hyppo intends to be a comprehensive multivariate hypothesis testing package and runs on
all major versions of operating systems. It also includes novel tests not found in other
packages. It is quick to install and free of charge. If you need to use multivariate
hypothesis testing, be sure to give hyppo a try!"
"""
AUTHOR = ("Sambit Panda",)
AUTHOR_EMAIL = "spanda3@jhu.edu"
URL = "https://github.com/neurodata/hyppo"
MINIMUM_PYTHON_VERSION = 3, 6 # Minimum of Python 3.6
REQUIRED_PACKAGES = [
"numpy>=1.17",
"scipy>=1.4.0",
"numba>=0.46",
"scikit-learn>=0.19.1",
"autograd>=1.3",
]
# Find mgc version.
PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))
for line in open(os.path.join(PROJECT_PATH, "hyppo", "__init__.py")):
if line.startswith("__version__ = "):
VERSION = line.strip().split()[2][1:-1]
def check_python_version():
"""Exit when the Python version is too low."""
if sys.version_info < MINIMUM_PYTHON_VERSION:
sys.exit("Python {}.{}+ is required.".format(*MINIMUM_PYTHON_VERSION))
check_python_version()
class VerifyVersionCommand(install):
"""Custom command to verify that the git tag matches our version"""
description = "verify that the git tag matches our version"
def run(self):
tag = os.getenv("CIRCLE_TAG")
version = "v{}".format(VERSION)
if tag != version:
info = "Git tag: {0} does not match the version of this app: {1}".format(
tag, version
)
sys.exit(info)
setup(
name=PACKAGE_NAME,
version=VERSION,
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
long_description_content_type="text/markdown",
author=AUTHOR,
author_email=AUTHOR_EMAIL,
install_requires=REQUIRED_PACKAGES,
url=URL,
license="PolyForm Noncommercial License 1.0.0",
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Mathematics",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
],
packages=find_packages(),
include_package_data=True,
test_suite="tests",
cmdclass={
"verify": VerifyVersionCommand,
},
)