-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
144 lines (133 loc) · 4.57 KB
/
Copy pathpyproject.toml
File metadata and controls
144 lines (133 loc) · 4.57 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
134
135
136
137
138
139
140
141
142
143
144
[project]
name = "codeanalyzer-python"
version = "1.2.0"
description = "Static analysis for Python — canonical schema v2 (symbol table, call graph, and native CFG/PDG/SDG dataflow) as 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'",
# parso 0.8.5 is the first release shipping the Python 3.14 grammar; older
# resolutions make jedi reject every file in a 3.14 analysis env (#107)
"parso>=0.8.5",
# networkx
"networkx>=2.6.0,<3.2.0; python_version < '3.11'",
"networkx>=3.0.0,<4.0.0; python_version >= '3.11'",
# 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",
# astor: runtime dependency of the vendored Scalpel SSA slice
# (scalpel/SSA/const.py uses astor.to_source). Pure-Python, installs
# everywhere; scalpel pins ~=0.8.1.
"astor>=0.8.1,<0.9.0",
# pyyaml: the entrypoint rules pack (#27) is YAML. Declared explicitly --
# it was previously only reachable as a transitive dep of ray.
"pyyaml>=6.0,<7.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'",
# Real frameworks for the entrypoint-detection integration test (#27) --
# rules.yml `match:` patterns are only meaningful against Jedi's actual
# resolution of the installed package, never a guess at its public API path.
# python_version >= '3.11' only: below that, ray==2.0.0 pins click<=8.0.4,
# which conflicts with celery>=5.3's click>=8.1.2 floor. The integration
# test guards each import with pytest.importorskip, so it just skips on
# older interpreters rather than needing a resolvable pin here.
"flask>=3.0.0,<4.0.0; python_version >= '3.11'",
"fastapi>=0.100.0,<1.0.0; python_version >= '3.11'",
"celery>=5.3.0,<6.0.0; python_version >= '3.11'",
"click>=8.0.0,<9.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"