Document that graph rendering requires a local Graphviz (dot) install

Aperta Adatta ai principianti
#2,239 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
documentation

Direzione di ricerca

Inizia da docs/source/installation.rst e context.rst per trovare dove viene introdotto il grafo di risoluzione, poi aggiungi una breve nota che indichi che il rendering richiede Graphviz con dot nel PATH. Il codice si trova in src/rez/utils/graph_utils.py (save_graph e view_graph) e nel pydot vendorizzato in src/rez/vendor/pydot/core.py. È completato quando la documentazione dichiara il requisito e, facoltativamente, un controllo preliminare con shutil.which genera un messaggio leggibile se dot manca.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

difficulty/easy documentation

rez vendors pydot and pygraph - the graph description libraries - but actually rendering a resolve graph to an image delegates to the system dot binary from Graphviz. That binary is not vendored, not a pip dependency, and as far as I can find, the requirement is not mentioned anywhere in our docs. Users reasonably assume the vendored stack is self-contained, and then hit a raw traceback.

Where it bites

rez-context -g / --view-graph (graph viewing)
rez-view (the graph pane)
rez.utils.graph_utils.save_graph / view_graph (Python API)

The symptom

With Graphviz absent, the vendored pydot shells out to dot (self.prog = "dot", src/rez/vendor/pydot/core.py), and its error handler re-raises a bare OSError - so users get a raw traceback (OSError: [Errno 2] No such file or directory: 'dot', or an InvocationException depending on path), with nothing pointing at Graphviz. There is no preflight check for the binary anywhere in src/rez/utils/graph_utils.py.

Proposed fix

Docs : add a short prerequisites note - either a small "Optional dependencies" section in installation.rst, or a paragraph in context.rst where the resolve graph is introduced. Content: rendering resolve graphs requires a local Graphviz install with dot on PATH (Windows: dot.exe); without it, graph viewing crashes. Suggested phrasing for the dot_image_format comment too: mention the binary, not just the format.
Code nicety (optional, same PR or follow-up): a preflight in graph_utils.py - if shutil.which("dot") is None, raise (or print) a friendly message: "Graph rendering requires Graphviz (graphviz.org/)) - the 'dot' executable was not found on PATH."

Lingua principale
Python
Stelle
1.1k
Fork
370
Merge medio
2g 10h
PR unite (30g)
11

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di AcademySoftwareFoundation/rez

Tutte le issue di AcademySoftwareFoundation/rez

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.