This repository was archived by the owner on Aug 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
73 lines (53 loc) · 1.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
import os
from setuptools import find_packages
from setuptools import setup
from typing import Dict
from typing import List
def get_version() -> str:
version_filepath = os.path.join(os.path.dirname(__file__), "optdash", "version.py")
with open(version_filepath) as f:
for line in f:
if line.startswith("__version__"):
return line.strip().split()[-1][1:-1]
assert False
def get_long_description() -> str:
readme_filepath = os.path.join(os.path.dirname(__file__), "README.md")
with open(readme_filepath) as f:
return f.read()
def get_install_requires() -> List[str]:
return [
"optuna",
"sklearn", # For parameter importance.
"sqlalchemy",
]
def get_tests_require() -> List[str]:
return get_extras_require()["test"]
def get_extras_require() -> Dict[str, List[str]]:
requirements: Dict[str, List[str]] = {
"checking": ["black", "mypy", "flake8"],
"doc": ["sphinx", "sphinx_rtd_theme"],
"mysql": [],
"postgres": [],
"test": ["pytest", "pytest-dependency"],
}
return requirements
setup(
name="optdash",
version=get_version(),
description="A third-party dashboard for optuna.",
long_description=get_long_description(),
long_description_content_type="text/markdown",
author="Yusuke Tsuzuku",
author_email="[email protected]",
url="",
packages=find_packages(),
install_requires=get_install_requires(),
tests_require=get_tests_require(),
extras_require=get_extras_require(),
package_data={"optdash": ["*/public/*"]},
entry_points={
"console_scripts": [
"optdash = optdash.server:main",
],
},
)