cwlviewer
cwlviewer copied to clipboard
Improve handling of versioning for workflows
Currently on /workflows every version of the workflow is shown. Over time this can mean large numbers of versions for a single workflow.
Ideally they would be collapsed to the most popular (or master) version and have + x other versions with a dropdown or list in order to not clutter the table.
These other versions could also be shown on the main workflow page.
Query from the Wiki (in case we decide to archive that page): https://github.com/common-workflow-language/cwlviewer/wiki/MongoDB-Queries
This is a page to design MongoDB queries for common-workflow-language/cwlviewer#117
Gets, where retrievedFrom.repoUrl and retrievedFrom.path are the same, the last instance of a workflow (random, no real defined order)
db.workflow.aggregate(
[
{
$group: {
_id: {"retrievedFrom.repoUrl": "$retrievedFrom.repoUrl", "retrievedFrom.path": "$retrievedFrom.path"},
workflow: { '$last': '$$ROOT' },
versions: { '$addToSet': '$retrievedFrom.branch' }
}
}
]
)
TODO: Brainstorm criteria for which 'main' version to use, e.g. default to 'master' if it exists, otherwise a branch name over a commit ID etc