forked from HazyResearch/metal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
72 lines (60 loc) · 2.15 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
import os
import re
import setuptools
class CleanCommand(setuptools.Command):
"""Custom clean command to tidy up the project root."""
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
os.system("rm -vrf ./build ./dist ./*.pyc ./*.tgz ./*.egg-info")
directory = os.path.dirname(os.path.abspath(__file__))
# Extract version information
path = os.path.join(directory, "metal", "__init__.py")
with open(path) as read_file:
text = read_file.read()
pattern = re.compile(r"^__version__ = ['\"]([^'\"]*)['\"]", re.MULTILINE)
version = pattern.search(text).group(1)
# Extract long_description
path = os.path.join(directory, "README.md")
with open(path) as read_file:
long_description = read_file.read()
setuptools.setup(
name="snorkel-metal",
version=version,
url="https://github.com/HazyResearch/metal",
description="A system for quickly generating training data with multi-task weak supervision",
long_description_content_type="text/markdown",
long_description=long_description,
license="Apache License 2.0",
packages=setuptools.find_packages(),
python_requires=">=3.6",
install_requires=[
"networkx>=2.2",
"numpy",
"pandas",
"torch>=1.0",
"scipy",
"tqdm",
"scikit-learn",
],
include_package_data=True,
keywords="machine-learning ai information-extraction weak-supervision mtl multitask multi-task-learning",
classifiers=[
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Information Analysis",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
],
project_urls={ # Optional
"Homepage": "https://hazyresearch.github.io/snorkel/",
"Source": "https://github.com/HazyResearch/metal/",
"Bug Reports": "https://github.com/HazyResearch/metal/issues",
"Citation": "https://arxiv.org/abs/1810.02840",
},
cmdclass={"clean": CleanCommand},
)