-
Notifications
You must be signed in to change notification settings - Fork 72
/
setup.py
127 lines (113 loc) · 3.71 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# Copyright WillianFuks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import sys
from setuptools import setup
here = os.path.abspath(os.path.dirname(__file__))
if sys.argv[-1] == 'test-publish':
"""
Publishes to test pypi repository.
"""
if os.path.exists('dist') or os.path.exists('build'):
raise RuntimeError('Please first delete dist/build folders')
os.system('pip install -U twine')
os.system('sh ./scripts/build_wheels.sh')
os.system('twine upload --repository testpypi dist/*')
# os.system('rm -rf build dist .egg *.egg-info')
sys.exit()
if sys.argv[-1] == 'publish':
"""
Publishes to original pypi repository.
"""
if os.path.exists('dist') or os.path.exists('build'):
raise RuntimeError('Please first delete dist/build folders')
os.system('pip install -U twine')
os.system('sh ./scripts/build_wheels.sh')
os.system('twine upload dist/*')
# os.system('rm -rf build dist .egg *.egg-info')
sys.exit()
install_requires = [
'jinja2',
'pandas >= 1.3.5, <= 2.2',
'tensorflow >= 2.10',
'tensorflow-probability[tf] >= 0.18, <= 0.24',
'matplotlib',
]
tests_require = [
'pytest',
'pytest-cov',
'mock',
'pytest-xdist',
'tox'
]
setup_requires = [
'flake8',
'isort'
]
extras_require = {
'docs': [
'ipython',
'jupyter'
]
}
packages = ['causalimpact']
_version = {}
_version_path = os.path.join(here, 'causalimpact', '__version__.py')
with open(_version_path, 'r') as f:
exec(f.read(), _version)
with open('README.md', 'r') as f:
readme = f.read()
setup(
name='tfcausalimpact',
version=_version['__version__'],
author='Willian Fuks',
author_email='willian.fuks@gmail.com',
url='https://github.com/WillianFuks/tfcausalimpact',
description= "Python version of Google's Causal Impact model on top of Tensorflow Probability.",
long_description=readme,
long_description_content_type='text/markdown',
packages=packages,
include_package_data=True,
install_requires=install_requires,
tests_require=tests_require,
setup_requires=setup_requires,
extras_require=extras_require,
license='Apache License 2.0',
keywords='causal impact',
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: Apache Software License',
'Natural Language :: English',
'Operating System :: POSIX :: Linux',
'Operating System :: MacOS',
'Operating System :: Microsoft :: Windows',
'Programming Language :: Python :: 3.7',
'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',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Scientific/Engineering',
],
project_urls={
'Source': 'https://github.com/WillianFuks/tfcausalimpact'
},
python_requires='>=3, <3.13',
test_suite='tests'
)