-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
48 lines (41 loc) · 1.56 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
from setuptools import setup, find_packages
from typing import List
with open("README.md", "r", encoding="utf-8") as f:
long_description = f.read()
# Declaring variables for setup functions
PROJECT_NAME = "src"
VERSION = "0.0.2"
AUTHOR = "Hasanain"
USER_NAME = "hassi34"
AUTHOR_EMAIL = "hasanain@aicaliber.com"
REPO_NAME = "aps-fault-detection"
DESRCIPTION = "This project contains the production ready Machine Learning solution to make the prediction on the batch of data coming from Air Pressure system (APS) sensors"
REQUIREMENT_FILE_NAME = "requirements.txt"
LICENSE = "MIT"
PYTHON_REQUIRES = ">=3.7"
HYPHEN_E_DOT = "-e ."
def get_requirements_list() -> List[str]:
"""
Description: This function is going to return list of requirement
mention in requirements.txt file
return This function is going to return a list which contain name
of libraries mentioned in requirements.txt file
"""
with open(REQUIREMENT_FILE_NAME) as requirement_file:
requirement_list = requirement_file.readlines()
requirement_list = [requirement_name.replace("\n", "") for requirement_name in requirement_list]
if HYPHEN_E_DOT in requirement_list:
requirement_list.remove(HYPHEN_E_DOT)
return requirement_list
setup(
name=PROJECT_NAME,
version=VERSION,
author=AUTHOR,
description=DESRCIPTION,
long_description=long_description,
url=f"https://github.com/{USER_NAME}/{REPO_NAME}",
packages=find_packages(),
license=LICENSE,
python_requires=PYTHON_REQUIRES,
install_requires=get_requirements_list()
)