-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
111 lines (96 loc) · 2.41 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
import distutils
import io
import os
import subprocess
from setuptools import setup
class PylintCommand(distutils.cmd.Command):
'''A custom command to run Pylint to check for errors on all source files'''
# Required to implement
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
command = ['pylint']
command.append(f'--rcfile={os.path.abspath(".pylintrc")}')
command.append('ane_research')
self.announce(f'Running command: {command}', level=distutils.log.INFO)
subprocess.check_call(command)
# Package meta-data
NAME = 'attention-is-not-explanation-fact-ai'
DESCRIPTION = 'UVA FACT-AI Course Project - Attention is Not Explanation'
URL = 'https://github.com/michaeljneely/fact-ai-2020'
EMAIL = 'michael.neely@student.uva.nl'
AUTHOR = 'Michael J. Neely, Stefan F. Schouten'
REQUIRES_PYTHON = '~=3.7.0'
VERSION = '0.0.1'
REQUIRED = [
'pandas',
'nltk',
'tqdm',
'numpy',
'allennlp==0.9.0',
'scipy',
'seaborn',
'gensim',
'spacy==2.1.9',
'matplotlib',
'ipython',
'scikit_learn',
'entmax',
'requests',
'python-json-logger'
]
SETUP = [
'pytest-runner',
'torch',
'torchtext'
]
TEST = [
'pylint',
'pytest',
'pytest-env',
'pytest-pylint'
]
EXTRAS = {
'testing': TEST
}
HERE = os.path.abspath(os.path.dirname(__file__))
# Import the README and use it as the long-description
try:
with io.open(os.path.join(HERE, 'README.md'), encoding='utf-8') as f:
LONG_DESCRIPTION = '\n' + f.read()
except FileNotFoundError:
LONG_DESCRIPTION = DESCRIPTION
setup(
name=NAME,
version=VERSION,
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
long_description_content_type='text/markdown',
author=AUTHOR,
author_email=EMAIL,
python_requires=REQUIRES_PYTHON,
url=URL,
py_modules=['ane_research'],
install_requires=REQUIRED,
setup_requires=SETUP,
tests_require=TEST,
extras_require=EXTRAS,
include_package_data=True,
license='MIT',
cmdclass={
'lint': PylintCommand
},
classifiers=[
# Trove classifiers
# Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers
'License :: Other/Proprietary License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy'
]
)