Skip to content

Dependencies: import only once #5

@dirkroorda

Description

@dirkroorda

When resolving dependencies, dependent files should be imported only once, otherwise it may cause siginificant overhead. It also prevents problems with cyclic dependencies, e.g. when one file has the regions and edges, and another the nodes.

By the way: when you feed the files in the right order, dependency information does not have to be given in de annotation files.
So if your files are an acyclic graph with respect to dependency, you can just feed them in the right order without any dependency statements.

Nevertheless it is better to be able to state dependencies correctly without incurring performance penalties.

Currently graf-python works in such a way that when A is dependent on B and B on C, it is not necessary to state the dependency of A on C.
To me this seems natural, and I hope this will not be changed when you modify the dependency handling.

Here is a LAF resource with the kind of dependencies that led me to write this issue.
https://www.dropbox.com/sh/om42p6ai691eo52/h2g0yItKvy
I have truncated everything to the first 100 nodes to keep everything managable.
I also add a script I used to call graf-python on this resource.

By the way: on
https://graf-python.readthedocs.org/en/latest/Parsing%20GrAF.html
it says:
for node in graph.nodes():
But that should be
for node in graph.nodes:

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions