-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathsetup.py
88 lines (78 loc) · 2.48 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
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from setuptools import find_packages, setup
"""
Core library deps
Version requirements
* pandas<=2.0.3: Newer versions lead to "AttributeError: module 'pandas.core.arrays.numpy_' has no attribute 'PandasArray'"
* scipy<=1.10.1 and scikit-learn<=1.2.2: Necessary for numerical tests to pass. May be possible to relax these without major issues.
"""
REQUIRES = [
"numpy",
"pandas<=2.0.3",
"ipython",
"scipy<=1.10.1",
"patsy",
"seaborn",
"plotly",
"matplotlib",
"statsmodels",
"scikit-learn<=1.2.2",
"ipfn",
"session-info",
]
# Development deps (e.g. pytest, builds)
# TODO[scubasteve]: Add dev requirements
DEV_REQUIRES = [
"setuptools_scm",
"wheel",
"pytest",
"sphinx",
"notebook",
"nbconvert",
]
DESCRIPTION = (
"balance is a Python package offering a simple workflow and methods for "
"dealing with biased data samples when looking to infer from them to "
"some target population of interest."
)
def setup_package() -> None:
"""Used for building/installing the balance package."""
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setup(
name="balance",
description=DESCRIPTION,
author="Facebook, Inc.",
license="MIT",
url="https://github.com/facebookresearch/balance",
keywords=[""],
long_description=long_description,
long_description_content_type="text/markdown",
python_requires=">=3.9",
install_requires=REQUIRES,
packages=find_packages(include=["balance*"]),
# Include all csv files
package_data={"": ["*.csv"]},
extras_require={
"dev": DEV_REQUIRES,
},
use_scm_version={
"write_to": "version.py",
},
setup_requires=["setuptools_scm"],
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"License :: OSI Approved :: MIT License",
],
)
if __name__ == "__main__":
setup_package()