-
-
Notifications
You must be signed in to change notification settings - Fork 66
/
setup.py
142 lines (123 loc) · 4.21 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# type: ignore
import importlib.util
import pathlib
import setuptools
import typing
KEYWORDS = [
"controlled vocabulary",
"cugraph",
"deep learning",
"embedding",
"gpu",
"graph algorithms",
"igraph",
"inference",
"interactive visualization",
"json-ld",
"knowledge graph",
"managing namespaces",
"morph-kgc",
"n3",
"networkx",
"owl",
"pandas",
"parquet",
"probabilistic soft logic",
"psl",
"pyvis",
"rapids",
"rdf",
"rml",
"roam research",
"serialization",
"shacl",
"skos",
"sparql",
"statistical relational learning",
"topology",
"turtle",
"validation",
]
def parse_requirements_file (
filename: str,
) -> typing.List[ str ]:
"""read and parse a Python `requirements.txt` file, returning as a list of strings"""
with pathlib.Path(filename).open() as f:
results: list = [
l.strip().replace(" ", "").split("#")[0]
for l in f.readlines()
]
return results
with_zarr_extras = {
'with_zarr': ['simplejson>=3.5.3']
}
if __name__ == "__main__":
spec = importlib.util.spec_from_file_location("kglab.version", "kglab/version.py")
kglab_version = importlib.util.module_from_spec(spec)
spec.loader.exec_module(kglab_version)
kglab_version._check_version() # pylint: disable=W0212
base_packages = parse_requirements_file("requirements.txt")
docs_packages = parse_requirements_file("requirements-dev.txt")
tut_packages = parse_requirements_file("requirements-tut.txt")
setuptools.setup(
name = "kglab",
version = kglab_version.__version__,
license = "MIT",
description = "A simple abstraction layer in Python for building knowledge graphs",
long_description = pathlib.Path("README.md").read_text(),
long_description_content_type = "text/markdown",
python_requires = ">=" + kglab_version._versify(kglab_version.MIN_PY_VERSION), # pylint: disable=W0212
zip_safe = False,
packages = setuptools.find_packages(
exclude = [
"dat",
"docs",
"examples",
"scripts",
"tests",
]),
install_requires = base_packages,
extras_require = {
"base": base_packages,
"docs": docs_packages,
"tutorial": tut_packages,
"with-zarr": ["zarr>=2.13.3"]
},
author = "Paco Nathan",
author_email = "[email protected]",
keywords = ", ".join(KEYWORDS),
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Operating System :: OS Independent",
"License :: OSI Approved :: MIT License",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Human Machine Interfaces",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Text Processing :: Indexing",
],
url = "https://derwen.ai/docs/kgl/",
project_urls = {
"DOI": "https://doi.org/10.5281/zenodo.6360664",
"Discussions": "https://www.linkedin.com/groups/6725785/",
"DockerHub": "https://hub.docker.com/r/derwenai/kglab",
"Tutorial": "https://derwen.ai/docs/kgl/tutorial/",
"Issues": "https://github.com/DerwenAI/kglab/issues",
"Source": "https://github.com/DerwenAI/kglab",
},
entry_points = {
"rdf.plugins.store": [
"kglab = kglab:PropertyStore",
],
},
)