Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for 0.8 incorrectly specifies what's returned in a direct_citation graph #185

Open
serenalotreck opened this issue Apr 4, 2023 · 0 comments

Comments

@serenalotreck
Copy link

serenalotreck commented Apr 4, 2023

I'm looking at the most recent documentation, but it does not correspond to what I'm observing in my code. It says that "The networks.papers.direct_citation() method generates both a global citation graph, which includes all cited and citing papers, and an internal citation graph that describes only citations among papers in the original dataset."

In pervious iterations of the documentation, it clearly states in both the function documentation and example that two networkx Graph objects are returned. However, when I try and catch the output of direct_citation() into two variables in tethne 0.8, I get the following:

Traceback (most recent call last):
  File "build_citation_network.py", line 46, in <module>
    main(args.wos_file, args.out_loc, args.out_prefix)
  File "build_citation_network.py", line 18, in main
    igraph, ograph = direct_citation(papers)
ValueError: too many values to unpack (expected 2)

This is consistent with the source code, as the multipartite function which direct_cutation() calls only returns one Graph object.

I'd like to clarify which is the expected behavior; does the documentation need to be changed, or does the source code?

EDIT: If the capacity to generate in-dataset and out-of-dataset citation networks separately has been removed, can it be put back? It's a very valuable differentiation for my use case, and it seems odd to completely remove that functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant