code-analyser 1.0.3__tar.gz → 1.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {code_analyser-1.0.3 → code_analyser-1.1.0}/PKG-INFO +1 -1
- {code_analyser-1.0.3 → code_analyser-1.1.0}/pyproject.toml +1 -1
- {code_analyser-1.0.3 → code_analyser-1.1.0}/src/code_analyser/__init__.py +2 -1
- {code_analyser-1.0.3 → code_analyser-1.1.0}/src/code_analyser/api.py +6 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/src/code_analyser/cli.py +6 -0
- code_analyser-1.1.0/src/code_analyser/manifest.py +22 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/uv.lock +1 -1
- {code_analyser-1.0.3 → code_analyser-1.1.0}/.dockerignore +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/.env.example +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/.gitignore +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/LICENSE +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/README.md +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/docs/superpowers/plans/2026-05-06-code-analyser-rewrite.md +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/docs/superpowers/specs/2026-05-05-code-analyser-design.md +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/src/code_analyser/core/__init__.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/src/code_analyser/core/css_.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/src/code_analyser/core/html_.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/src/code_analyser/core/javascript_.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/src/code_analyser/core/notebook_.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/src/code_analyser/core/python_.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/src/code_analyser/core/sql_.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/src/code_analyser/core/typescript_.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/src/code_analyser/detect.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/src/code_analyser/llm.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/src/code_analyser/models.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/src/code_analyser/pipeline.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/src/code_analyser/settings.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/tests/__init__.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/tests/api/__init__.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/tests/api/test_api.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/tests/cli/__init__.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/tests/cli/test_cli.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/tests/conftest.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/tests/integration/__init__.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/tests/integration/test_full_pipeline.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/tests/integration/test_pipeline.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/tests/test_invariants.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/tests/unit/__init__.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/tests/unit/test_css_.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/tests/unit/test_detect.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/tests/unit/test_html_.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/tests/unit/test_javascript_.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/tests/unit/test_llm.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/tests/unit/test_models.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/tests/unit/test_notebook_.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/tests/unit/test_python_.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/tests/unit/test_scaffold.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/tests/unit/test_sql_.py +0 -0
- {code_analyser-1.0.3 → code_analyser-1.1.0}/tests/unit/test_typescript_.py +0 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
from importlib.metadata import version as _v
|
|
2
2
|
|
|
3
|
+
from .manifest import MANIFEST
|
|
3
4
|
from .models import CodeAnalysis
|
|
4
5
|
from .pipeline import CodeAnalyser
|
|
5
6
|
|
|
6
7
|
__version__ = _v("code-analyser")
|
|
7
8
|
del _v
|
|
8
9
|
|
|
9
|
-
__all__ = ["CodeAnalyser", "CodeAnalysis"]
|
|
10
|
+
__all__ = ["CodeAnalyser", "CodeAnalysis", "MANIFEST"]
|
|
@@ -6,6 +6,7 @@ from pathlib import Path
|
|
|
6
6
|
from importlib.metadata import version
|
|
7
7
|
from fastapi import FastAPI, File, HTTPException, UploadFile
|
|
8
8
|
|
|
9
|
+
from .manifest import MANIFEST
|
|
9
10
|
from .models import CodeAnalysis
|
|
10
11
|
from .pipeline import CodeAnalyser
|
|
11
12
|
|
|
@@ -25,6 +26,11 @@ def health() -> dict:
|
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
|
|
29
|
+
@app.get("/manifest")
|
|
30
|
+
def manifest() -> dict:
|
|
31
|
+
return MANIFEST
|
|
32
|
+
|
|
33
|
+
|
|
28
34
|
@app.post("/analyse", response_model=CodeAnalysis)
|
|
29
35
|
async def analyse(file: UploadFile = File(...)) -> CodeAnalysis:
|
|
30
36
|
content = await file.read()
|
|
@@ -12,6 +12,12 @@ def main() -> None:
|
|
|
12
12
|
_serve(sys.argv[2:])
|
|
13
13
|
return
|
|
14
14
|
|
|
15
|
+
if len(sys.argv) > 1 and sys.argv[1] == "manifest":
|
|
16
|
+
import json
|
|
17
|
+
from .manifest import MANIFEST
|
|
18
|
+
print(json.dumps(MANIFEST, indent=2))
|
|
19
|
+
return
|
|
20
|
+
|
|
15
21
|
parser = argparse.ArgumentParser(
|
|
16
22
|
prog="code-analyser",
|
|
17
23
|
description="Source code signals analyser",
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"""Capability manifest for the lens family (consumed by auto-analyser)."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def _version() -> str:
|
|
8
|
+
try:
|
|
9
|
+
return version("code-analyser")
|
|
10
|
+
except PackageNotFoundError:
|
|
11
|
+
return "0.0.0"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
MANIFEST: dict = {
|
|
15
|
+
"name": "code-analyser",
|
|
16
|
+
"version": _version(),
|
|
17
|
+
"role": "analyser",
|
|
18
|
+
"accepts": ["code"],
|
|
19
|
+
"extensions": [".py", ".js", ".ts", ".tsx", ".jsx", ".html", ".css", ".scss", ".sql", ".ipynb"],
|
|
20
|
+
"auto_routable": True,
|
|
21
|
+
"produces": "CodeAnalysis",
|
|
22
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|