codd-dev 1.5.0__tar.gz → 1.5.1__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.
- {codd_dev-1.5.0 → codd_dev-1.5.1}/PKG-INFO +1 -1
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/cli.py +100 -14
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/extractor.py +4 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/measure.py +18 -13
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/templates/codd.yaml.tmpl +2 -2
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/validator.py +35 -1
- {codd_dev-1.5.0 → codd_dev-1.5.1}/pyproject.toml +1 -1
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/build-1.4.2.dist-info/licenses/LICENSE +0 -20
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/certifi-2026.2.25.dist-info/licenses/LICENSE +0 -20
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/cffi-2.0.0.dist-info/licenses/LICENSE +0 -23
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/charset_normalizer-3.4.7.dist-info/licenses/LICENSE +0 -21
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/cryptography-46.0.6.dist-info/licenses/LICENSE +0 -3
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/id-1.6.1.dist-info/licenses/LICENSE +0 -202
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/iniconfig-2.3.0.dist-info/licenses/LICENSE +0 -21
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/jaraco.classes-3.4.0.dist-info/LICENSE +0 -17
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/jaraco_context-6.1.2.dist-info/licenses/LICENSE +0 -18
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/jaraco_functools-4.4.0.dist-info/licenses/LICENSE +0 -18
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/jeepney-0.9.0.dist-info/licenses/LICENSE +0 -21
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/keyring-25.7.0.dist-info/licenses/LICENSE +0 -18
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/markdown_it_py-4.0.0.dist-info/licenses/LICENSE +0 -21
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/mdurl-0.1.2.dist-info/LICENSE +0 -46
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/more_itertools-11.0.1.dist-info/licenses/LICENSE +0 -19
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/nh3-0.3.4.dist-info/licenses/LICENSE +0 -21
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/packaging-26.0.dist-info/licenses/LICENSE +0 -3
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/pip/_vendor/certifi/LICENSE +0 -20
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/pip/_vendor/distro/LICENSE +0 -202
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/pip/_vendor/packaging/LICENSE +0 -3
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/pip/_vendor/pkg_resources/LICENSE +0 -17
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/pip/_vendor/platformdirs/LICENSE +0 -21
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/pip/_vendor/pygments/LICENSE +0 -25
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/LICENSE +0 -21
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/pip/_vendor/requests/LICENSE +0 -175
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/pip/_vendor/resolvelib/LICENSE +0 -13
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/pip/_vendor/rich/LICENSE +0 -19
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/pip/_vendor/tomli/LICENSE +0 -21
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/pip/_vendor/tomli_w/LICENSE +0 -21
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/pip/_vendor/truststore/LICENSE +0 -21
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/certifi/LICENSE +0 -20
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/distro/LICENSE +0 -202
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/packaging/LICENSE +0 -3
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/pkg_resources/LICENSE +0 -17
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/platformdirs/LICENSE +0 -21
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/pygments/LICENSE +0 -25
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/pyproject_hooks/LICENSE +0 -21
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/requests/LICENSE +0 -175
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/resolvelib/LICENSE +0 -13
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/rich/LICENSE +0 -19
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/tomli/LICENSE +0 -21
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/tomli_w/LICENSE +0 -21
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/truststore/LICENSE +0 -21
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/pluggy-1.6.0.dist-info/licenses/LICENSE +0 -21
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/pycparser-3.0.dist-info/licenses/LICENSE +0 -27
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/pygments-2.20.0.dist-info/licenses/LICENSE +0 -25
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/pyproject_hooks-1.2.0.dist-info/LICENSE +0 -21
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/pytest-9.0.2.dist-info/licenses/LICENSE +0 -21
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/pyyaml-6.0.3.dist-info/licenses/LICENSE +0 -20
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/readme_renderer-44.0.dist-info/LICENSE +0 -174
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/requests-2.33.1.dist-info/licenses/LICENSE +0 -175
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/requests_toolbelt-1.0.0.dist-info/LICENSE +0 -13
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/rfc3986-2.0.0.dist-info/LICENSE +0 -13
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/rich-14.3.3.dist-info/licenses/LICENSE +0 -19
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/secretstorage-3.5.0.dist-info/licenses/LICENSE +0 -25
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/tree_sitter-0.25.2.dist-info/licenses/LICENSE +0 -21
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/tree_sitter_java-0.23.5.dist-info/LICENSE +0 -21
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/tree_sitter_python-0.25.0.dist-info/licenses/LICENSE +0 -21
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/tree_sitter_typescript-0.23.2.dist-info/LICENSE +0 -21
- codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/twine-6.2.0.dist-info/licenses/LICENSE +0 -174
- codd_dev-1.5.0/LICENSE +0 -21
- {codd_dev-1.5.0 → codd_dev-1.5.1}/.gitignore +0 -0
- {codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/codd_dev-0.2.0a5.dist-info/licenses → codd_dev-1.5.1}/LICENSE +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/README.md +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/__init__.py +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/assembler.py +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/audit.py +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/clustering.py +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/config.py +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/contracts.py +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/defaults.yaml +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/env_refs.py +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/extract_ai.py +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/generator.py +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/graph.py +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/hooks/__init__.py +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/hooks/pre-commit +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/implementer.py +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/inheritance.py +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/mcp_server.py +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/parsing.py +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/planner.py +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/policy.py +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/propagate.py +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/propagator.py +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/require.py +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/require_plugins.py +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/restore.py +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/reviewer.py +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/risk.py +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/scanner.py +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/schema_refs.py +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/synth.py +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/templates/conventions.yaml.tmpl +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/templates/data_dependencies.yaml.tmpl +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/templates/doc_links.yaml.tmpl +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/templates/extracted/api-contract.md.j2 +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/templates/extracted/architecture-overview.md.j2 +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/templates/extracted/module-detail.md.j2 +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/templates/extracted/schema-design.md.j2 +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/templates/extracted/system-context.md.j2 +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/templates/gitignore.tmpl +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/templates/overrides.yaml.tmpl +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/traceability.py +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/verifier.py +0 -0
- {codd_dev-1.5.0 → codd_dev-1.5.1}/codd/wiring.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codd-dev
|
|
3
|
-
Version: 1.5.
|
|
3
|
+
Version: 1.5.1
|
|
4
4
|
Summary: CoDD: Coherence-Driven Development — cross-artifact change impact analysis
|
|
5
5
|
Project-URL: Homepage, https://github.com/yohey-w/codd-dev
|
|
6
6
|
Project-URL: Repository, https://github.com/yohey-w/codd-dev
|
|
@@ -20,6 +20,64 @@ def _require_codd_dir(project_root: Path) -> Path:
|
|
|
20
20
|
return codd_dir
|
|
21
21
|
|
|
22
22
|
|
|
23
|
+
def _resolve_bootstrap_codd_dir(project_root: Path) -> Path:
|
|
24
|
+
"""Choose a config dir for brownfield bootstrap without clobbering source code."""
|
|
25
|
+
existing = find_codd_dir(project_root)
|
|
26
|
+
if existing is not None:
|
|
27
|
+
return existing
|
|
28
|
+
|
|
29
|
+
hidden_dir = project_root / ".codd"
|
|
30
|
+
default_dir = project_root / "codd"
|
|
31
|
+
if hidden_dir.exists():
|
|
32
|
+
return hidden_dir
|
|
33
|
+
if default_dir.exists():
|
|
34
|
+
# Avoid writing config into projects whose source package is already named codd/.
|
|
35
|
+
return hidden_dir
|
|
36
|
+
return default_dir
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def _format_yaml_list(items: list[str], *, indent: int = 4) -> str:
|
|
40
|
+
"""Render a YAML list block for the simple template engine."""
|
|
41
|
+
if not items:
|
|
42
|
+
return " " * indent + "[]"
|
|
43
|
+
return "\n".join(f'{" " * indent}- "{item}"' for item in items)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def _display_path(path: Path, project_root: Path) -> str:
|
|
47
|
+
try:
|
|
48
|
+
return path.relative_to(project_root).as_posix()
|
|
49
|
+
except ValueError:
|
|
50
|
+
return path.as_posix()
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def _ensure_bootstrap_codd_yaml(
|
|
54
|
+
project_root: Path,
|
|
55
|
+
*,
|
|
56
|
+
codd_dir: Path | None = None,
|
|
57
|
+
language: str,
|
|
58
|
+
source_dirs: list[str],
|
|
59
|
+
) -> tuple[Path, bool]:
|
|
60
|
+
"""Create a minimal codd.yaml after brownfield extract when none exists."""
|
|
61
|
+
codd_dir = codd_dir or _resolve_bootstrap_codd_dir(project_root)
|
|
62
|
+
config_path = codd_dir / "codd.yaml"
|
|
63
|
+
if config_path.exists():
|
|
64
|
+
return config_path, False
|
|
65
|
+
|
|
66
|
+
codd_dir.mkdir(parents=True, exist_ok=True)
|
|
67
|
+
codd_dir_name = _display_path(codd_dir, project_root)
|
|
68
|
+
_render_template(
|
|
69
|
+
"codd.yaml.tmpl",
|
|
70
|
+
config_path,
|
|
71
|
+
{
|
|
72
|
+
"project_name": project_root.name,
|
|
73
|
+
"language": language,
|
|
74
|
+
"source_dirs": _format_yaml_list(source_dirs),
|
|
75
|
+
"graph_path": f"{codd_dir_name}/scan",
|
|
76
|
+
},
|
|
77
|
+
)
|
|
78
|
+
return config_path, True
|
|
79
|
+
|
|
80
|
+
|
|
23
81
|
@click.group()
|
|
24
82
|
@click.version_option(package_name="codd-dev")
|
|
25
83
|
def main():
|
|
@@ -66,6 +124,8 @@ def init(project_name: str, language: str, dest: str, requirements: str | None,
|
|
|
66
124
|
_render_template("codd.yaml.tmpl", codd_dir / "codd.yaml", {
|
|
67
125
|
"project_name": project_name,
|
|
68
126
|
"language": language,
|
|
127
|
+
"source_dirs": _format_yaml_list(["src/"]),
|
|
128
|
+
"graph_path": f"{config_dir}/scan",
|
|
69
129
|
})
|
|
70
130
|
_render_template("gitignore.tmpl", codd_dir / ".gitignore", {})
|
|
71
131
|
|
|
@@ -427,7 +487,7 @@ def verify(path: str, sprint: int | None) -> None:
|
|
|
427
487
|
@click.option("--path", default=".", help="Project root directory")
|
|
428
488
|
@click.option("--language", default=None, help="Override language detection (python/typescript/javascript/go — full support; java — symbols only)")
|
|
429
489
|
@click.option("--source-dirs", default=None, help="Comma-separated source directories (default: auto-detect)")
|
|
430
|
-
@click.option("--output", default=None, help="Output directory (default:
|
|
490
|
+
@click.option("--output", default=None, help="Output directory (default: <config-dir>/extracted/)")
|
|
431
491
|
@click.option("--ai", is_flag=True, default=False, help="Use AI-powered extraction (6-layer MECE design docs)")
|
|
432
492
|
@click.option(
|
|
433
493
|
"--ai-cmd",
|
|
@@ -446,14 +506,19 @@ def extract(path: str, language: str | None, source_dirs: str | None, output: st
|
|
|
446
506
|
Default mode: static analysis (no AI, pure structural facts).
|
|
447
507
|
With --ai: AI-powered 6-layer MECE extraction using claude --print.
|
|
448
508
|
|
|
449
|
-
Output goes to
|
|
450
|
-
|
|
509
|
+
Output goes to the discovered CoDD config dir as draft documents
|
|
510
|
+
(`codd/extracted/` or `.codd/extracted/`). Review and promote
|
|
511
|
+
confirmed docs when ready.
|
|
451
512
|
"""
|
|
452
513
|
project_root = Path(path).resolve()
|
|
514
|
+
bootstrap_codd_dir = _resolve_bootstrap_codd_dir(project_root)
|
|
515
|
+
dirs = [d.strip() for d in source_dirs.split(",") if d.strip()] if source_dirs else None
|
|
516
|
+
output_path = Path(output) if output else bootstrap_codd_dir / "extracted"
|
|
453
517
|
|
|
454
518
|
if ai:
|
|
455
519
|
from codd.extract_ai import run_extract_ai
|
|
456
|
-
from codd.
|
|
520
|
+
from codd.extractor import extract_facts
|
|
521
|
+
from codd.config import load_project_config
|
|
457
522
|
|
|
458
523
|
# Resolve AI command
|
|
459
524
|
if ai_cmd is None:
|
|
@@ -471,39 +536,60 @@ def extract(path: str, language: str | None, source_dirs: str | None, output: st
|
|
|
471
536
|
click.echo(f"Scanning project...")
|
|
472
537
|
|
|
473
538
|
try:
|
|
474
|
-
result = run_extract_ai(project_root, ai_cmd,
|
|
539
|
+
result = run_extract_ai(project_root, ai_cmd, str(output_path), prompt_file=prompt_file)
|
|
475
540
|
except Exception as exc:
|
|
476
541
|
click.echo(f"Error: {exc}")
|
|
477
542
|
raise SystemExit(1)
|
|
478
543
|
|
|
544
|
+
facts = extract_facts(project_root, language, dirs)
|
|
545
|
+
config_path, generated_config = _ensure_bootstrap_codd_yaml(
|
|
546
|
+
project_root,
|
|
547
|
+
codd_dir=bootstrap_codd_dir,
|
|
548
|
+
language=facts.language,
|
|
549
|
+
source_dirs=facts.source_dirs,
|
|
550
|
+
)
|
|
551
|
+
output_display = _display_path(result.output_dir, project_root)
|
|
552
|
+
config_display = _display_path(config_path, project_root)
|
|
553
|
+
|
|
479
554
|
click.echo(f"\nExtracted: {result.module_count} source files analyzed")
|
|
480
|
-
click.echo(f"Output: {
|
|
555
|
+
click.echo(f"Output: {output_display}/")
|
|
481
556
|
for f in result.generated_files:
|
|
482
557
|
click.echo(f" {f.name}")
|
|
558
|
+
if generated_config:
|
|
559
|
+
click.echo(f"Generated: {config_display} (minimal brownfield config)")
|
|
483
560
|
|
|
484
561
|
click.echo(f"\nNext steps:")
|
|
485
|
-
click.echo(f" 1. Review generated docs in {
|
|
486
|
-
click.echo(f" 2. Promote confirmed docs: mv
|
|
562
|
+
click.echo(f" 1. Review generated docs in {output_display}/")
|
|
563
|
+
click.echo(f" 2. Promote confirmed docs: mv {output_display}/*.md docs/design/")
|
|
487
564
|
click.echo(f" 3. Run: codd scan (to build the dependency graph)")
|
|
488
565
|
else:
|
|
489
566
|
from codd.extractor import run_extract
|
|
490
567
|
|
|
491
|
-
dirs = [d.strip() for d in source_dirs.split(",")] if source_dirs else None
|
|
492
|
-
|
|
493
568
|
try:
|
|
494
|
-
result = run_extract(project_root, language, dirs,
|
|
569
|
+
result = run_extract(project_root, language, dirs, str(output_path))
|
|
495
570
|
except Exception as exc:
|
|
496
571
|
click.echo(f"Error: {exc}")
|
|
497
572
|
raise SystemExit(1)
|
|
498
573
|
|
|
574
|
+
config_path, generated_config = _ensure_bootstrap_codd_yaml(
|
|
575
|
+
project_root,
|
|
576
|
+
codd_dir=bootstrap_codd_dir,
|
|
577
|
+
language=result.language,
|
|
578
|
+
source_dirs=result.source_dirs,
|
|
579
|
+
)
|
|
580
|
+
output_display = _display_path(result.output_dir, project_root)
|
|
581
|
+
config_display = _display_path(config_path, project_root)
|
|
582
|
+
|
|
499
583
|
click.echo(f"Extracted: {result.module_count} modules from {result.total_files} files ({result.total_lines:,} lines)")
|
|
500
|
-
click.echo(f"Output: {
|
|
584
|
+
click.echo(f"Output: {output_display}/")
|
|
501
585
|
for f in result.generated_files:
|
|
502
586
|
click.echo(f" {f.relative_to(result.output_dir)}")
|
|
587
|
+
if generated_config:
|
|
588
|
+
click.echo(f"Generated: {config_display} (minimal brownfield config)")
|
|
503
589
|
|
|
504
590
|
click.echo(f"\nNext steps:")
|
|
505
|
-
click.echo(f" 1. Review generated docs in {
|
|
506
|
-
click.echo(f" 2. Promote confirmed docs: mv
|
|
591
|
+
click.echo(f" 1. Review generated docs in {output_display}/")
|
|
592
|
+
click.echo(f" 2. Promote confirmed docs: mv {output_display}/*.md docs/design/")
|
|
507
593
|
click.echo(f" 3. Run: codd scan (to build the dependency graph)")
|
|
508
594
|
|
|
509
595
|
|
|
@@ -120,6 +120,8 @@ class ExtractResult:
|
|
|
120
120
|
module_count: int
|
|
121
121
|
total_files: int
|
|
122
122
|
total_lines: int
|
|
123
|
+
language: str
|
|
124
|
+
source_dirs: list[str]
|
|
123
125
|
|
|
124
126
|
|
|
125
127
|
# ═══════════════════════════════════════════════════════════
|
|
@@ -981,6 +983,8 @@ def run_extract(project_root: Path, language: str | None = None,
|
|
|
981
983
|
module_count=len(facts.modules),
|
|
982
984
|
total_files=facts.total_files,
|
|
983
985
|
total_lines=facts.total_lines,
|
|
986
|
+
language=facts.language,
|
|
987
|
+
source_dirs=facts.source_dirs,
|
|
984
988
|
)
|
|
985
989
|
|
|
986
990
|
|
|
@@ -136,30 +136,34 @@ def _collect_graph_metrics(codd_dir: Path) -> GraphMetrics:
|
|
|
136
136
|
|
|
137
137
|
ceg = CEG(scan_dir)
|
|
138
138
|
try:
|
|
139
|
-
|
|
140
|
-
total_nodes = len(
|
|
139
|
+
node_ids = list(ceg.nodes.keys())
|
|
140
|
+
total_nodes = len(node_ids)
|
|
141
141
|
total_edges = 0
|
|
142
|
-
|
|
143
|
-
in_degree: dict[str, int] = {
|
|
142
|
+
out_degree_by_node: dict[str, int] = {}
|
|
143
|
+
in_degree: dict[str, int] = {node_id: 0 for node_id in node_ids}
|
|
144
144
|
|
|
145
|
-
for node_id in
|
|
146
|
-
deps =
|
|
147
|
-
|
|
145
|
+
for node_id in node_ids:
|
|
146
|
+
deps = ceg.get_outgoing_edges(node_id)
|
|
147
|
+
out_degree_by_node[node_id] = len(deps)
|
|
148
148
|
total_edges += len(deps)
|
|
149
|
-
for
|
|
149
|
+
for edge in deps:
|
|
150
|
+
dep_id = edge["target_id"]
|
|
150
151
|
if dep_id in in_degree:
|
|
151
152
|
in_degree[dep_id] += 1
|
|
152
153
|
|
|
153
154
|
# Orphans: no in-edges AND no out-edges
|
|
154
155
|
orphan_count = sum(
|
|
155
|
-
1
|
|
156
|
-
|
|
156
|
+
1
|
|
157
|
+
for node_id in node_ids
|
|
158
|
+
if in_degree.get(node_id, 0) == 0 and out_degree_by_node.get(node_id, 0) == 0
|
|
157
159
|
)
|
|
158
160
|
|
|
159
|
-
avg_out =
|
|
161
|
+
avg_out = (
|
|
162
|
+
sum(out_degree_by_node.values()) / total_nodes if total_nodes > 0 else 0.0
|
|
163
|
+
)
|
|
160
164
|
|
|
161
165
|
# Max depth via BFS from all root nodes
|
|
162
|
-
max_depth = _compute_max_depth(ceg,
|
|
166
|
+
max_depth = _compute_max_depth(ceg, node_ids, in_degree)
|
|
163
167
|
|
|
164
168
|
finally:
|
|
165
169
|
ceg.close()
|
|
@@ -189,7 +193,8 @@ def _compute_max_depth(ceg, nodes: list[str], in_degree: dict[str, int]) -> int:
|
|
|
189
193
|
continue
|
|
190
194
|
visited.add(node)
|
|
191
195
|
max_depth = max(max_depth, depth)
|
|
192
|
-
for
|
|
196
|
+
for edge in ceg.get_outgoing_edges(node):
|
|
197
|
+
dep_id = edge["target_id"]
|
|
193
198
|
if dep_id not in visited:
|
|
194
199
|
queue.append((dep_id, depth + 1))
|
|
195
200
|
|
|
@@ -11,7 +11,7 @@ coding_principles: null
|
|
|
11
11
|
|
|
12
12
|
scan:
|
|
13
13
|
source_dirs:
|
|
14
|
-
|
|
14
|
+
{{source_dirs}}
|
|
15
15
|
test_dirs:
|
|
16
16
|
- "tests/"
|
|
17
17
|
doc_dirs:
|
|
@@ -24,7 +24,7 @@ scan:
|
|
|
24
24
|
|
|
25
25
|
graph:
|
|
26
26
|
store: "jsonl"
|
|
27
|
-
path: "
|
|
27
|
+
path: "{{graph_path}}"
|
|
28
28
|
|
|
29
29
|
bands:
|
|
30
30
|
green:
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
import json
|
|
5
6
|
import re
|
|
6
7
|
from dataclasses import dataclass, field
|
|
7
8
|
from pathlib import Path
|
|
@@ -135,6 +136,7 @@ def validate_project(project_root: Path, codd_dir: Path | None = None) -> Valida
|
|
|
135
136
|
documents: dict[str, DocumentRecord] = {}
|
|
136
137
|
wave_expectations = _extract_wave_config_expectations(config)
|
|
137
138
|
wave_defined_nodes = set(wave_expectations)
|
|
139
|
+
scanned_node_ids = _load_scanned_node_ids(project_root, config)
|
|
138
140
|
service_boundary_modules = _extract_service_boundary_modules(config)
|
|
139
141
|
|
|
140
142
|
for doc_path in _iter_doc_files(project_root, config):
|
|
@@ -180,6 +182,7 @@ def validate_project(project_root: Path, codd_dir: Path | None = None) -> Valida
|
|
|
180
182
|
)
|
|
181
183
|
|
|
182
184
|
defined_nodes = set(documents)
|
|
185
|
+
known_convention_targets = defined_nodes | scanned_node_ids
|
|
183
186
|
|
|
184
187
|
for record in documents.values():
|
|
185
188
|
for target_id in record.depends_on:
|
|
@@ -203,7 +206,7 @@ def validate_project(project_root: Path, codd_dir: Path | None = None) -> Valida
|
|
|
203
206
|
)
|
|
204
207
|
result.add(level, "dangling_depended_by", record.path, message)
|
|
205
208
|
for target_id in record.conventions:
|
|
206
|
-
if target_id not in
|
|
209
|
+
if target_id not in known_convention_targets:
|
|
207
210
|
result.add(
|
|
208
211
|
LEVEL_WARNING,
|
|
209
212
|
"dangling_convention",
|
|
@@ -418,6 +421,37 @@ def _extract_service_boundary_modules(config: dict[str, Any]) -> set[str]:
|
|
|
418
421
|
return modules
|
|
419
422
|
|
|
420
423
|
|
|
424
|
+
def _load_scanned_node_ids(project_root: Path, config: dict[str, Any]) -> set[str]:
|
|
425
|
+
graph_config = config.get("graph")
|
|
426
|
+
graph_path = "codd/scan"
|
|
427
|
+
if isinstance(graph_config, dict):
|
|
428
|
+
configured_path = graph_config.get("path")
|
|
429
|
+
if isinstance(configured_path, str) and configured_path.strip():
|
|
430
|
+
graph_path = configured_path
|
|
431
|
+
|
|
432
|
+
scan_dir = Path(graph_path)
|
|
433
|
+
if not scan_dir.is_absolute():
|
|
434
|
+
scan_dir = project_root / scan_dir
|
|
435
|
+
|
|
436
|
+
nodes_path = scan_dir / "nodes.jsonl"
|
|
437
|
+
if not nodes_path.exists():
|
|
438
|
+
return set()
|
|
439
|
+
|
|
440
|
+
node_ids: set[str] = set()
|
|
441
|
+
for line in nodes_path.read_text().splitlines():
|
|
442
|
+
payload = line.strip()
|
|
443
|
+
if not payload:
|
|
444
|
+
continue
|
|
445
|
+
try:
|
|
446
|
+
node = json.loads(payload)
|
|
447
|
+
except json.JSONDecodeError:
|
|
448
|
+
continue
|
|
449
|
+
node_id = node.get("id")
|
|
450
|
+
if isinstance(node_id, str) and node_id:
|
|
451
|
+
node_ids.add(node_id)
|
|
452
|
+
return node_ids
|
|
453
|
+
|
|
454
|
+
|
|
421
455
|
def _extract_wave_config_expectations(config: dict[str, Any]) -> dict[str, set[str]]:
|
|
422
456
|
wave_config = config.get("wave_config")
|
|
423
457
|
if not wave_config:
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
Copyright © 2019 Filipe Laíns <filipe.lains@gmail.com>
|
|
2
|
-
|
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining a
|
|
4
|
-
copy of this software and associated documentation files (the "Software"),
|
|
5
|
-
to deal in the Software without restriction, including without limitation
|
|
6
|
-
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
7
|
-
and/or sell copies of the Software, and to permit persons to whom the
|
|
8
|
-
Software is furnished to do so, subject to the following conditions:
|
|
9
|
-
|
|
10
|
-
The above copyright notice and this permission notice (including the next
|
|
11
|
-
paragraph) shall be included in all copies or substantial portions of the
|
|
12
|
-
Software.
|
|
13
|
-
|
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
17
|
-
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
19
|
-
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
20
|
-
DEALINGS IN THE SOFTWARE.
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
This package contains a modified version of ca-bundle.crt:
|
|
2
|
-
|
|
3
|
-
ca-bundle.crt -- Bundle of CA Root Certificates
|
|
4
|
-
|
|
5
|
-
This is a bundle of X.509 certificates of public Certificate Authorities
|
|
6
|
-
(CA). These were automatically extracted from Mozilla's root certificates
|
|
7
|
-
file (certdata.txt). This file can be found in the mozilla source tree:
|
|
8
|
-
https://hg.mozilla.org/mozilla-central/file/tip/security/nss/lib/ckfw/builtins/certdata.txt
|
|
9
|
-
It contains the certificates in PEM format and therefore
|
|
10
|
-
can be directly used with curl / libcurl / php_curl, or with
|
|
11
|
-
an Apache+mod_ssl webserver for SSL client authentication.
|
|
12
|
-
Just configure this file as the SSLCACertificateFile.#
|
|
13
|
-
|
|
14
|
-
***** BEGIN LICENSE BLOCK *****
|
|
15
|
-
This Source Code Form is subject to the terms of the Mozilla Public License,
|
|
16
|
-
v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain
|
|
17
|
-
one at http://mozilla.org/MPL/2.0/.
|
|
18
|
-
|
|
19
|
-
***** END LICENSE BLOCK *****
|
|
20
|
-
@(#) $RCSfile: certdata.txt,v $ $Revision: 1.80 $ $Date: 2011/11/03 15:11:58 $
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
Except when otherwise stated (look for LICENSE files in directories or
|
|
3
|
-
information at the beginning of each file) all software and
|
|
4
|
-
documentation is licensed as follows:
|
|
5
|
-
|
|
6
|
-
MIT No Attribution
|
|
7
|
-
|
|
8
|
-
Permission is hereby granted, free of charge, to any person
|
|
9
|
-
obtaining a copy of this software and associated documentation
|
|
10
|
-
files (the "Software"), to deal in the Software without
|
|
11
|
-
restriction, including without limitation the rights to use,
|
|
12
|
-
copy, modify, merge, publish, distribute, sublicense, and/or
|
|
13
|
-
sell copies of the Software, and to permit persons to whom the
|
|
14
|
-
Software is furnished to do so.
|
|
15
|
-
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
17
|
-
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
19
|
-
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
21
|
-
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
22
|
-
DEALINGS IN THE SOFTWARE.
|
|
23
|
-
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 TAHRI Ahmed R.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
codd_dev-1.5.0/.venv-scanonly-209d2/lib/python3.12/site-packages/id-1.6.1.dist-info/licenses/LICENSE
DELETED
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
Apache License
|
|
3
|
-
Version 2.0, January 2004
|
|
4
|
-
http://www.apache.org/licenses/
|
|
5
|
-
|
|
6
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
-
|
|
8
|
-
1. Definitions.
|
|
9
|
-
|
|
10
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
-
|
|
13
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
-
the copyright owner that is granting the License.
|
|
15
|
-
|
|
16
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
-
other entities that control, are controlled by, or are under common
|
|
18
|
-
control with that entity. For the purposes of this definition,
|
|
19
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
-
direction or management of such entity, whether by contract or
|
|
21
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
-
|
|
24
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
-
exercising permissions granted by this License.
|
|
26
|
-
|
|
27
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
-
including but not limited to software source code, documentation
|
|
29
|
-
source, and configuration files.
|
|
30
|
-
|
|
31
|
-
"Object" form shall mean any form resulting from mechanical
|
|
32
|
-
transformation or translation of a Source form, including but
|
|
33
|
-
not limited to compiled object code, generated documentation,
|
|
34
|
-
and conversions to other media types.
|
|
35
|
-
|
|
36
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
-
Object form, made available under the License, as indicated by a
|
|
38
|
-
copyright notice that is included in or attached to the work
|
|
39
|
-
(an example is provided in the Appendix below).
|
|
40
|
-
|
|
41
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
-
form, that is based on (or derived from) the Work and for which the
|
|
43
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
-
of this License, Derivative Works shall not include works that remain
|
|
46
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
-
the Work and Derivative Works thereof.
|
|
48
|
-
|
|
49
|
-
"Contribution" shall mean any work of authorship, including
|
|
50
|
-
the original version of the Work and any modifications or additions
|
|
51
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
-
means any form of electronic, verbal, or written communication sent
|
|
56
|
-
to the Licensor or its representatives, including but not limited to
|
|
57
|
-
communication on electronic mailing lists, source code control systems,
|
|
58
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
-
excluding communication that is conspicuously marked or otherwise
|
|
61
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
-
|
|
63
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
-
subsequently incorporated within the Work.
|
|
66
|
-
|
|
67
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
-
Work and such Derivative Works in Source or Object form.
|
|
73
|
-
|
|
74
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
-
(except as stated in this section) patent license to make, have made,
|
|
78
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
-
where such license applies only to those patent claims licensable
|
|
80
|
-
by such Contributor that are necessarily infringed by their
|
|
81
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
-
institute patent litigation against any entity (including a
|
|
84
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
-
or contributory patent infringement, then any patent licenses
|
|
87
|
-
granted to You under this License for that Work shall terminate
|
|
88
|
-
as of the date such litigation is filed.
|
|
89
|
-
|
|
90
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
-
modifications, and in Source or Object form, provided that You
|
|
93
|
-
meet the following conditions:
|
|
94
|
-
|
|
95
|
-
(a) You must give any other recipients of the Work or
|
|
96
|
-
Derivative Works a copy of this License; and
|
|
97
|
-
|
|
98
|
-
(b) You must cause any modified files to carry prominent notices
|
|
99
|
-
stating that You changed the files; and
|
|
100
|
-
|
|
101
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
-
that You distribute, all copyright, patent, trademark, and
|
|
103
|
-
attribution notices from the Source form of the Work,
|
|
104
|
-
excluding those notices that do not pertain to any part of
|
|
105
|
-
the Derivative Works; and
|
|
106
|
-
|
|
107
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
-
distribution, then any Derivative Works that You distribute must
|
|
109
|
-
include a readable copy of the attribution notices contained
|
|
110
|
-
within such NOTICE file, excluding those notices that do not
|
|
111
|
-
pertain to any part of the Derivative Works, in at least one
|
|
112
|
-
of the following places: within a NOTICE text file distributed
|
|
113
|
-
as part of the Derivative Works; within the Source form or
|
|
114
|
-
documentation, if provided along with the Derivative Works; or,
|
|
115
|
-
within a display generated by the Derivative Works, if and
|
|
116
|
-
wherever such third-party notices normally appear. The contents
|
|
117
|
-
of the NOTICE file are for informational purposes only and
|
|
118
|
-
do not modify the License. You may add Your own attribution
|
|
119
|
-
notices within Derivative Works that You distribute, alongside
|
|
120
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
-
that such additional attribution notices cannot be construed
|
|
122
|
-
as modifying the License.
|
|
123
|
-
|
|
124
|
-
You may add Your own copyright statement to Your modifications and
|
|
125
|
-
may provide additional or different license terms and conditions
|
|
126
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
-
the conditions stated in this License.
|
|
130
|
-
|
|
131
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
-
this License, without any additional terms or conditions.
|
|
135
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
-
the terms of any separate license agreement you may have executed
|
|
137
|
-
with Licensor regarding such Contributions.
|
|
138
|
-
|
|
139
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
-
except as required for reasonable and customary use in describing the
|
|
142
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
-
|
|
144
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
-
implied, including, without limitation, any warranties or conditions
|
|
149
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
-
appropriateness of using or redistributing the Work and assume any
|
|
152
|
-
risks associated with Your exercise of permissions under this License.
|
|
153
|
-
|
|
154
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
-
unless required by applicable law (such as deliberate and grossly
|
|
157
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
-
liable to You for damages, including any direct, indirect, special,
|
|
159
|
-
incidental, or consequential damages of any character arising as a
|
|
160
|
-
result of this License or out of the use or inability to use the
|
|
161
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
-
other commercial damages or losses), even if such Contributor
|
|
164
|
-
has been advised of the possibility of such damages.
|
|
165
|
-
|
|
166
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
-
or other liability obligations and/or rights consistent with this
|
|
170
|
-
License. However, in accepting such obligations, You may act only
|
|
171
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
-
defend, and hold each Contributor harmless for any liability
|
|
174
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
-
of your accepting any such warranty or additional liability.
|
|
176
|
-
|
|
177
|
-
END OF TERMS AND CONDITIONS
|
|
178
|
-
|
|
179
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
-
|
|
181
|
-
To apply the Apache License to your work, attach the following
|
|
182
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
-
replaced with your own identifying information. (Don't include
|
|
184
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
-
comment syntax for the file format. We also recommend that a
|
|
186
|
-
file or class name and description of purpose be included on the
|
|
187
|
-
same "printed page" as the copyright notice for easier
|
|
188
|
-
identification within third-party archives.
|
|
189
|
-
|
|
190
|
-
Copyright [yyyy] [name of copyright owner]
|
|
191
|
-
|
|
192
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
-
you may not use this file except in compliance with the License.
|
|
194
|
-
You may obtain a copy of the License at
|
|
195
|
-
|
|
196
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
-
|
|
198
|
-
Unless required by applicable law or agreed to in writing, software
|
|
199
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
-
See the License for the specific language governing permissions and
|
|
202
|
-
limitations under the License.
|