Skip to content

Conversation

@josenavas
Copy link
Contributor

This PR adds methods to retrieve all the ancestors and descendants of a given artifact represented in a networkx directed graph in which the nodes are the artifacts themselves.

This is needed for the interface changes that @squirrelo is working on as well as for being able to propagate the status of the artifacts.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the if statement below, edge_list here should be optional and set to None by default in the function definition.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, the if statement is specifically for the case in which the list is empty, but it is not an optional parameter.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, can you add a note to that effect? That was not clear from the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@squirrelo
Copy link
Contributor

Couple comments

@squirrelo
Copy link
Contributor

One more observation: has this been tested for raw data or others that can possibly be shared with multiple prep templates? What happens if I have a raw data containing artifact that is shared with 3 prep templates, and then call descendants? Looking at this, it will give the graphs for all files made as part of the three prep templates, which may not be what we want depending on the use.

@josenavas
Copy link
Contributor Author

Artifacts can't be shared between studies.

@squirrelo
Copy link
Contributor

Ah, the ability to use the same Raw Data between multiple studies is gone? Cool.

@josenavas
Copy link
Contributor Author

Yeah, after seeing how the people work with the system, we realize that sharing "raw data" is not useful, as usually you have to modify it by either adding more lanes or removing some existing lanes.

In the new interface, however, we should allow users to import the files from the other raw data objects, but not the raw data object itself. Does it make sense? I was planning on doing that on my last PR, but the amount of interface changes needed were not worth given the refactor that you're currently doing.

BTW, comments addressed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is for the case when the list is empty, this should probably be set to check that. Right now anything can be passed as the edge_list and it will just return the single node graph.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elaborate? this is the pythonic way of testing if a list is empty or not.

@squirrelo
Copy link
Contributor

👍 assuming tests pass.

@josenavas
Copy link
Contributor Author

@mortonjt @ElDeveloper @antgonza available for a review in here?

@antgonza
Copy link
Member

👍 waiting for tests ...

@squirrelo
Copy link
Contributor

tests are good, merging.

squirrelo added a commit that referenced this pull request Dec 16, 2015
@squirrelo squirrelo merged commit 88bbf7a into qiita-spots:artifact Dec 16, 2015
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

Successfully merging this pull request may close these issues.

3 participants