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

Leaving "Create missing nodes" unchecked does not have the desired effect #1878

Closed
WouterSpekkink opened this issue Dec 14, 2017 · 7 comments

Comments

@WouterSpekkink
Copy link

Expected Behavior

When important a spreadsheet of edges, the import dialog gives the option to not include missing nodes. When leaving this unchecked any entries in the edge list that do not have a corresponding entry in the node list should not be imported.

Current Behavior

Missing nodes are created even when the checkbox is left unchecked.

Possible Solution

I guess that there is a conditional somehwere in the code that is not processed correctly.

Steps to Reproduce

  1. Start an empty project
  2. Import any edge list before importing a node list
  3. Leave box "Create missing nodes" in the import dialog unchecked
  4. Observe that nodes are created anyway.

Context

This is a problem when you want to make sure that missing nodes are not included anyway.

Your Environment

  • Version used: Gephi 0.9.2
  • Java version: 1.8
  • Operating System: Linux Ubuntu 16.04 LTS, also observed on Windows 10
@eduramiba
Copy link
Member

Thanks for the report, I guess this should be a simple regression.

@eduramiba eduramiba self-assigned this Dec 14, 2017
@eduramiba eduramiba added this to the 0.9.3 milestone Dec 14, 2017
@eduramiba
Copy link
Member

Hi,
This is actually normal behavior. The 'Create missing nodes' feature, only works at the level of the imported file/container (for example, a GEXF file having edges that use nodes that are not declared in that same GEXF file).

Since CSV edges table is a every special format (no nodes can be present, only the edges), it's considered that all the nodes you reference are correct, and therefore auto-created in the import container (if you unchecked the checkbox, not a single node would be created).

There is no feature that would check for the existing graph to see if nodes exist (with append to existing option), and would be tricky to implement as it works now.

@WouterSpekkink
Copy link
Author

WouterSpekkink commented Dec 15, 2017

Aha, but I think what raises some confusion is that in Gephi 0.9.1 gephi actually doesn't import the edges if there is not a node list that has already been imported (with IDs that match those in the source and target columns).

So what you describe, the part about not a single node being created if you only import and edge list, is what actually happens in Gephi 0.9.1. This behaviour would actually make sense in some use cases. Say that you create a node list and an edge list on separate occasions, and that the node list only includes a subset of the nodes listed in the edge list (for whatever reason; I have been in this situation in the past, but it is a bit too long ago to remember exactly why), and you really just want to show that subset. Also assume that we have already imported our node list. Would it not make more sense that only those edges get imported that have matching node IDs in the already imported node list?

In any case, I don't see this as a major problem, but it is somewhat counterintuitive that the edge list importer will still create missing nodes even if you leave the box unchecked. Also, as I mentioned in the above, it is a break with how it used to work in Gephi 0.9.1, but I guess that the logic of importing data changed quite a bit since you overhauled that system.

@WouterSpekkink
Copy link
Author

If you want to keep things as is, it would make sense to grey out the checkbox for creating missing nodes, just to indicate that this option has no effect when importing an edge list.

@eduramiba
Copy link
Member

Right, before 0.9.2, spreadsheet import didn't use the standard Import API in Gephi. That made the create missing nodes option possible (but had many other disadvantages such as no possibility to show warnings in the import report, etc).

I think it's useful to be able to discard some edges based on their nodes not being present in the current graph, so we will have to consider possible solutions (a workaround is deleting them manually in data lab after import).

Maybe a new feature during import report where you can cross the import container nodes/edges with the graph and discard everything that is not in the intersection.

About disabling the Create missing nodes if the container has no missing nodes, yeah that's a very good and simple idea we should implement for 0.9.3, to reduce possible confusion.

@isovector
Copy link

This is extremely confusing behavior, and I spent the last hour debugging it.

@mbastian
Copy link
Member

mbastian commented Dec 29, 2021

I've implemented this small UI fix. The checkbox is disabled when no missing nodes were found. Hope this will reduce confusion, thank you! It will be included in the 0.9.3 release.

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

No branches or pull requests

4 participants