keygraph 0.2.0__py3-none-any.whl
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.
- keygraph/__init__.py +8 -0
- keygraph/__main__.py +3 -0
- keygraph/adapters/__init__.py +33 -0
- keygraph/adapters/base.py +57 -0
- keygraph/adapters/clickhouse.py +67 -0
- keygraph/adapters/dump.py +169 -0
- keygraph/adapters/fetch.py +93 -0
- keygraph/adapters/live.py +50 -0
- keygraph/adapters/metabase.py +78 -0
- keygraph/adapters/mongo.py +93 -0
- keygraph/adapters/mysql.py +30 -0
- keygraph/adapters/postgres.py +68 -0
- keygraph/adapters/sqlite.py +24 -0
- keygraph/adapters/sqlserver.py +65 -0
- keygraph/areas.py +225 -0
- keygraph/cli.py +497 -0
- keygraph/context.py +387 -0
- keygraph/docs_out.py +199 -0
- keygraph/explorer.py +128 -0
- keygraph/graph.py +163 -0
- keygraph/hubs.py +48 -0
- keygraph/infer.py +344 -0
- keygraph/mcp_server.py +147 -0
- keygraph/mirrors.py +109 -0
- keygraph/model.py +149 -0
- keygraph/notes.py +114 -0
- keygraph/overrides.py +112 -0
- keygraph/probe.py +119 -0
- keygraph/profile.py +262 -0
- keygraph/query.py +376 -0
- keygraph/report.py +92 -0
- keygraph/search.py +175 -0
- keygraph/static/DAGRE_LICENSE +19 -0
- keygraph/static/OFL-Inter.txt +93 -0
- keygraph/static/OFL-JetBrainsMono.txt +93 -0
- keygraph/static/dagre-1.1.4.min.js +801 -0
- keygraph/static/explorer.html +69 -0
- keygraph/static/explorer.js +1076 -0
- keygraph/static/favicon.svg +1 -0
- keygraph/static/keygraph-logo.svg +1 -0
- keygraph/static/keygraph-mark.svg +1 -0
- keygraph/static/keygraph.inline.css +843 -0
- keygraph/static/kg-diagram.js +267 -0
- keygraph/static/kg-theme.js +269 -0
- keygraph/summary.py +60 -0
- keygraph-0.2.0.dist-info/METADATA +334 -0
- keygraph-0.2.0.dist-info/RECORD +50 -0
- keygraph-0.2.0.dist-info/WHEEL +4 -0
- keygraph-0.2.0.dist-info/entry_points.txt +2 -0
- keygraph-0.2.0.dist-info/licenses/LICENSE +21 -0
keygraph/report.py
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"""RELATIONS_REPORT.md: plain-language review of the graph."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .graph import Graph
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def _leading(node: dict, cols: list[str]) -> bool:
|
|
9
|
+
n = len(cols)
|
|
10
|
+
return any(len(i["columns"]) >= n and set(i["columns"][:n]) == set(cols) for i in node["indexes"])
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def write_report(graph: Graph, ctx=None, cap: int = 40) -> str:
|
|
14
|
+
st = graph.data["stats"]
|
|
15
|
+
nodes = graph.nodes
|
|
16
|
+
deg: dict[str, int] = {n: 0 for n in nodes}
|
|
17
|
+
for e in graph.edges:
|
|
18
|
+
deg[e["from"]] += 1
|
|
19
|
+
if e["to"] != e["from"]:
|
|
20
|
+
deg[e["to"]] += 1
|
|
21
|
+
out = ["# Relations report", ""]
|
|
22
|
+
out.append(f"{st['tables']} tables in {st['schemas']} schema(s), {st['columns']} columns, {st['indexes']} indexes and "
|
|
23
|
+
f"{st['edges']} relations. Declared foreign keys: {st['edges_by_kind'].get('declared', 0)}; inferred: "
|
|
24
|
+
f"{st['edges_by_kind'].get('inferred', 0)}. Inferred relations are guesses from names and key shapes: "
|
|
25
|
+
"treat them by their confidence.")
|
|
26
|
+
out += ["", "Confidence bands: " + ", ".join(f"{k}: {v}" for k, v in st["edges_by_confidence"].items()), ""]
|
|
27
|
+
areas = graph.data.get("areas") or []
|
|
28
|
+
if areas:
|
|
29
|
+
big = max(areas, key=lambda a: a["size"])
|
|
30
|
+
out += [f"Areas: {len(areas)}; largest is {big['name']} with {big['size']} tables. Hub tables: {len(graph.data.get('hubs', []))}.", ""]
|
|
31
|
+
|
|
32
|
+
def section(title, rows, note=""):
|
|
33
|
+
out.append(f"## {title} ({len(rows)})")
|
|
34
|
+
if note:
|
|
35
|
+
out.append(note)
|
|
36
|
+
out.append("")
|
|
37
|
+
if not rows:
|
|
38
|
+
out.append("None.")
|
|
39
|
+
for r in rows[:cap]:
|
|
40
|
+
out.append("- " + r)
|
|
41
|
+
if len(rows) > cap:
|
|
42
|
+
out.append(f"- ... and {len(rows) - cap} more (see graph.json)")
|
|
43
|
+
out.append("")
|
|
44
|
+
|
|
45
|
+
hubs = sorted(nodes, key=lambda n: (-deg[n], n))[:10]
|
|
46
|
+
section("Hub tables", [f"{n}: {deg[n]} relations" for n in hubs if deg[n]],
|
|
47
|
+
"Tables with the most relations; joins usually route through them.")
|
|
48
|
+
section("Tables with no relations", [n for n in sorted(nodes) if deg[n] == 0],
|
|
49
|
+
"No declared or inferred relation found. They may be logs, config tables, or use keys with unusual names.")
|
|
50
|
+
weak = [e for e in graph.edges if e["kind"] == "inferred" and (e["confidence"] < 0.6 or e["ambiguous"])]
|
|
51
|
+
weak.sort(key=lambda e: (e["confidence"], e["id"]))
|
|
52
|
+
section("Ambiguous or low-confidence relations to review", [
|
|
53
|
+
f"{e['id']} confidence {e['confidence']:.2f}{' ambiguous' if e['ambiguous'] else ''}: {'; '.join(e['evidence'][:2])}" for e in weak],
|
|
54
|
+
"Confirm or reject these in an overrides file.")
|
|
55
|
+
poly = [f"{n['id']}.{p['id_column']} (type in {p['type_column']})" for n in nodes.values() for p in n["polymorphic"]]
|
|
56
|
+
section("Polymorphic columns", poly, "The target table depends on a type column; there is no single join target.")
|
|
57
|
+
section("Tables without a primary key", [n for n in sorted(nodes) if not nodes[n]["primary_key"]],
|
|
58
|
+
"Row identity is unclear; joins into these tables may duplicate rows.")
|
|
59
|
+
red = [f"{n['id']}: {r['index']}({', '.join(r['columns'])}) is covered by {r['covered_by']} ({r['reason']})"
|
|
60
|
+
for n in nodes.values() for r in n["redundant_indexes"]]
|
|
61
|
+
section("Redundant indexes", red)
|
|
62
|
+
unidx = sorted({f"{e['from']}({', '.join(e['from_columns'])}) -> {e['to']}" for e in graph.edges
|
|
63
|
+
if e["confidence"] >= 0.5 and not _leading(nodes[e["from"]], e["from_columns"])
|
|
64
|
+
and not any(set(nodes[e['from']]['primary_key']) >= set(e['from_columns']) for _ in [0])})
|
|
65
|
+
section("Foreign-key-like columns without an index", unidx,
|
|
66
|
+
"Joining or filtering on these columns scans the whole table.")
|
|
67
|
+
unres = [f"{n['id']}: {', '.join(n['unresolved_id_columns'])}" for n in nodes.values() if n["unresolved_id_columns"]]
|
|
68
|
+
section("Id-like columns with no matching table", unres)
|
|
69
|
+
if graph.data["warnings"]:
|
|
70
|
+
section("Warnings", graph.data["warnings"])
|
|
71
|
+
if ctx is not None:
|
|
72
|
+
notes = {r["table_id"]: r for r in ctx.rows("table_notes")}
|
|
73
|
+
sem = {r["table_id"] for r in ctx.rows("column_semantics")}
|
|
74
|
+
linked = {r["table_id"] for r in ctx.rows("concept_links")}
|
|
75
|
+
covered = set(notes) | sem | linked
|
|
76
|
+
c = ctx.counts()
|
|
77
|
+
out.append("## Context coverage")
|
|
78
|
+
out.append("")
|
|
79
|
+
out.append(f"{len(covered & set(nodes))} of {len(nodes)} tables have any business context. Entries: " +
|
|
80
|
+
", ".join(f"{v} {k.replace('_', ' ')}" for k, v in c.items()) + ".")
|
|
81
|
+
out.append("")
|
|
82
|
+
nohub = [f"{n}: {deg[n]} relations" for n in sorted(nodes, key=lambda n: (-deg[n], n))
|
|
83
|
+
if deg[n] >= 3 and not (notes.get(n) or {}).get("grain")][:cap]
|
|
84
|
+
section("Hub tables with no grain note", nohub)
|
|
85
|
+
unv = [f"table note {k}" for k, v in notes.items() if not v["verified"]]
|
|
86
|
+
unv += [f"column {r['table_id']}.{r['col']}" for r in ctx.rows("column_semantics") if not r["verified"]]
|
|
87
|
+
unv += [f"concept {r['name']}" for r in ctx.rows("concepts") if not r["verified"]]
|
|
88
|
+
section("Unverified context entries", sorted(unv))
|
|
89
|
+
section("Tables with no context (first by relations)",
|
|
90
|
+
[n for n in sorted(nodes, key=lambda n: (-deg[n], n)) if n not in covered][:cap],
|
|
91
|
+
f"{len([n for n in nodes if n not in covered])} tables in total.")
|
|
92
|
+
return "\n".join(out).rstrip() + "\n"
|
keygraph/search.py
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
"""Business-question search over names + context, describe, and context-to-graph evidence."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
|
|
7
|
+
from .context import ContextDB, safe_source
|
|
8
|
+
from .graph import Graph
|
|
9
|
+
from .query import column_detail, filter_columns, find_paths, table_info_line
|
|
10
|
+
|
|
11
|
+
WEIGHT = {"concept": 1.0, "table_note": 1.2, "metric": 1.0, "column_ctx": 0.8, "column_value": 0.7, "table": 1.0, "column": 0.5}
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def apply_context_to_graph(graph: Graph, ctx: ContextDB) -> int:
|
|
15
|
+
"""Concept relations that map onto a graph edge add evidence and raise confidence (idempotent)."""
|
|
16
|
+
prim: dict[str, set[str]] = {}
|
|
17
|
+
for l in ctx.rows("concept_links"):
|
|
18
|
+
if l["role"] == "primary-record":
|
|
19
|
+
prim.setdefault(l["concept"], set()).add(l["table_id"])
|
|
20
|
+
by_id = {e["id"]: e for e in graph.edges}
|
|
21
|
+
pair: dict[tuple[str, str], list[dict]] = {}
|
|
22
|
+
for e in graph.edges:
|
|
23
|
+
pair.setdefault((e["from"], e["to"]), []).append(e)
|
|
24
|
+
pair.setdefault((e["to"], e["from"]), []).append(e)
|
|
25
|
+
n = 0
|
|
26
|
+
for r in ctx.rows("concept_relations"):
|
|
27
|
+
targets = [by_id[r["edge_id"]]] if r["edge_id"] in by_id else [
|
|
28
|
+
e for a in prim.get(r["from_concept"], ()) for b in prim.get(r["to_concept"], ()) for e in pair.get((a, b), [])]
|
|
29
|
+
for e in targets:
|
|
30
|
+
msg = f"business relation: {r['from_concept']} {r['rel']} {r['to_concept']} (source: {safe_source(r['source'])})"
|
|
31
|
+
if msg in e["evidence"]:
|
|
32
|
+
continue
|
|
33
|
+
e["evidence"].append(msg)
|
|
34
|
+
if e["kind"] == "inferred":
|
|
35
|
+
e["confidence"] = round(min(0.95, e["confidence"] + (0.2 if r["verified"] else 0.1)), 2)
|
|
36
|
+
n += 1
|
|
37
|
+
graph.refresh_stats()
|
|
38
|
+
return n
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def search(graph: Graph, ctx: ContextDB, query: str, limit: int = 8, with_paths: bool = True) -> dict:
|
|
42
|
+
hits = ctx.fts(query)
|
|
43
|
+
score: dict[str, float] = {}
|
|
44
|
+
why: dict[str, list[str]] = {}
|
|
45
|
+
concepts, metrics = [], []
|
|
46
|
+
|
|
47
|
+
def add(tid, s, reason):
|
|
48
|
+
if tid in graph.nodes:
|
|
49
|
+
score[tid] = score.get(tid, 0) + s
|
|
50
|
+
if reason not in why.setdefault(tid, []):
|
|
51
|
+
why[tid].append(reason)
|
|
52
|
+
|
|
53
|
+
links = ctx.rows("concept_links")
|
|
54
|
+
by_concept: dict[str, list[dict]] = {}
|
|
55
|
+
for l in links:
|
|
56
|
+
by_concept.setdefault(l["concept"], []).append(l)
|
|
57
|
+
rels = ctx.rows("concept_relations")
|
|
58
|
+
for kind, ref, s in hits:
|
|
59
|
+
w = WEIGHT.get(kind, 0.5) * s
|
|
60
|
+
if kind == "table":
|
|
61
|
+
add(ref, w, "table name matches")
|
|
62
|
+
elif kind == "column":
|
|
63
|
+
add(ref.rsplit(".", 1)[0], w, f"column {ref.rsplit('.', 1)[1]} matches")
|
|
64
|
+
elif kind == "column_value":
|
|
65
|
+
add(ref.rsplit(".", 1)[0], w, f"observed values of {ref.rsplit('.', 1)[1]} match")
|
|
66
|
+
elif kind == "column_ctx":
|
|
67
|
+
add(ref.rsplit(".", 1)[0], w, f"column context: {ref.rsplit('.', 1)[1]}")
|
|
68
|
+
elif kind == "table_note":
|
|
69
|
+
add(ref, w, "table notes match")
|
|
70
|
+
elif kind == "concept":
|
|
71
|
+
concepts.append(ref)
|
|
72
|
+
for l in by_concept.get(ref, []):
|
|
73
|
+
add(l["table_id"], w * (1.0 if l["role"] == "primary-record" else 0.5), f"concept '{ref}' ({l['role']})")
|
|
74
|
+
for r in rels:
|
|
75
|
+
other = r["to_concept"] if r["from_concept"] == ref else r["from_concept"] if r["to_concept"] == ref else None
|
|
76
|
+
if other:
|
|
77
|
+
for l in by_concept.get(other, []):
|
|
78
|
+
if l["role"] == "primary-record":
|
|
79
|
+
add(l["table_id"], w * 0.4, f"related concept '{other}' ({r['from_concept']} {r['rel']} {r['to_concept']})")
|
|
80
|
+
elif kind == "metric":
|
|
81
|
+
m = ctx.rows("metrics", "WHERE name=?", (ref,))[0]
|
|
82
|
+
metrics.append(ref)
|
|
83
|
+
for t in json.loads(m["tables"] or "[]"):
|
|
84
|
+
add(t, w, f"metric '{ref}'")
|
|
85
|
+
top = sorted(score, key=lambda t: (-score[t], t))[:limit]
|
|
86
|
+
out_tables = []
|
|
87
|
+
for t in top:
|
|
88
|
+
c = ctx.table_context(t)
|
|
89
|
+
notes = c["notes"] or {}
|
|
90
|
+
node = graph.nodes[t]
|
|
91
|
+
out_tables.append({
|
|
92
|
+
"table": t, "score": round(score[t], 2), "why": why[t][:5], "grain": notes.get("grain", ""),
|
|
93
|
+
"summary": notes.get("summary", ""), "primary_key": node["primary_key"],
|
|
94
|
+
"filter_columns": filter_columns(node, notes), "concepts": sorted({l["concept"] for l in c["concepts"]}),
|
|
95
|
+
"pitfalls": notes.get("pitfalls", ""), "verified": bool(notes.get("verified"))})
|
|
96
|
+
paths = []
|
|
97
|
+
if with_paths and len(top) >= 2:
|
|
98
|
+
for other in top[1:3]:
|
|
99
|
+
ps = find_paths(graph, top[0], other, 4, 0.6, 1)
|
|
100
|
+
if ps:
|
|
101
|
+
paths.append({"from": top[0], "to": other, **ps[0]})
|
|
102
|
+
return {"query": query, "tables": out_tables, "concepts": sorted(set(concepts)), "metrics": sorted(set(metrics)),
|
|
103
|
+
"join_paths": paths}
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
def format_search(r: dict) -> str:
|
|
107
|
+
out = [f"Search: {r['query']}"]
|
|
108
|
+
if r["concepts"]:
|
|
109
|
+
out.append(" concepts: " + ", ".join(r["concepts"]))
|
|
110
|
+
if r["metrics"]:
|
|
111
|
+
out.append(" metrics: " + ", ".join(r["metrics"]))
|
|
112
|
+
if not r["tables"]:
|
|
113
|
+
out.append(" no matching tables")
|
|
114
|
+
for i, t in enumerate(r["tables"], 1):
|
|
115
|
+
out.append(f"{i}. {t['table']} (score {t['score']}{', verified' if t['verified'] else ''})")
|
|
116
|
+
if t["grain"] or t["summary"]:
|
|
117
|
+
out.append(f" grain/summary: {t['grain'] or t['summary']}"[:260])
|
|
118
|
+
out.append(f" pk: {', '.join(t['primary_key']) or 'none'} filter on: {', '.join(t['filter_columns']) or 'n/a'}")
|
|
119
|
+
out.append(" why: " + "; ".join(t["why"]))
|
|
120
|
+
if t["pitfalls"]:
|
|
121
|
+
out.append(f" pitfalls: {t['pitfalls']}"[:260])
|
|
122
|
+
for p in r["join_paths"]:
|
|
123
|
+
out.append(f"join {p['from']} .. {p['to']} (confidence {p['confidence']}):")
|
|
124
|
+
out.append(" " + p["sql"].replace("\n", "\n "))
|
|
125
|
+
return "\n".join(out)
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
def describe(graph: Graph, ctx: ContextDB, ref: str) -> dict:
|
|
129
|
+
from .query import keys, neighbors
|
|
130
|
+
t = graph.resolve(ref)
|
|
131
|
+
c = ctx.table_context(t)
|
|
132
|
+
nb = neighbors(graph, t, 1)
|
|
133
|
+
return {"table": t, "keys": keys(graph, t), "filter_columns": filter_columns(graph.nodes[t], c["notes"]),
|
|
134
|
+
"context": c, "relations": nb["levels"].get("1", []),
|
|
135
|
+
"info_line": table_info_line(graph.nodes[t]),
|
|
136
|
+
"columns": [{**x, "detail": column_detail(x), "profile": (graph.data.get("profiles") or {}).get(f"{t}.{x['name']}")}
|
|
137
|
+
for x in graph.nodes[t]["columns"]]}
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
def format_describe(d: dict) -> str:
|
|
141
|
+
from .query import format_keys
|
|
142
|
+
out = [format_keys(d["keys"])]
|
|
143
|
+
n = d["context"]["notes"]
|
|
144
|
+
if n:
|
|
145
|
+
out.append(f" grain: {n['grain']}")
|
|
146
|
+
for k in ("summary", "freshness", "soft_delete", "date_column", "pitfalls"):
|
|
147
|
+
if n.get(k):
|
|
148
|
+
out.append(f" {k}: {n[k]}")
|
|
149
|
+
out.append(f" context source: {safe_source(n['source'])} verified: {bool(n['verified'])}")
|
|
150
|
+
out.append(" efficient filters: " + (", ".join(d["filter_columns"]) or "n/a"))
|
|
151
|
+
if d["context"]["concepts"]:
|
|
152
|
+
out.append(" concepts: " + ", ".join(f"{l['concept']} ({l['role']})" for l in d["context"]["concepts"]))
|
|
153
|
+
for m in d["context"]["metrics"]:
|
|
154
|
+
out.append(f" metric {m['name']}: {m['definition']} [{m['expression']}]")
|
|
155
|
+
sem = {c["col"]: c for c in d["context"]["columns"]}
|
|
156
|
+
out.append(" columns:")
|
|
157
|
+
for c in d["columns"]:
|
|
158
|
+
s = sem.get(c["name"])
|
|
159
|
+
extra = f" - {s['meaning']}" if s and s["meaning"] else ""
|
|
160
|
+
if s and s["unit"]:
|
|
161
|
+
extra += f" [{s['unit']}]"
|
|
162
|
+
if s and s["codes"]:
|
|
163
|
+
extra += " codes: " + ", ".join(f"{k}={v}" for k, v in s["codes"].items())
|
|
164
|
+
if s and s["pii"]:
|
|
165
|
+
extra += " [PII]"
|
|
166
|
+
pf = c.get("profile")
|
|
167
|
+
if pf:
|
|
168
|
+
from .profile import summarize
|
|
169
|
+
extra += " [" + summarize(pf) + "]"
|
|
170
|
+
out.append(f" {c['name']} {c['detail']}{extra}")
|
|
171
|
+
if d["relations"]:
|
|
172
|
+
out.append(" relations:")
|
|
173
|
+
for x in d["relations"]:
|
|
174
|
+
out.append(f" {x['from']}({','.join(x['from_columns'])}) -> {x['to']}({','.join(x['to_columns'])}) [{x['kind']} {x['confidence']:.2f}]")
|
|
175
|
+
return "\n".join(out)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright (c) 2012-2014 Chris Pettitt
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
+
in the Software without restriction, including without limitation the rights
|
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
furnished to do so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
|
11
|
+
all copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
19
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|