improve the example of `save_heterograph` and `save_homograph` rendered in docs
Closed this issue · 0 comments
huskydoge commented
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:
- there is some typos, like ill format in import section, and wrong function used (should use
save_homograph
rather thansave_graph
, otherwise an error namedsave_graph() got an unexpected keyword argument 'citation'
(which might be considered as a bug I think).
- Missing some necessary Imports to run the example directly. In
save_heterograph
, the example just start like this:
I think some necessary imports should be given
- the code block should have a copy button for convenience
Solution
- modify the example in
gli/graph.py
- add 'sphinx_copybutton' extension to docs