-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
133 lines (122 loc) · 3.72 KB
/
Copy pathpyproject.toml
File metadata and controls
133 lines (122 loc) · 3.72 KB
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
[project]
name = "codeanalyzer-python"
version = "0.2.1"
description = "Static Analysis on Python source code using Jedi, CodeQL and Treesitter — emits analysis.json or a Neo4j property graph."
readme = "README.md"
authors = [
{ name = "Rahul Krishna", email = "i.m.ralk@gmail.com" }
]
requires-python = ">=3.9"
dependencies = [
# jedi
"jedi>=0.18.0,<0.20.0; python_version < '3.11'",
"jedi<=0.19.2; python_version >= '3.11'",
# msgpack
"msgpack>=1.0.0,<1.0.7; python_version < '3.11'",
"msgpack>=1.0.7,<2.0.0; python_version >= '3.11'",
# networkx
"networkx>=2.6.0,<3.2.0; python_version < '3.11'",
"networkx>=3.0.0,<4.0.0; python_version >= '3.11'",
# pandas
"pandas>=1.3.0,<2.0.0; python_version < '3.11'",
"pandas>=2.0.0,<3.0.0; python_version >= '3.11'",
# numpy
"numpy>=1.21.0,<1.24.0; python_version < '3.11'",
"numpy>=1.24.0,<2.0.0; python_version >= '3.11' and python_version < '3.12'",
"numpy>=1.26.0,<2.0.0; python_version >= '3.12'",
# pydantic
"pydantic>=1.8.0,<2.0.0; python_version < '3.11'",
"pydantic>=2.0.0,<3.0.0; python_version >= '3.11'",
# requests
"requests>=2.20.0,<3.0.0; python_version >= '3.11'",
# rich
"rich>=12.6.0,<14.0.0; python_version < '3.11'",
"rich>=14.0.0,<15.0.0; python_version >= '3.11'",
# typer
"typer>=0.9.0,<1.0.0; python_version < '3.11'",
"typer>=0.9.0,<2.0.0; python_version >= '3.11'",
# typing-extensions
"typing-extensions>=4.0.0,<5.0.0; python_version < '3.11'",
"typing-extensions>=4.5.0,<6.0.0; python_version >= '3.11'",
# ray
"ray==2.0.0; python_version < '3.11'",
"ray>=2.10.0,<3.0.0; python_version >= '3.11'",
"packaging>=25.0",
# uv -- installs the analyzed project's deps into the analysis venv quickly.
# Shipped as a self-contained binary in its wheel, so it's available wherever
# canpy is pip-installed (incl. Docker); core.py falls back to pip without it.
"uv>=0.5.0",
]
[project.optional-dependencies]
# The Neo4j Bolt driver is only needed for `--emit neo4j --neo4j-uri ...` (a live
# push). The `graph.cypher` snapshot and `--emit schema` need no extra packages.
neo4j = [
"neo4j>=5.0.0,<6.0.0",
]
[dependency-groups]
test = [
"pytest>=7.0.0,<8.0.0",
"pytest-asyncio>=0.14.0,<0.15.0",
"pytest-cov>=2.10.0,<3.0.0",
"pytest-pspec>=0.0.3",
# Neo4j integration test (opt-in; spins up a real Neo4j via Testcontainers).
"neo4j>=5.0.0,<6.0.0",
"testcontainers[neo4j]>=4.0.0,<5.0.0; python_version >= '3.11'",
]
dev = [
"ipdb>=0.13.0,<0.14.0",
"pre-commit>=2.9.0,<3.0.0"
]
[project.scripts]
canpy = "codeanalyzer.__main__:app"
# Deprecated alias kept for backwards compatibility — warns, then delegates to canpy.
codeanalyzer = "codeanalyzer.__main__:deprecated_main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["codeanalyzer"]
include = ["codeanalyzer/py.typed"]
[tool.hatch.build.targets.sdist]
include = [
"codeanalyzer",
"codeanalyzer/py.typed",
"schema.neo4j.json",
"schema-uml.drawio",
"README.md",
"LICENSE",
"NOTICE"
]
[tool.pytest.ini_options]
addopts = [
"-p", "coverage",
"--cov=codeanalyzer",
"--cov-report=html",
"--cov-report=term-missing",
"--cov-fail-under=40",
"--ignore=test/fixtures"
]
testpaths = ["test"]
[tool.coverage.run]
source = ["codeanalyzer"]
branch = true
omit = [
"*/tests/*",
"*/test_*",
"*/__pycache__/*",
"*/venv/*",
"*/.venv/*",
"codeanalyzer/semantic_analysis/*"
]
[tool.coverage.report]
precision = 2
show_missing = true
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:"
]
[tool.coverage.html]
directory = "htmlcov"