/
pyproject.toml
133 lines (117 loc) · 3.18 KB
/
pyproject.toml
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
[tool.pdm]
[tool.pdm.scripts.test]
shell = """
pdm update -dG dev
pytest tests/unit/
"""
[tool.pdm.scripts.lint]
shell = """
pdm update -dG lint
flake8 --max-line-length=84 ng_nx tests
isort --check ng_nx tests --diff
black --line-length 84 --check ng_nx tests --diff
"""
[tool.pdm.scripts.format]
shell = """
pdm update -dG lint
isort ng_nx tests
black --line-length 84 ng_nx tests
"""
[tool.pdm.scripts.dockerup]
shell = """
docker-compose -f 'tests/integration/setup/docker-compose.yaml' up -d --remove-orphans
echo "Waiting for NebulaGraph to start..."
sleep 5
for i in {1..50}; do docker-compose -f 'tests/integration/setup/docker-compose.yaml' ps | grep "unhealthy\\|starting" | wc -l | grep -q 0 && break; echo Waiting for another 5 sec; sleep 5; done
echo "NebulaGraph is up and running, removing console container"
docker-compose -f 'tests/integration/setup/docker-compose.yaml' stop console
docker-compose -f 'tests/integration/setup/docker-compose.yaml' rm -f console
docker-compose -f 'tests/integration/setup/docker-compose.yaml' ps
"""
[tool.pdm.scripts.dockerstatus]
shell = """
docker-compose -f 'tests/integration/setup/docker-compose.yaml' ps
"""
[tool.pdm.scripts.dockerdown]
shell = """
docker-compose -f 'tests/integration/setup/docker-compose.yaml' down
"""
[tool.pdm.scripts.int-test]
shell = """
pdm update -dG dev
pdm run dockerup
echo "Run integration tests"
pytest tests/integration/
"""
[tool.black]
line-length = 84
exclude = '''
/(
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
'''
[tool.isort]
profile = "black"
atomic = true
skip_glob = ["*/setup.py"]
filter_files = true
[project]
name = "ng_nx"
version = "0.1.9"
description = "NebulaGraph NetowrkX adaptor"
authors = [
{name = "Wey Gu", email = "weyl.gu@gmail.com"},
]
# only numpy==1.21.6, scipy==1.7.3 could work on m1 mac, yet work on py37
# ng_ai need to work with pyspark 2.4.x, which only support py37
dependencies = [
"networkx>=2.5.1",
"nebula3-python>=3.4.0",
"pandas>=1.3.5",
"numpy>=1.21.6",
"scipy>=1.7.3",
"python-louvain>=0.16",
]
requires-python = ">=3.7.1"
readme = "README.md"
license = {text = "Apache-2.0"}
classifiers = [
"Topic :: Software Development :: Build Tools",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
]
[project.urls]
Homepage = "https://github.com/wey-gu/nebulagraph-nx"
Repository = "https://github.com/wey-gu/nebulagraph-nx"
Documentation = "https://github.com/wey-gu/nebulagraph-nx#documentation"
Changelog = "https://github.com/wey-gu/nebulagraph-nx/releases"
[build-system]
requires = ["pdm-pep517>=1.0"]
build-backend = "pdm.pep517.api"
[project.optional-dependencies]
lint = [
"flake8>=4.0.1",
"black[jupyter]>=23.1.0",
"isort>=5.11.5",
]
test = [
"pytest>=7.2.2",
"pytest-mock>=3.10.0",
]
dev = [
"ng_nx[lint,test]",
]