-
Notifications
You must be signed in to change notification settings - Fork 683
Data lineage channel factories #6003
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: jorgee <[email protected]>
Signed-off-by: jorgee <[email protected]>
✅ Deploy Preview for nextflow-docs-staging canceled.
|
I think we can have a nice unification of the CLI and programmatic API here Viewing a single LID:
Querying a collection of LIDs:
It might also make sense to refactor Finally, I think that |
Signed-off-by: jorgee <[email protected]>
Signed-off-by: jorgee <[email protected]>
I have pushed what I showed today.
|
future.exceptionally(this.&handlerException) | ||
} | ||
|
||
static DataflowWriteChannel queryLineage(String queryString) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just use a Map here instead of query string. I would apply the same change to the find
command as well. There is no need to add the extra complexity of URL encoding
@@ -381,7 +381,7 @@ class Session implements ISession { | |||
this.dag = new DAG() | |||
|
|||
// -- init output dir | |||
this.outputDir = FileHelper.toCanonicalPath(config.outputDir ?: 'results') | |||
this.outputDir = FileHelper.toCanonicalPath(config.outputDir ?: config.navigate('params.outdir') ?: 'results') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep this PR focused on the channel factories, we can address publishDir support separately
return filePattern instanceof QueryablePath && (filePattern as QueryablePath).hasQuery() | ||
} | ||
|
||
private boolean applyQueryablePath0(QueryablePath path) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to add query support to fromPath
because it will already be supported through queryLineage
. Besides I would like to get away from using URI query params everywhere.
The queryLineage
factory should return a channel of metadata objects, so you can chain it with a map
operator to extract the actual files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems one of the use cases that would be nice to support is to get outputs annotated with some metadata. This is only possible to do with a query, so I implemented it within fromPath
and queryLineage
to see what's the best option.
I had doubts about what queryLineage
should return. Command find
is returning the lids, not the objects. I returned the LinPaths
thinking in the mentioned use case. If the LinPath
is a FileOutput
, it accesses the real file, checking the integrity. If we return the FileOutput
description, users must get the path and check the integrity.
Maybe the best is returning the lid, letting the user do what they want according to the query. If it is cast to Path
, it will be converted to a LinPath
, and if it is passed to the lineage
function, it will be converted to the object.
Initial fromLineage factory implementation