Commit 794f6626 authored by Samuel GAIST's avatar Samuel GAIST

[commands] Refactored all assets to use new initializer helper method

parent 1aa9b162
......@@ -334,16 +334,20 @@ def algorithms(ctx):
ctx.meta["diff_fields"] = ["declaration", "code", "description"]
algorithms.command(name="list")(commands.command("list"))
algorithms.command(name="path")(commands.command("path"))
algorithms.command(name="edit")(commands.command("edit"))
algorithms.command(name="check")(commands.command("check"))
algorithms.command(name="status")(commands.command("status"))
algorithms.command(name="create")(commands.command("create"))
algorithms.command(name="version")(commands.command("version"))
algorithms.command(name="fork")(commands.command("fork"))
algorithms.command(name="rm")(commands.command("rm"))
algorithms.command(name="diff")(commands.command("diff"))
CMD_LIST = [
"list",
"path",
"edit",
"check",
"status",
"create",
"version",
"fork",
"rm",
"diff",
]
commands.initialise_asset_commands(algorithms, CMD_LIST)
@algorithms.command()
......
......@@ -658,15 +658,20 @@ def databases(ctx):
ctx.meta["diff_fields"] = ["declaration", "code", "description"]
databases.command(name="list")(commands.command("list"))
databases.command(name="path")(commands.command("path"))
databases.command(name="edit")(commands.command("edit"))
databases.command(name="check")(commands.command("check"))
databases.command(name="status")(commands.command("status"))
databases.command(name="create")(commands.command("create"))
databases.command(name="version")(commands.command("version"))
databases.command(name="rm")(commands.command("rm_local"))
databases.command(name="diff")(commands.command("diff"))
CMD_LIST = [
"list",
"path",
"edit",
"check",
"status",
"create",
"version",
"fork",
("rm", "rm_local"),
"diff",
]
commands.initialise_asset_commands(databases, CMD_LIST)
@databases.command()
......
......@@ -141,16 +141,20 @@ def dataformats(ctx):
ctx.meta["diff_fields"] = ["declaration", "description"]
dataformats.command(name="list")(commands.command("list"))
dataformats.command(name="path")(commands.command("path"))
dataformats.command(name="edit")(commands.command("edit"))
dataformats.command(name="check")(commands.command("check"))
dataformats.command(name="status")(commands.command("status"))
dataformats.command(name="create")(commands.command("create"))
dataformats.command(name="version")(commands.command("version"))
dataformats.command(name="fork")(commands.command("fork"))
dataformats.command(name="rm")(commands.command("rm"))
dataformats.command(name="diff")(commands.command("diff"))
CMD_LIST = [
"list",
"path",
"edit",
"check",
"status",
"create",
"version",
"fork",
"rm",
"diff",
]
commands.initialise_asset_commands(dataformats, CMD_LIST)
@dataformats.command()
......
......@@ -691,14 +691,9 @@ def experiments(ctx):
ctx.meta["diff_fields"] = ["declaration", "description"]
experiments.command(name="list")(commands.command("list"))
experiments.command(name="path")(commands.command("path"))
experiments.command(name="edit")(commands.command("edit"))
experiments.command(name="check")(commands.command("check"))
experiments.command(name="status")(commands.command("status"))
experiments.command(name="fork")(commands.command("fork"))
experiments.command(name="rm")(commands.command("rm"))
experiments.command(name="diff")(commands.command("diff"))
CMD_LIST = ["list", "path", "edit", "check", "status", "fork", "rm", "diff"]
commands.initialise_asset_commands(experiments, CMD_LIST)
@experiments.command()
......
......@@ -174,16 +174,20 @@ def libraries(ctx):
ctx.meta["diff_fields"] = ["declaration", "code", "description"]
libraries.command(name="list")(commands.command("list"))
libraries.command(name="path")(commands.command("path"))
libraries.command(name="edit")(commands.command("edit"))
libraries.command(name="check")(commands.command("check"))
libraries.command(name="status")(commands.command("status"))
libraries.command(name="create")(commands.command("create"))
libraries.command(name="version")(commands.command("version"))
libraries.command(name="fork")(commands.command("fork"))
libraries.command(name="rm")(commands.command("rm"))
libraries.command(name="diff")(commands.command("diff"))
CMD_LIST = [
"list",
"path",
"edit",
"check",
"status",
"create",
"version",
"fork",
"rm",
"diff",
]
commands.initialise_asset_commands(libraries, CMD_LIST)
@libraries.command()
......
......@@ -101,15 +101,19 @@ def plotterparameters(ctx):
ctx.meta["asset_type"] = "plotterparameter"
plotterparameters.command(name="list")(commands.command("list"))
plotterparameters.command(name="path")(commands.command("path"))
plotterparameters.command(name="edit")(commands.command("edit"))
plotterparameters.command(name="check")(commands.command("check"))
plotterparameters.command(name="status")(commands.command("status"))
plotterparameters.command(name="create")(commands.command("create"))
plotterparameters.command(name="version")(commands.command("version"))
plotterparameters.command(name="fork")(commands.command("fork"))
plotterparameters.command(name="rm")(commands.command("rm_local"))
CMD_LIST = [
"list",
"path",
"edit",
"check",
"status",
"create",
"version",
"fork",
("rm", "rm_local"),
]
commands.initialise_asset_commands(plotterparameters, CMD_LIST)
@plotterparameters.command()
......
......@@ -317,15 +317,19 @@ def plotters(ctx):
ctx.meta["asset_type"] = "plotter"
plotters.command(name="list")(commands.command("list"))
plotters.command(name="path")(commands.command("path"))
plotters.command(name="edit")(commands.command("edit"))
plotters.command(name="check")(commands.command("check"))
plotters.command(name="status")(commands.command("status"))
plotters.command(name="create")(commands.command("create"))
plotters.command(name="version")(commands.command("version"))
plotters.command(name="fork")(commands.command("fork"))
plotters.command(name="rm")(commands.command("rm_local"))
CMD_LIST = [
"list",
"path",
"edit",
"check",
"status",
"create",
"version",
"fork",
("rm", "rm_local"),
]
commands.initialise_asset_commands(plotters, CMD_LIST)
@plotters.command()
......
......@@ -56,12 +56,15 @@ def protocoltemplates(ctx):
ctx.meta["asset_type"] = "protocoltemplate"
protocoltemplates.command(name="list")(commands.command("list"))
protocoltemplates.command(name="path")(commands.command("path"))
protocoltemplates.command(name="edit")(commands.command("edit"))
protocoltemplates.command(name="check")(commands.command("check"))
protocoltemplates.command(name="status")(commands.command("status"))
protocoltemplates.command(name="create")(commands.command("create"))
protocoltemplates.command(name="version")(commands.command("version"))
protocoltemplates.command(name="fork")(commands.command("fork"))
protocoltemplates.command(name="rm")(commands.command("rm_local"))
CMD_LIST = [
"list",
"path",
"edit",
"check",
"create",
"version",
"fork",
("rm", "rm_local"),
]
commands.initialise_asset_commands(protocoltemplates, CMD_LIST)
......@@ -52,16 +52,20 @@ def toolchains(ctx):
ctx.meta["diff_fields"] = ["declaration", "description"]
toolchains.command(name="list")(commands.command("list"))
toolchains.command(name="path")(commands.command("path"))
toolchains.command(name="edit")(commands.command("edit"))
toolchains.command(name="check")(commands.command("check"))
toolchains.command(name="status")(commands.command("status"))
toolchains.command(name="create")(commands.command("create"))
toolchains.command(name="version")(commands.command("version"))
toolchains.command(name="fork")(commands.command("fork"))
toolchains.command(name="rm")(commands.command("rm"))
toolchains.command(name="diff")(commands.command("diff"))
CMD_LIST = [
"list",
"path",
"edit",
"check",
"status",
"create",
"version",
"fork",
"rm",
"diff",
]
commands.initialise_asset_commands(toolchains, CMD_LIST)
@toolchains.command()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment