Read GraphML
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript, xml
- Ambito
- data
Direzione di ricerca
Start with packages/formats/src/xml.ts and the RDF/XML parser, then read the JSON field mappings in packages/formats/src/json.ts and format registration in packages/formats/src/index.ts and detect.ts. Add GraphML parsing and registration, then update the CLI, playground, English and Chinese docs, tests and changeset listed in the issue. Done means extension and content detection work and a NetworkX GraphML fixture produces the same hashGraph as its node-link JSON counterpart.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Why
GraphML is what NetworkX (nx.write_graphml), igraph, yEd and Gephi write, and what
LightRAG keeps its knowledge graph in
(graph_chunk_entity_relation.graphml). Today kgdiff recognises a GraphML document and stops
with "export it as JSON first"
(detect.ts#L166).
For the GraphRAG users kgdiff is built for, that is one step too many.
What
A graphml format in @kgdiff/formats, mapped with the same conventions as the JSON graph
shapes, so that one graph saved as GraphML and as NetworkX node-link JSON diffs as identical:
<node id>→ node id.<edge source target>→ edge,<edge id>→ edge id.<data key>values, typed by their<key attr.name attr.type for>declarations (string,
int,long,float,double,boolean) with<default>values applied → fields. The
label, type and predicate then come from the same field names the JSON reader uses
(LABEL_KEYS,TYPE_KEYS,PREDICATE_KEYSin json.ts#L616-L621);
everything else becomes attributes. Note that LightRAG'sentity_typeis not one of the type
keys today; whether to add it (for JSON too) is worth deciding here.- Undirected graphs (
edgedefault="undirected"): decide and document a stable endpoint order,
so thata–bandb–aare the same edge. - Out of scope, each with a warning rather than an error: nested
<graph>s,<hyperedge>,
<port>, and yEd'sy:drawing extensions (geometry, styles), which are dropped like the
JSON reader'sjson-ignored-fields.
Where to start
- Parse with the SAX-style
parseXmlthat RDF/XML already uses
(xml.ts#L115):
no new dependency, external entities never loaded. One option is to turn GraphML into
node-link records and hand them to the JSON reader's field mapping, which keeps the two in
step. - Register the format:
FormatId
(index.ts#L24),
acaseinparseGraphnext tordfxml
(index.ts#L239),
.graphmlinFORMAT_EXTENSIONS
(detect.ts#L10),
and return'graphml'from content sniffing instead of throwing. - Everywhere formats are listed: the CLI's
--formatvalues
(args.ts#L23)
and display names
(inputs.ts#L13),
the playground
(datasets.ts#L82),
docs/formats.md(move GraphML out of "Recognised but not read") and the mapping table in
docs/architecture.md, in English and Chinese. - Tests and fixtures in
packages/formats/test/: a small file written by NetworkX and a
LightRAG-style file withentity_type,descriptionandsource_id. Thepeople.*and
go-mini.*fixtures show how one graph in several syntaxes is checked for equality.
Done when
kgdiff a.graphml b.graphmlworks, with format detection from the extension and the content.- The same graph written by NetworkX as GraphML and as node-link JSON gives the same
hashGraph. - Docs updated in both languages, and a changeset (
pnpm changeset).
GEXF follows the same pattern: #9. Comment here before you start, so we don't duplicate work.
- Lingua principale
- TypeScript
- Stelle
- 47
- Fork
- 6
- Merge medio
- 2h 32m
- PR unite (30g)
- 22
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di iiwish/kgdiff
-
documentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
accessibility help wanted viewer
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
iiwish/kgdiff#16 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 1/100
iiwish/kgdiff#21 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
cli enhancement good first issue
Difficoltà 4/5 3-5 giorni Idoneità per principianti 57/100
I maintainer di solito rispondono entro 1 giorno
-
documentation help wanted
Difficoltà 3/5 1-2 giorni Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di iiwish/kgdiff
Issue simili
-
maintenance
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
assistant-ui/assistant-ui#10499 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
bug server-sequentialthinking v2
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
modelcontextprotocol/servers#5526 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
app-server bug CLI
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
cimd: default originBoundFields rejects a cross-origin client_uri, which the CIMD draft forbidsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
better-auth/better-auth#12458 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno