Passed
Push — master ( 801604...3d3de8 )
by Simon
01:39
created

setup.find_version()   A

Complexity

Conditions 3

Size

Total Lines 9
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 9
rs 10
c 0
b 0
f 0
cc 3
nop 1
1
import os
2
import re
3
4
from setuptools import setup
5
from setuptools import find_packages
6
7
with open("README.md", "r") as fh:
8
    long_description = fh.read()
9
10
requires = ["numpy", "pandas", "tqdm"]
11
12
13
def find_version(*filepath):
14
    here = os.path.abspath(os.path.dirname(__file__))
15
    with open(os.path.join(here, *filepath)) as fp:
16
        version_match = re.search(
17
            r"^__version__ = ['\"]([^'\"]*)['\"]", fp.read(), re.M
18
        )
19
        if version_match:
20
            return version_match.group(1)
21
        raise RuntimeError("Unable to find version string.")
22
23
24
setup(
25
    name="hyperactive",
26
    version=find_version("hyperactive/__init__.py"),
27
    author="Simon Blanke",
28
    author_email="[email protected]",
29
    license="MIT",
30
    description="A hyperparameter optimization toolbox for convenient and fast prototyping",
31
    long_description=long_description,
32
    long_description_content_type="text/markdown",
33
    keywords=["machine learning", "deep learning", "optimization", "data-science"],
34
    url="https://github.com/SimonBlanke/hyperactive",
35
    packages=find_packages(),
36
    classifiers=[
37
        "Programming Language :: Python :: 3",
38
        "Programming Language :: Python :: 3.5",
39
        "Programming Language :: Python :: 3.6",
40
        "Programming Language :: Python :: 3.7",
41
        "License :: OSI Approved :: MIT License",
42
        "Operating System :: OS Independent",
43
        "Topic :: Scientific/Engineering :: Artificial Intelligence",
44
        "Topic :: Scientific/Engineering :: Information Analysis",
45
        "Topic :: Scientific/Engineering :: Mathematics",
46
        "Topic :: Software Development :: Libraries :: Python Modules",
47
        "Intended Audience :: Developers",
48
        "Intended Audience :: Information Technology",
49
        "Intended Audience :: Science/Research",
50
    ],
51
    install_requires=requires,
52
)
53