Graph-Learning-Benchmarks/gli

improve the example of `save_heterograph` and `save_homograph` rendered in docs

Closed this issue · 0 comments

Problem

When referring to GLI docs for the usage example of these two functions, save_homograph and save_heterograph, I found the example it provided cannot be run directly:

  1. there is some typos, like ill format in import section, and wrong function used (should use save_homograph rather than save_graph, otherwise an error named save_graph() got an unexpected keyword argument 'citation' (which might be considered as a bug I think).
Screenshot 2023-12-07 at 13 21 51
  1. Missing some necessary Imports to run the example directly. In save_heterograph, the example just start like this:
Screenshot 2023-12-07 at 13 33 58

I think some necessary imports should be given

  1. the code block should have a copy button for convenience

Solution

  • modify the example in gli/graph.py
  • add 'sphinx_copybutton' extension to docs