From eb611a78dfbdf119a96433c56bb18d7b5c9252d4 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 28 Sep 2023 16:15:11 +0200 Subject: [PATCH 1/7] Created conf for print main usage #TASK-5055 --- opencga-app/pom.xml | 1 + .../opencb/opencga/app/cli/conf/Category.java | 56 +++++++++++++++ .../opencga/app/cli/conf/Configuration.java | 69 +++++++++++++++++++ .../opencb/opencga/app/cli/conf/Usage.java | 32 +++++++++ .../opencga/app/cli/main/OpencgaMain.java | 6 +- .../main/custom/CustomCliOptionsParser.java | 41 ++++++++++- .../opencga/app/cli/main/shell/Shell.java | 13 ++-- .../app/cli/main/utils/CommandLineUtils.java | 7 +- opencga-app/src/main/resources/usage.yml | 29 ++++++++ 9 files changed, 243 insertions(+), 11 deletions(-) create mode 100644 opencga-app/src/main/java/org/opencb/opencga/app/cli/conf/Category.java create mode 100644 opencga-app/src/main/java/org/opencb/opencga/app/cli/conf/Configuration.java create mode 100644 opencga-app/src/main/java/org/opencb/opencga/app/cli/conf/Usage.java create mode 100644 opencga-app/src/main/resources/usage.yml diff --git a/opencga-app/pom.xml b/opencga-app/pom.xml index fe7211f3a68..539781cf264 100644 --- a/opencga-app/pom.xml +++ b/opencga-app/pom.xml @@ -346,6 +346,7 @@ + diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/conf/Category.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/conf/Category.java new file mode 100644 index 00000000000..4ee5226b408 --- /dev/null +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/conf/Category.java @@ -0,0 +1,56 @@ +package org.opencb.opencga.app.cli.conf; + +import java.util.Arrays; + +public class Category { + + private String name; + private String description; + private String[] options; + + public Category() { + } + + public Category(String name, String description, String[] options) { + this.name = name; + this.description = description; + this.options = options; + } + + @Override + public String toString() { + final StringBuilder sb = new StringBuilder("Category{"); + sb.append("name='").append(name).append('\''); + sb.append(", description='").append(description).append('\''); + sb.append(", options=").append(Arrays.toString(options)); + sb.append('}'); + return sb.toString(); + } + + public String getName() { + return name; + } + + public Category setName(String name) { + this.name = name; + return this; + } + + public String getDescription() { + return description; + } + + public Category setDescription(String description) { + this.description = description; + return this; + } + + public String[] getOptions() { + return options; + } + + public Category setOptions(String[] options) { + this.options = options; + return this; + } +} diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/conf/Configuration.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/conf/Configuration.java new file mode 100644 index 00000000000..155dd6695a6 --- /dev/null +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/conf/Configuration.java @@ -0,0 +1,69 @@ +package org.opencb.opencga.app.cli.conf; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.File; +import java.io.IOException; + +public class Configuration { + /** + * The instance of Usage that stores the "usage" information + */ + private static Usage usage; + + /** + * LOGGER is an instance of the Logger class so that we can do proper + * logging + */ + private static final Logger logger = LoggerFactory.getLogger(Configuration.class); + + /** + * The instance of Configuration that this Class is storing + */ + private static Configuration instance = null; + + /** + * FILENAME is the file location of the configuration yml file + */ + public static final String FILENAME = "usage.yml"; + + public static Configuration getInstance() { + if (Configuration.instance == null) { + Configuration.instance = new Configuration(); + } + + return Configuration.instance; + } + + private static Usage loadConfiguration() throws IOException { + // Loading the YAML file from the /conf folder + ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); + String appHome = System.getProperty("app.home", System.getenv("OPENCGA_HOME")); + String conf = appHome + "/conf"; + File file = new File(conf + File.separator + FILENAME); + + // Mapping the config from the YAML file to the Configuration class + logger.info("Loading CLI configuration from: " + file.getAbsolutePath()); + ObjectMapper om = new ObjectMapper(new YAMLFactory()); + return om.readValue(file, Usage.class); + } + + public static Usage getUsage() { + if (usage == null) { + try { + usage = loadConfiguration(); + } catch (IOException e) { + logger.error("Loading CLI configuration from: " + FILENAME + " Failed"); + + } + } + return usage; + } + + public static void setUsage(Usage usage) { + Configuration.usage = usage; + } +} diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/conf/Usage.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/conf/Usage.java new file mode 100644 index 00000000000..05623b74d3b --- /dev/null +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/conf/Usage.java @@ -0,0 +1,32 @@ +package org.opencb.opencga.app.cli.conf; + +import java.util.Arrays; + +public class Usage { + + Category[] categories; + + public Usage() { + } + + public Usage(Category[] categories) { + this.categories = categories; + } + + @Override + public String toString() { + final StringBuilder sb = new StringBuilder("Usage{"); + sb.append("categories=").append(Arrays.toString(categories)); + sb.append('}'); + return sb.toString(); + } + + public Category[] getCategories() { + return categories; + } + + public Usage setCategories(Category[] categories) { + this.categories = categories; + return this; + } +} diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpencgaMain.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpencgaMain.java index 296b1be2d75..b49256292c6 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpencgaMain.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpencgaMain.java @@ -65,6 +65,8 @@ public static void main(String[] args) { } } + + private static void checkMode(String[] args) { if (ArrayUtils.contains(args, "--shell")) { setMode(Mode.SHELL); @@ -130,7 +132,7 @@ public static void executeShell(String[] args) { } Shell.printShellHeaderMessage(); // Create a shell executor instance - shell = new Shell(options); + shell = new Shell(options, new OpenCgaCompleterImpl(), new CommandProcessor()); logger.debug("Shell created "); // Launch execute command to begin the execution shell.execute(); @@ -162,7 +164,7 @@ public static String[] parseCliParams(String[] args) { } logger.debug("CLI parsed params ::: " + CommandLineUtils.argsToString(args)); String shortcut = CommandLineUtils.getShortcut(args); - args = CommandLineUtils.processShortCuts(args); + args = CommandLineUtils.processShortCuts(args, new OpencgaCliOptionsParser()); if (args != null) { logger.debug("Process shortcut result ::: " + CommandLineUtils.argsToString(args)); } else { diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/custom/CustomCliOptionsParser.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/custom/CustomCliOptionsParser.java index c0d30753a2f..dfe083f70e3 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/custom/CustomCliOptionsParser.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/custom/CustomCliOptionsParser.java @@ -7,11 +7,16 @@ import org.opencb.opencga.app.cli.CliOptionsParser; import org.opencb.opencga.app.cli.GeneralCliOptions; import org.opencb.opencga.app.cli.admin.AdminCliOptionsParser; +import org.opencb.opencga.app.cli.conf.Category; +import org.opencb.opencga.app.cli.conf.Configuration; +import org.opencb.opencga.app.cli.conf.Usage; import org.opencb.opencga.app.cli.main.OpencgaMain; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.*; +import java.util.HashMap; +import java.util.List; +import java.util.Map; public class CustomCliOptionsParser extends CliOptionsParser { @@ -67,6 +72,7 @@ public void printUsage() { } else { PrintUtils.println(PrintUtils.getKeyValueAsFormattedString("Usage:", " " + getPrefix() + "[-h|--help] [--shell] [--host] [--version] [options]")); } + System.err.println(); printMainUsage(); System.err.println(); @@ -97,6 +103,37 @@ private String getPrefix() { return "opencga.sh "; } + @Override + protected void printMainUsage() { + Usage usage = Configuration.getUsage(); + Category[] categories = usage.getCategories(); + for (Category category : categories) { + String[] options = category.getOptions(); + PrintUtils.println(PrintUtils.format(category.getDescription(), PrintUtils.Color.GREEN)); + for (int i = 0; i < options.length; i++) { + for (String command : jCommander.getCommands().keySet()) { + if (command.equals(options[i])) { + PrintUtils.printCommandHelpFormattedString(command, jCommander.getCommandDescription(command)); + } + } + } + System.err.println(); + } + printOpencgaCommands(); + } + + private void printOpencgaCommands() { + Map opencgaCommands = getOpencgaCommands(); + if (!OpencgaMain.isShellMode()) { + PrintUtils.println(PrintUtils.format("Opencga options:", PrintUtils.Color.GREEN)); + } else { + PrintUtils.println(PrintUtils.format("Opencga commands:", PrintUtils.Color.GREEN)); + } + for (Map.Entry entry : opencgaCommands.entrySet()) { + PrintUtils.printCommandHelpFormattedString(entry.getKey().toString(), entry.getValue().toString()); + } + } + /* @Override protected void printMainUsage() { Set analysisCommands = new HashSet<>(Arrays.asList("alignments", "variant", "clinical")); @@ -153,7 +190,7 @@ protected void printMainUsage() { for (Map.Entry entry : opencgaCommands.entrySet()) { PrintUtils.printCommandHelpFormattedString(entry.getKey().toString(), entry.getValue().toString()); } - } + }*/ private Map getOpencgaCommands() { Map h = new HashMap<>(); diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/shell/Shell.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/shell/Shell.java index 02ff4bc4321..00f8de6d68f 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/shell/Shell.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/shell/Shell.java @@ -11,6 +11,7 @@ import org.opencb.commons.utils.PrintUtils; import org.opencb.opencga.app.cli.GeneralCliOptions; import org.opencb.opencga.app.cli.main.OpenCgaCompleterImpl; +import org.opencb.opencga.app.cli.main.OpencgaCliOptionsParser; import org.opencb.opencga.app.cli.main.OpencgaMain; import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor; import org.opencb.opencga.app.cli.main.processors.CommandProcessor; @@ -36,13 +37,17 @@ public class Shell extends OpencgaCommandExecutor { // Create a command processor to process all the shell commands - private final CommandProcessor processor = new CommandProcessor(); + private final CommandProcessor processor; private LineReader lineReader = null; private Terminal terminal = null; private String host = null; - public Shell(GeneralCliOptions.CommonCommandOptions options) throws CatalogAuthenticationException { + private Completer completer; + + public Shell(GeneralCliOptions.CommonCommandOptions options, Completer completer, CommandProcessor processor) throws CatalogAuthenticationException { super(options); + this.completer=completer; + this.processor=processor; if (options.host != null) { host = options.host; } @@ -104,7 +109,7 @@ private LineReader getTerminal() { reader = LineReaderBuilder.builder() .terminal(terminal) .highlighter(new DefaultHighlighter()) - .history(defaultHistory).completer(new OpenCgaCompleterImpl()) + .history(defaultHistory).completer(this.completer) .build(); } catch (Exception e) { CommandLineUtils.error("Failed to create terminal ", e); @@ -209,7 +214,7 @@ public String[] parseParams(String[] args) throws CatalogAuthenticationException return args; } } - return CommandLineUtils.processShortCuts(args); + return CommandLineUtils.processShortCuts(args, new OpencgaCliOptionsParser()); } diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/utils/CommandLineUtils.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/utils/CommandLineUtils.java index 4454887584b..b0f83ec3886 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/utils/CommandLineUtils.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/utils/CommandLineUtils.java @@ -4,6 +4,7 @@ import org.opencb.commons.utils.PrintUtils; import org.opencb.opencga.app.cli.main.OpencgaCliOptionsParser; import org.opencb.opencga.app.cli.main.OpencgaMain; +import org.opencb.opencga.app.cli.main.custom.CustomCliOptionsParser; import org.opencb.opencga.core.common.GitRepositoryState; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -61,8 +62,8 @@ public static void error(String message, Exception e) { } } - public static String[] processShortCuts(String[] args) { - OpencgaCliOptionsParser cliOptionsParser = new OpencgaCliOptionsParser(); + public static String[] processShortCuts(String[] args, CustomCliOptionsParser parser) { + switch (getShortcut(args)) { case "login": return LoginUtils.parseLoginCommand(args); @@ -78,7 +79,7 @@ public static String[] processShortCuts(String[] args) { } } try { - cliOptionsParser.printUsage(args); + parser.printUsage(args); } catch (Exception e) { // malformed command return args; diff --git a/opencga-app/src/main/resources/usage.yml b/opencga-app/src/main/resources/usage.yml new file mode 100644 index 00000000000..a3451aea6a7 --- /dev/null +++ b/opencga-app/src/main/resources/usage.yml @@ -0,0 +1,29 @@ +categories: + - name: catalog + description: "Catalog commands:" + options: + - users + - projects + - studies + - files + - jobs + - individuals + - families + - panels + - samples + - cohorts + - meta + - name: Analysis + description: "Analysis commands:" + options: + - alignments + - variant + - clinical + - name: Operation + description: "Operation commands:" + options: + - operations + - name: Administrator + description: "Administrator commands:" + options: + - admin From c65fae631cfc2d7e237bc579fff7ba3c5122f187 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Fri, 13 Oct 2023 12:21:37 +0200 Subject: [PATCH 2/7] CLI: Autogenerated classes #TASK-5055 --- .../opencga/app/cli/main/OpenCgaCompleter.java | 2 +- .../app/cli/main/OpencgaCliOptionsParser.java | 2 +- opencga-client/src/main/R/R/Admin-methods.R | 2 +- .../src/main/R/R/Alignment-methods.R | 2 +- opencga-client/src/main/R/R/AllGenerics.R | 18 +++++++++--------- opencga-client/src/main/R/R/Clinical-methods.R | 4 ++-- opencga-client/src/main/R/R/Cohort-methods.R | 4 ++-- opencga-client/src/main/R/R/Family-methods.R | 4 ++-- opencga-client/src/main/R/R/File-methods.R | 4 ++-- opencga-client/src/main/R/R/GA4GH-methods.R | 2 +- .../src/main/R/R/Individual-methods.R | 2 +- opencga-client/src/main/R/R/Job-methods.R | 4 ++-- opencga-client/src/main/R/R/Meta-methods.R | 2 +- .../src/main/R/R/Operation-methods.R | 2 +- opencga-client/src/main/R/R/Panel-methods.R | 2 +- opencga-client/src/main/R/R/Project-methods.R | 4 ++-- opencga-client/src/main/R/R/Sample-methods.R | 4 ++-- opencga-client/src/main/R/R/Study-methods.R | 4 ++-- opencga-client/src/main/R/R/User-methods.R | 4 ++-- opencga-client/src/main/R/R/Variant-methods.R | 2 +- .../client/rest/clients/AdminClient.java | 4 ++-- .../client/rest/clients/AlignmentClient.java | 4 ++-- .../rest/clients/ClinicalAnalysisClient.java | 4 ++-- .../client/rest/clients/CohortClient.java | 4 ++-- .../rest/clients/DiseasePanelClient.java | 4 ++-- .../client/rest/clients/FamilyClient.java | 4 ++-- .../client/rest/clients/FileClient.java | 4 ++-- .../client/rest/clients/GA4GHClient.java | 4 ++-- .../client/rest/clients/IndividualClient.java | 4 ++-- .../opencga/client/rest/clients/JobClient.java | 4 ++-- .../client/rest/clients/MetaClient.java | 4 ++-- .../client/rest/clients/ProjectClient.java | 4 ++-- .../client/rest/clients/SampleClient.java | 4 ++-- .../client/rest/clients/StudyClient.java | 4 ++-- .../client/rest/clients/UserClient.java | 4 ++-- .../client/rest/clients/VariantClient.java | 4 ++-- .../rest/clients/VariantOperationClient.java | 4 ++-- opencga-client/src/main/javascript/Admin.js | 2 +- .../src/main/javascript/Alignment.js | 2 +- .../src/main/javascript/ClinicalAnalysis.js | 2 +- opencga-client/src/main/javascript/Cohort.js | 2 +- .../src/main/javascript/DiseasePanel.js | 2 +- opencga-client/src/main/javascript/Family.js | 2 +- opencga-client/src/main/javascript/File.js | 2 +- opencga-client/src/main/javascript/GA4GH.js | 2 +- .../src/main/javascript/Individual.js | 2 +- opencga-client/src/main/javascript/Job.js | 2 +- opencga-client/src/main/javascript/Meta.js | 2 +- opencga-client/src/main/javascript/Project.js | 2 +- opencga-client/src/main/javascript/Sample.js | 2 +- opencga-client/src/main/javascript/Study.js | 2 +- opencga-client/src/main/javascript/User.js | 2 +- opencga-client/src/main/javascript/Variant.js | 2 +- .../src/main/javascript/VariantOperation.js | 2 +- .../pyopencga/rest_clients/admin_client.py | 4 ++-- .../pyopencga/rest_clients/alignment_client.py | 4 ++-- .../rest_clients/clinical_analysis_client.py | 4 ++-- .../pyopencga/rest_clients/cohort_client.py | 4 ++-- .../rest_clients/disease_panel_client.py | 4 ++-- .../pyopencga/rest_clients/family_client.py | 4 ++-- .../pyopencga/rest_clients/file_client.py | 4 ++-- .../pyopencga/rest_clients/ga4gh_client.py | 4 ++-- .../rest_clients/individual_client.py | 4 ++-- .../pyopencga/rest_clients/job_client.py | 4 ++-- .../pyopencga/rest_clients/meta_client.py | 4 ++-- .../pyopencga/rest_clients/project_client.py | 4 ++-- .../pyopencga/rest_clients/sample_client.py | 4 ++-- .../pyopencga/rest_clients/study_client.py | 4 ++-- .../pyopencga/rest_clients/user_client.py | 4 ++-- .../pyopencga/rest_clients/variant_client.py | 4 ++-- .../rest_clients/variant_operation_client.py | 4 ++-- .../server/generator/config/Options.java | 10 ++++++++++ .../writers/cli/ParserCliRestApiWriter.java | 6 +++--- .../src/main/resources/cli-config.yaml | 1 + 74 files changed, 136 insertions(+), 125 deletions(-) diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpenCgaCompleter.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpenCgaCompleter.java index ee9f603f739..f389a3aa97d 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpenCgaCompleter.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpenCgaCompleter.java @@ -1,5 +1,5 @@ /* -* Copyright 2015-2023-09-12 OpenCB +* Copyright 2015-2023-10-13 OpenCB * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpencgaCliOptionsParser.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpencgaCliOptionsParser.java index 832d5638d49..362952296fd 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpencgaCliOptionsParser.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpencgaCliOptionsParser.java @@ -1,5 +1,5 @@ /* -* Copyright 2015-2023-09-12 OpenCB +* Copyright 2015-2023-10-13 OpenCB * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/opencga-client/src/main/R/R/Admin-methods.R b/opencga-client/src/main/R/R/Admin-methods.R index f36ae979df6..1191ed5f8ec 100644 --- a/opencga-client/src/main/R/R/Admin-methods.R +++ b/opencga-client/src/main/R/R/Admin-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-09-12 +# Autogenerated on: 2023-10-13 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/R/R/Alignment-methods.R b/opencga-client/src/main/R/R/Alignment-methods.R index 7f1a6a2d745..d063e05178c 100644 --- a/opencga-client/src/main/R/R/Alignment-methods.R +++ b/opencga-client/src/main/R/R/Alignment-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-09-12 +# Autogenerated on: 2023-10-13 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/R/R/AllGenerics.R b/opencga-client/src/main/R/R/AllGenerics.R index 5756f579584..9a97a861e38 100644 --- a/opencga-client/src/main/R/R/AllGenerics.R +++ b/opencga-client/src/main/R/R/AllGenerics.R @@ -1,31 +1,31 @@ # ############################################################################## ## UserClient -setGeneric("userClient", function(OpencgaR, filterId, user, users, endpointName, params=NULL, ...) +setGeneric("userClient", function(OpencgaR, users, filterId, user, endpointName, params=NULL, ...) standardGeneric("userClient")) # ############################################################################## ## ProjectClient -setGeneric("projectClient", function(OpencgaR, projects, project, endpointName, params=NULL, ...) +setGeneric("projectClient", function(OpencgaR, project, projects, endpointName, params=NULL, ...) standardGeneric("projectClient")) # ############################################################################## ## StudyClient -setGeneric("studyClient", function(OpencgaR, study, group, variableSet, studies, members, templateId, endpointName, params=NULL, ...) +setGeneric("studyClient", function(OpencgaR, variableSet, study, group, members, studies, templateId, endpointName, params=NULL, ...) standardGeneric("studyClient")) # ############################################################################## ## FileClient -setGeneric("fileClient", function(OpencgaR, file, files, folder, members, annotationSet, endpointName, params=NULL, ...) +setGeneric("fileClient", function(OpencgaR, file, folder, annotationSet, members, files, endpointName, params=NULL, ...) standardGeneric("fileClient")) # ############################################################################## ## JobClient -setGeneric("jobClient", function(OpencgaR, members, job, jobs, endpointName, params=NULL, ...) +setGeneric("jobClient", function(OpencgaR, members, jobs, job, endpointName, params=NULL, ...) standardGeneric("jobClient")) # ############################################################################## ## SampleClient -setGeneric("sampleClient", function(OpencgaR, sample, members, annotationSet, samples, endpointName, params=NULL, ...) +setGeneric("sampleClient", function(OpencgaR, members, samples, annotationSet, sample, endpointName, params=NULL, ...) standardGeneric("sampleClient")) # ############################################################################## @@ -35,12 +35,12 @@ setGeneric("individualClient", function(OpencgaR, members, annotationSet, indivi # ############################################################################## ## FamilyClient -setGeneric("familyClient", function(OpencgaR, families, members, annotationSet, family, endpointName, params=NULL, ...) +setGeneric("familyClient", function(OpencgaR, members, family, families, annotationSet, endpointName, params=NULL, ...) standardGeneric("familyClient")) # ############################################################################## ## CohortClient -setGeneric("cohortClient", function(OpencgaR, members, annotationSet, cohort, cohorts, endpointName, params=NULL, ...) +setGeneric("cohortClient", function(OpencgaR, members, cohorts, annotationSet, cohort, endpointName, params=NULL, ...) standardGeneric("cohortClient")) # ############################################################################## @@ -60,7 +60,7 @@ setGeneric("variantClient", function(OpencgaR, endpointName, params=NULL, ...) # ############################################################################## ## ClinicalClient -setGeneric("clinicalClient", function(OpencgaR, interpretation, interpretations, clinicalAnalysis, clinicalAnalyses, members, endpointName, params=NULL, ...) +setGeneric("clinicalClient", function(OpencgaR, clinicalAnalyses, members, interpretations, interpretation, clinicalAnalysis, endpointName, params=NULL, ...) standardGeneric("clinicalClient")) # ############################################################################## diff --git a/opencga-client/src/main/R/R/Clinical-methods.R b/opencga-client/src/main/R/R/Clinical-methods.R index 5d84fa14614..773d989a9c3 100644 --- a/opencga-client/src/main/R/R/Clinical-methods.R +++ b/opencga-client/src/main/R/R/Clinical-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-09-12 +# Autogenerated on: 2023-10-13 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -58,7 +58,7 @@ #' [*]: Required parameter #' @export -setMethod("clinicalClient", "OpencgaR", function(OpencgaR, interpretation, interpretations, clinicalAnalysis, clinicalAnalyses, members, endpointName, params=NULL, ...) { +setMethod("clinicalClient", "OpencgaR", function(OpencgaR, clinicalAnalyses, members, interpretations, interpretation, clinicalAnalysis, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/analysis/clinical/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/Cohort-methods.R b/opencga-client/src/main/R/R/Cohort-methods.R index d192d6feec1..5aae6fd0d8d 100644 --- a/opencga-client/src/main/R/R/Cohort-methods.R +++ b/opencga-client/src/main/R/R/Cohort-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-09-12 +# Autogenerated on: 2023-10-13 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -39,7 +39,7 @@ #' [*]: Required parameter #' @export -setMethod("cohortClient", "OpencgaR", function(OpencgaR, members, annotationSet, cohort, cohorts, endpointName, params=NULL, ...) { +setMethod("cohortClient", "OpencgaR", function(OpencgaR, members, cohorts, annotationSet, cohort, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/cohorts/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/Family-methods.R b/opencga-client/src/main/R/R/Family-methods.R index c582b23a93a..171ef32e552 100644 --- a/opencga-client/src/main/R/R/Family-methods.R +++ b/opencga-client/src/main/R/R/Family-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-09-12 +# Autogenerated on: 2023-10-13 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -38,7 +38,7 @@ #' [*]: Required parameter #' @export -setMethod("familyClient", "OpencgaR", function(OpencgaR, families, members, annotationSet, family, endpointName, params=NULL, ...) { +setMethod("familyClient", "OpencgaR", function(OpencgaR, members, family, families, annotationSet, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/families/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/File-methods.R b/opencga-client/src/main/R/R/File-methods.R index f3eeac80df2..863362a0fab 100644 --- a/opencga-client/src/main/R/R/File-methods.R +++ b/opencga-client/src/main/R/R/File-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-09-12 +# Autogenerated on: 2023-10-13 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -54,7 +54,7 @@ #' [*]: Required parameter #' @export -setMethod("fileClient", "OpencgaR", function(OpencgaR, file, files, folder, members, annotationSet, endpointName, params=NULL, ...) { +setMethod("fileClient", "OpencgaR", function(OpencgaR, file, folder, annotationSet, members, files, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/files/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/GA4GH-methods.R b/opencga-client/src/main/R/R/GA4GH-methods.R index 639683e171c..f821321ee73 100644 --- a/opencga-client/src/main/R/R/GA4GH-methods.R +++ b/opencga-client/src/main/R/R/GA4GH-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-09-12 +# Autogenerated on: 2023-10-13 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/R/R/Individual-methods.R b/opencga-client/src/main/R/R/Individual-methods.R index 1839f2cb8c9..4c3851ff19d 100644 --- a/opencga-client/src/main/R/R/Individual-methods.R +++ b/opencga-client/src/main/R/R/Individual-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-09-12 +# Autogenerated on: 2023-10-13 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/R/R/Job-methods.R b/opencga-client/src/main/R/R/Job-methods.R index ed70e8df6cf..5350c0cf406 100644 --- a/opencga-client/src/main/R/R/Job-methods.R +++ b/opencga-client/src/main/R/R/Job-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-09-12 +# Autogenerated on: 2023-10-13 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -40,7 +40,7 @@ #' [*]: Required parameter #' @export -setMethod("jobClient", "OpencgaR", function(OpencgaR, members, job, jobs, endpointName, params=NULL, ...) { +setMethod("jobClient", "OpencgaR", function(OpencgaR, members, jobs, job, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/jobs/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/Meta-methods.R b/opencga-client/src/main/R/R/Meta-methods.R index c278a0c47e4..62104d31e40 100644 --- a/opencga-client/src/main/R/R/Meta-methods.R +++ b/opencga-client/src/main/R/R/Meta-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-09-12 +# Autogenerated on: 2023-10-13 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/R/R/Operation-methods.R b/opencga-client/src/main/R/R/Operation-methods.R index 11621e2cf87..3a5060f0bf7 100644 --- a/opencga-client/src/main/R/R/Operation-methods.R +++ b/opencga-client/src/main/R/R/Operation-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-09-12 +# Autogenerated on: 2023-10-13 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/R/R/Panel-methods.R b/opencga-client/src/main/R/R/Panel-methods.R index 20fb425cc31..fc5fbf27505 100644 --- a/opencga-client/src/main/R/R/Panel-methods.R +++ b/opencga-client/src/main/R/R/Panel-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-09-12 +# Autogenerated on: 2023-10-13 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/R/R/Project-methods.R b/opencga-client/src/main/R/R/Project-methods.R index 80d88c4cc79..d4e12d53ed4 100644 --- a/opencga-client/src/main/R/R/Project-methods.R +++ b/opencga-client/src/main/R/R/Project-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-09-12 +# Autogenerated on: 2023-10-13 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -34,7 +34,7 @@ #' [*]: Required parameter #' @export -setMethod("projectClient", "OpencgaR", function(OpencgaR, projects, project, endpointName, params=NULL, ...) { +setMethod("projectClient", "OpencgaR", function(OpencgaR, project, projects, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/projects/create: diff --git a/opencga-client/src/main/R/R/Sample-methods.R b/opencga-client/src/main/R/R/Sample-methods.R index 32e64a3ecc9..ccaa213404a 100644 --- a/opencga-client/src/main/R/R/Sample-methods.R +++ b/opencga-client/src/main/R/R/Sample-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-09-12 +# Autogenerated on: 2023-10-13 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -39,7 +39,7 @@ #' [*]: Required parameter #' @export -setMethod("sampleClient", "OpencgaR", function(OpencgaR, sample, members, annotationSet, samples, endpointName, params=NULL, ...) { +setMethod("sampleClient", "OpencgaR", function(OpencgaR, members, samples, annotationSet, sample, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/samples/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/Study-methods.R b/opencga-client/src/main/R/R/Study-methods.R index a9c9a3c90f8..da33ef1dcda 100644 --- a/opencga-client/src/main/R/R/Study-methods.R +++ b/opencga-client/src/main/R/R/Study-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-09-12 +# Autogenerated on: 2023-10-13 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -46,7 +46,7 @@ #' [*]: Required parameter #' @export -setMethod("studyClient", "OpencgaR", function(OpencgaR, study, group, variableSet, studies, members, templateId, endpointName, params=NULL, ...) { +setMethod("studyClient", "OpencgaR", function(OpencgaR, variableSet, study, group, members, studies, templateId, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/studies/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/User-methods.R b/opencga-client/src/main/R/R/User-methods.R index 2a1d1bc3e82..794dca2d6ac 100644 --- a/opencga-client/src/main/R/R/User-methods.R +++ b/opencga-client/src/main/R/R/User-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-09-12 +# Autogenerated on: 2023-10-13 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -38,7 +38,7 @@ #' [*]: Required parameter #' @export -setMethod("userClient", "OpencgaR", function(OpencgaR, filterId, user, users, endpointName, params=NULL, ...) { +setMethod("userClient", "OpencgaR", function(OpencgaR, users, filterId, user, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/users/login: diff --git a/opencga-client/src/main/R/R/Variant-methods.R b/opencga-client/src/main/R/R/Variant-methods.R index ad760abcd16..6e96f4f0861 100644 --- a/opencga-client/src/main/R/R/Variant-methods.R +++ b/opencga-client/src/main/R/R/Variant-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-09-12 +# Autogenerated on: 2023-10-13 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AdminClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AdminClient.java index 6aad0bc7842..5042001cf15 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AdminClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AdminClient.java @@ -36,7 +36,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-09-12 +* Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -45,7 +45,7 @@ /** * This class contains methods for the Admin webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: admin */ public class AdminClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AlignmentClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AlignmentClient.java index 16c679f642f..bfddd8489e0 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AlignmentClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AlignmentClient.java @@ -40,7 +40,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-09-12 +* Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -49,7 +49,7 @@ /** * This class contains methods for the Alignment webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: analysis/alignment */ public class AlignmentClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ClinicalAnalysisClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ClinicalAnalysisClient.java index 94ab79f677d..ce62a9d1ce7 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ClinicalAnalysisClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ClinicalAnalysisClient.java @@ -51,7 +51,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-09-12 +* Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -60,7 +60,7 @@ /** * This class contains methods for the ClinicalAnalysis webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: analysis/clinical */ public class ClinicalAnalysisClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/CohortClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/CohortClient.java index 2320ca7bbcd..ddb954f196b 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/CohortClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/CohortClient.java @@ -37,7 +37,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-09-12 +* Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -46,7 +46,7 @@ /** * This class contains methods for the Cohort webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: cohorts */ public class CohortClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/DiseasePanelClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/DiseasePanelClient.java index ad9ef470eaa..e452bbc676a 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/DiseasePanelClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/DiseasePanelClient.java @@ -35,7 +35,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-09-12 +* Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -44,7 +44,7 @@ /** * This class contains methods for the DiseasePanel webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: panels */ public class DiseasePanelClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FamilyClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FamilyClient.java index 94b0e7cf66d..c191c23068b 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FamilyClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FamilyClient.java @@ -36,7 +36,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-09-12 +* Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -45,7 +45,7 @@ /** * This class contains methods for the Family webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: families */ public class FamilyClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FileClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FileClient.java index 94eeead7197..3e85a97a6ed 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FileClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FileClient.java @@ -43,7 +43,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-09-12 +* Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -52,7 +52,7 @@ /** * This class contains methods for the File webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: files */ public class FileClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/GA4GHClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/GA4GHClient.java index 48b4524ea7f..85868ed9973 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/GA4GHClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/GA4GHClient.java @@ -27,7 +27,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-09-12 +* Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -36,7 +36,7 @@ /** * This class contains methods for the GA4GH webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: ga4gh */ public class GA4GHClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/IndividualClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/IndividualClient.java index b89c47024df..4c4a6d76a0f 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/IndividualClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/IndividualClient.java @@ -36,7 +36,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-09-12 +* Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -45,7 +45,7 @@ /** * This class contains methods for the Individual webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: individuals */ public class IndividualClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/JobClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/JobClient.java index 7945a8d65cc..acb7fb63958 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/JobClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/JobClient.java @@ -37,7 +37,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-09-12 +* Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -46,7 +46,7 @@ /** * This class contains methods for the Job webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: jobs */ public class JobClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/MetaClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/MetaClient.java index 794c6ad3394..4c1d5711439 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/MetaClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/MetaClient.java @@ -28,7 +28,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-09-12 +* Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -37,7 +37,7 @@ /** * This class contains methods for the Meta webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: meta */ public class MetaClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ProjectClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ProjectClient.java index 317a4af226c..e40a50c41b7 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ProjectClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ProjectClient.java @@ -32,7 +32,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-09-12 +* Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -41,7 +41,7 @@ /** * This class contains methods for the Project webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: projects */ public class ProjectClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/SampleClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/SampleClient.java index 5cbb8f10fd4..c9c9823b6e7 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/SampleClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/SampleClient.java @@ -36,7 +36,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-09-12 +* Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -45,7 +45,7 @@ /** * This class contains methods for the Sample webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: samples */ public class SampleClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/StudyClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/StudyClient.java index 8f018861260..c96cb1ab0d7 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/StudyClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/StudyClient.java @@ -45,7 +45,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-09-12 +* Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -54,7 +54,7 @@ /** * This class contains methods for the Study webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: studies */ public class StudyClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/UserClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/UserClient.java index adb4ce85938..6709592e07d 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/UserClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/UserClient.java @@ -36,7 +36,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-09-12 +* Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -45,7 +45,7 @@ /** * This class contains methods for the User webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: users */ public class UserClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantClient.java index 4801650a0f9..e60a27a74b5 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantClient.java @@ -62,7 +62,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-09-12 +* Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -71,7 +71,7 @@ /** * This class contains methods for the Variant webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: analysis/variant */ public class VariantClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantOperationClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantOperationClient.java index c1ffc952c9d..15ba9cc560c 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantOperationClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantOperationClient.java @@ -50,7 +50,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-09-12 +* Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -59,7 +59,7 @@ /** * This class contains methods for the VariantOperation webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: operation */ public class VariantOperationClient extends AbstractParentClient { diff --git a/opencga-client/src/main/javascript/Admin.js b/opencga-client/src/main/javascript/Admin.js index 2466edfccfd..e2fdc9145aa 100644 --- a/opencga-client/src/main/javascript/Admin.js +++ b/opencga-client/src/main/javascript/Admin.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-09-12 + * Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Alignment.js b/opencga-client/src/main/javascript/Alignment.js index 446219c5a59..d8bf3e8fed2 100644 --- a/opencga-client/src/main/javascript/Alignment.js +++ b/opencga-client/src/main/javascript/Alignment.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-09-12 + * Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/ClinicalAnalysis.js b/opencga-client/src/main/javascript/ClinicalAnalysis.js index 221fa4a68da..6a46b107c2e 100644 --- a/opencga-client/src/main/javascript/ClinicalAnalysis.js +++ b/opencga-client/src/main/javascript/ClinicalAnalysis.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-09-12 + * Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Cohort.js b/opencga-client/src/main/javascript/Cohort.js index 9d070dc8ec8..6d6f61ff6ac 100644 --- a/opencga-client/src/main/javascript/Cohort.js +++ b/opencga-client/src/main/javascript/Cohort.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-09-12 + * Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/DiseasePanel.js b/opencga-client/src/main/javascript/DiseasePanel.js index 1d97f0d3b6f..818ba7dd180 100644 --- a/opencga-client/src/main/javascript/DiseasePanel.js +++ b/opencga-client/src/main/javascript/DiseasePanel.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-09-12 + * Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Family.js b/opencga-client/src/main/javascript/Family.js index 5b11ceacd3a..c742a07a853 100644 --- a/opencga-client/src/main/javascript/Family.js +++ b/opencga-client/src/main/javascript/Family.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-09-12 + * Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/File.js b/opencga-client/src/main/javascript/File.js index 27d76b733e7..89dd1e6b218 100644 --- a/opencga-client/src/main/javascript/File.js +++ b/opencga-client/src/main/javascript/File.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-09-12 + * Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/GA4GH.js b/opencga-client/src/main/javascript/GA4GH.js index 2e3f968ab05..289007f6967 100644 --- a/opencga-client/src/main/javascript/GA4GH.js +++ b/opencga-client/src/main/javascript/GA4GH.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-09-12 + * Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Individual.js b/opencga-client/src/main/javascript/Individual.js index 160bb589c50..30ced0b72fe 100644 --- a/opencga-client/src/main/javascript/Individual.js +++ b/opencga-client/src/main/javascript/Individual.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-09-12 + * Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Job.js b/opencga-client/src/main/javascript/Job.js index 52f5cdde599..6416d751b43 100644 --- a/opencga-client/src/main/javascript/Job.js +++ b/opencga-client/src/main/javascript/Job.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-09-12 + * Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Meta.js b/opencga-client/src/main/javascript/Meta.js index 0207e95847a..d0a1520ba62 100644 --- a/opencga-client/src/main/javascript/Meta.js +++ b/opencga-client/src/main/javascript/Meta.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-09-12 + * Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Project.js b/opencga-client/src/main/javascript/Project.js index f43c7394d71..55d7a338e6c 100644 --- a/opencga-client/src/main/javascript/Project.js +++ b/opencga-client/src/main/javascript/Project.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-09-12 + * Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Sample.js b/opencga-client/src/main/javascript/Sample.js index edefccf3e5a..cda36298ddc 100644 --- a/opencga-client/src/main/javascript/Sample.js +++ b/opencga-client/src/main/javascript/Sample.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-09-12 + * Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Study.js b/opencga-client/src/main/javascript/Study.js index d153ba9d316..f0a1df7905c 100644 --- a/opencga-client/src/main/javascript/Study.js +++ b/opencga-client/src/main/javascript/Study.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-09-12 + * Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/User.js b/opencga-client/src/main/javascript/User.js index d8c60b8d409..ad18ab4bce7 100644 --- a/opencga-client/src/main/javascript/User.js +++ b/opencga-client/src/main/javascript/User.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-09-12 + * Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Variant.js b/opencga-client/src/main/javascript/Variant.js index 35617fde07f..55acc2896d9 100644 --- a/opencga-client/src/main/javascript/Variant.js +++ b/opencga-client/src/main/javascript/Variant.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-09-12 + * Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/VariantOperation.js b/opencga-client/src/main/javascript/VariantOperation.js index daa6917728a..f4e2cb7e644 100644 --- a/opencga-client/src/main/javascript/VariantOperation.js +++ b/opencga-client/src/main/javascript/VariantOperation.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-09-12 + * Autogenerated on: 2023-10-13 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/admin_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/admin_client.py index 28598b602eb..edeedde55a0 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/admin_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/admin_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-09-12 + Autogenerated on: 2023-10-13 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class Admin(_ParentRestClient): """ This class contains methods for the 'Admin' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/admin """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/alignment_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/alignment_client.py index d19895d21ba..60720a7208d 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/alignment_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/alignment_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-09-12 + Autogenerated on: 2023-10-13 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class Alignment(_ParentRestClient): """ This class contains methods for the 'Analysis - Alignment' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/analysis/alignment """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/clinical_analysis_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/clinical_analysis_client.py index cf8de0798c5..d75c2131ee0 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/clinical_analysis_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/clinical_analysis_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-09-12 + Autogenerated on: 2023-10-13 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class ClinicalAnalysis(_ParentRestClient): """ This class contains methods for the 'Analysis - Clinical' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/analysis/clinical """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/cohort_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/cohort_client.py index f7d6ad80542..65fbdc4484d 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/cohort_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/cohort_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-09-12 + Autogenerated on: 2023-10-13 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class Cohort(_ParentRestClient): """ This class contains methods for the 'Cohorts' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/cohorts """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/disease_panel_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/disease_panel_client.py index 6d47ea09d3c..ed5e0f4197b 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/disease_panel_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/disease_panel_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-09-12 + Autogenerated on: 2023-10-13 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class DiseasePanel(_ParentRestClient): """ This class contains methods for the 'Disease Panels' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/panels """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/family_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/family_client.py index 65e3a070dce..138b5f4d971 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/family_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/family_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-09-12 + Autogenerated on: 2023-10-13 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class Family(_ParentRestClient): """ This class contains methods for the 'Families' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/families """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/file_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/file_client.py index c6c028d3b3a..f6ee295639b 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/file_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/file_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-09-12 + Autogenerated on: 2023-10-13 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class File(_ParentRestClient): """ This class contains methods for the 'Files' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/files """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/ga4gh_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/ga4gh_client.py index 48e5b17de75..cadaa417e65 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/ga4gh_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/ga4gh_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-09-12 + Autogenerated on: 2023-10-13 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class GA4GH(_ParentRestClient): """ This class contains methods for the 'GA4GH' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/ga4gh """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/individual_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/individual_client.py index 07dd3d04b0d..19717e0e955 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/individual_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/individual_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-09-12 + Autogenerated on: 2023-10-13 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class Individual(_ParentRestClient): """ This class contains methods for the 'Individuals' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/individuals """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/job_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/job_client.py index d692f8e099c..5ca221e9a5c 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/job_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/job_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-09-12 + Autogenerated on: 2023-10-13 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class Job(_ParentRestClient): """ This class contains methods for the 'Jobs' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/jobs """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/meta_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/meta_client.py index d43227b33f8..bfb15ef62c9 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/meta_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/meta_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-09-12 + Autogenerated on: 2023-10-13 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class Meta(_ParentRestClient): """ This class contains methods for the 'Meta' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/meta """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/project_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/project_client.py index bd29b4b1013..7f8831b7bd4 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/project_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/project_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-09-12 + Autogenerated on: 2023-10-13 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class Project(_ParentRestClient): """ This class contains methods for the 'Projects' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/projects """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/sample_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/sample_client.py index fcb5c944884..f1a30343b8b 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/sample_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/sample_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-09-12 + Autogenerated on: 2023-10-13 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class Sample(_ParentRestClient): """ This class contains methods for the 'Samples' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/samples """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/study_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/study_client.py index 40cc9a63c08..402e33c5a90 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/study_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/study_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-09-12 + Autogenerated on: 2023-10-13 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class Study(_ParentRestClient): """ This class contains methods for the 'Studies' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/studies """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/user_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/user_client.py index 3f2ed4eae3e..719503f5c0f 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/user_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/user_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-09-12 + Autogenerated on: 2023-10-13 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class User(_ParentRestClient): """ This class contains methods for the 'Users' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/users """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/variant_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/variant_client.py index 80e1746470a..2b7a18864c5 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/variant_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/variant_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-09-12 + Autogenerated on: 2023-10-13 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class Variant(_ParentRestClient): """ This class contains methods for the 'Analysis - Variant' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/analysis/variant """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/variant_operation_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/variant_operation_client.py index 4297fbf08ae..e10cdce35b0 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/variant_operation_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/variant_operation_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-09-12 + Autogenerated on: 2023-10-13 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class VariantOperation(_ParentRestClient): """ This class contains methods for the 'Operations - Variant Storage' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/operation """ diff --git a/opencga-server/src/main/java/org/opencb/opencga/server/generator/config/Options.java b/opencga-server/src/main/java/org/opencb/opencga/server/generator/config/Options.java index 12e8f7d5e62..4a8d2e42646 100644 --- a/opencga-server/src/main/java/org/opencb/opencga/server/generator/config/Options.java +++ b/opencga-server/src/main/java/org/opencb/opencga/server/generator/config/Options.java @@ -7,6 +7,7 @@ public class Options { private String outputDir; + private String version; private List ignoreTypes; @@ -22,6 +23,15 @@ public Options setOutputDir(String outputDir) { return this; } + public String getVersion() { + return version; + } + + public Options setVersion(String version) { + this.version = version; + return this; + } + private String getFolderAsPackage(String inputDir) { String res = ""; if (inputDir.contains("/src/main/java/")) { diff --git a/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/cli/ParserCliRestApiWriter.java b/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/cli/ParserCliRestApiWriter.java index 828d12be889..673f60fa847 100644 --- a/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/cli/ParserCliRestApiWriter.java +++ b/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/cli/ParserCliRestApiWriter.java @@ -87,7 +87,7 @@ protected String getClassImports(String key) { protected String getClassHeader(String key) { StringBuilder sb = new StringBuilder(); sb.append("\n"); - sb.append("public class OpencgaCliOptionsParser extends CustomCliOptionsParser {\n"); + sb.append("public class "+this.config.getOptions().getVersion()+"CliOptionsParser extends CustomCliOptionsParser {\n"); sb.append("\n"); for (RestCategory restCategory : availableCategories.values()) { sb.append(" private final " + getAsClassName(restCategory.getName()) + "CommandOptions " + getAsVariableName(restCategory.getName()) + @@ -96,7 +96,7 @@ protected String getClassHeader(String key) { sb.append("\n"); sb.append(" enum OutputFormat {IDS, ID_CSV, NAME_ID_MAP, ID_LIST, RAW, PRETTY_JSON, PLAIN_JSON}\n"); sb.append("\n"); - sb.append(" public OpencgaCliOptionsParser() {\n"); + sb.append(" public "+this.config.getOptions().getVersion()+"CliOptionsParser() {\n"); sb.append("\n"); sb.append(" jCommander.setExpandAtSign(false);\n"); @@ -165,6 +165,6 @@ protected String getClassMethods(String key) { @Override protected String getClassFileName(String key) { - return config.getOptions().getOutputDir() + "/OpencgaCliOptionsParser.java"; + return config.getOptions().getOutputDir() + "/"+this.config.getOptions().getVersion()+"CliOptionsParser.java"; } } diff --git a/opencga-server/src/main/resources/cli-config.yaml b/opencga-server/src/main/resources/cli-config.yaml index b3a3c302120..c9f45b1fbd0 100644 --- a/opencga-server/src/main/resources/cli-config.yaml +++ b/opencga-server/src/main/resources/cli-config.yaml @@ -1,4 +1,5 @@ options: + version: Opencga outputDir: opencga-app/src/main/java/org/opencb/opencga/app/cli/main/ ignoreTypes: - string From 080dcf94eed13c39447060fd206818fc6e2137f0 Mon Sep 17 00:00:00 2001 From: imedina Date: Tue, 17 Oct 2023 11:48:29 +0100 Subject: [PATCH 3/7] Refactor new CLI Usage --- .../Category.java => config/CliCategory.java} | 14 ++--- .../CliConfiguration.java} | 59 ++++++++++--------- .../{conf/Usage.java => config/CliUsage.java} | 14 ++--- .../main/custom/CustomCliOptionsParser.java | 23 ++++---- .../resources/{usage.yml => cli-usage.yml} | 0 5 files changed, 57 insertions(+), 53 deletions(-) rename opencga-app/src/main/java/org/opencb/opencga/app/cli/{conf/Category.java => config/CliCategory.java} (74%) rename opencga-app/src/main/java/org/opencb/opencga/app/cli/{conf/Configuration.java => config/CliConfiguration.java} (51%) rename opencga-app/src/main/java/org/opencb/opencga/app/cli/{conf/Usage.java => config/CliUsage.java} (60%) rename opencga-app/src/main/resources/{usage.yml => cli-usage.yml} (100%) diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/conf/Category.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/config/CliCategory.java similarity index 74% rename from opencga-app/src/main/java/org/opencb/opencga/app/cli/conf/Category.java rename to opencga-app/src/main/java/org/opencb/opencga/app/cli/config/CliCategory.java index 4ee5226b408..e29646f79b8 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/conf/Category.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/config/CliCategory.java @@ -1,17 +1,17 @@ -package org.opencb.opencga.app.cli.conf; +package org.opencb.opencga.app.cli.config; import java.util.Arrays; -public class Category { +public class CliCategory { private String name; private String description; private String[] options; - public Category() { + public CliCategory() { } - public Category(String name, String description, String[] options) { + public CliCategory(String name, String description, String[] options) { this.name = name; this.description = description; this.options = options; @@ -31,7 +31,7 @@ public String getName() { return name; } - public Category setName(String name) { + public CliCategory setName(String name) { this.name = name; return this; } @@ -40,7 +40,7 @@ public String getDescription() { return description; } - public Category setDescription(String description) { + public CliCategory setDescription(String description) { this.description = description; return this; } @@ -49,7 +49,7 @@ public String[] getOptions() { return options; } - public Category setOptions(String[] options) { + public CliCategory setOptions(String[] options) { this.options = options; return this; } diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/conf/Configuration.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/config/CliConfiguration.java similarity index 51% rename from opencga-app/src/main/java/org/opencb/opencga/app/cli/conf/Configuration.java rename to opencga-app/src/main/java/org/opencb/opencga/app/cli/config/CliConfiguration.java index 155dd6695a6..0f8a810dc2d 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/conf/Configuration.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/config/CliConfiguration.java @@ -1,4 +1,4 @@ -package org.opencb.opencga.app.cli.conf; +package org.opencb.opencga.app.cli.config; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; @@ -8,62 +8,63 @@ import java.io.File; import java.io.IOException; -public class Configuration { +public class CliConfiguration { + /** - * The instance of Usage that stores the "usage" information + * The instance of Configuration that this Class is storing */ - private static Usage usage; + private static CliConfiguration instance; /** - * LOGGER is an instance of the Logger class so that we can do proper - * logging + * The instance of Usage that stores the "usage" information */ - private static final Logger logger = LoggerFactory.getLogger(Configuration.class); + private static CliUsage cliUsage; /** - * The instance of Configuration that this Class is storing + * FILENAME is the file location of the configuration yml file */ - private static Configuration instance = null; + public static final String CLI_USAGE_FILENAME = "cli-usage.yml"; /** - * FILENAME is the file location of the configuration yml file + * LOGGER is an instance of the Logger class so that we can do proper + * logging */ - public static final String FILENAME = "usage.yml"; + private static final Logger logger = LoggerFactory.getLogger(CliConfiguration.class); - public static Configuration getInstance() { - if (Configuration.instance == null) { - Configuration.instance = new Configuration(); + public static CliConfiguration getInstance() { + if (CliConfiguration.instance == null) { + CliConfiguration.instance = new CliConfiguration(); } - - return Configuration.instance; + return CliConfiguration.instance; } - private static Usage loadConfiguration() throws IOException { + private static CliUsage loadConfiguration() throws IOException { // Loading the YAML file from the /conf folder - ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); String appHome = System.getProperty("app.home", System.getenv("OPENCGA_HOME")); String conf = appHome + "/conf"; - File file = new File(conf + File.separator + FILENAME); + File file = new File(conf + File.separator + CLI_USAGE_FILENAME); // Mapping the config from the YAML file to the Configuration class logger.info("Loading CLI configuration from: " + file.getAbsolutePath()); - ObjectMapper om = new ObjectMapper(new YAMLFactory()); - return om.readValue(file, Usage.class); + ObjectMapper yamlObjectMapper = new ObjectMapper(new YAMLFactory()); + return yamlObjectMapper.readValue(file, CliUsage.class); } - public static Usage getUsage() { - if (usage == null) { + /* + * We keep an instance of cliUsage for the Shell + */ + public static CliUsage getUsage() { + if (cliUsage == null) { try { - usage = loadConfiguration(); + cliUsage = loadConfiguration(); } catch (IOException e) { - logger.error("Loading CLI configuration from: " + FILENAME + " Failed"); - + logger.error("Loading CLI configuration from: " + CLI_USAGE_FILENAME + " Failed"); } } - return usage; + return cliUsage; } - public static void setUsage(Usage usage) { - Configuration.usage = usage; + public static void setUsage(CliUsage cliUsage) { + CliConfiguration.cliUsage = cliUsage; } } diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/conf/Usage.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/config/CliUsage.java similarity index 60% rename from opencga-app/src/main/java/org/opencb/opencga/app/cli/conf/Usage.java rename to opencga-app/src/main/java/org/opencb/opencga/app/cli/config/CliUsage.java index 05623b74d3b..406dac103a8 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/conf/Usage.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/config/CliUsage.java @@ -1,15 +1,15 @@ -package org.opencb.opencga.app.cli.conf; +package org.opencb.opencga.app.cli.config; import java.util.Arrays; -public class Usage { +public class CliUsage { - Category[] categories; + CliCategory[] categories; - public Usage() { + public CliUsage() { } - public Usage(Category[] categories) { + public CliUsage(CliCategory[] categories) { this.categories = categories; } @@ -21,11 +21,11 @@ public String toString() { return sb.toString(); } - public Category[] getCategories() { + public CliCategory[] getCategories() { return categories; } - public Usage setCategories(Category[] categories) { + public CliUsage setCategories(CliCategory[] categories) { this.categories = categories; return this; } diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/custom/CustomCliOptionsParser.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/custom/CustomCliOptionsParser.java index dfe083f70e3..68aca5089ed 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/custom/CustomCliOptionsParser.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/custom/CustomCliOptionsParser.java @@ -7,9 +7,9 @@ import org.opencb.opencga.app.cli.CliOptionsParser; import org.opencb.opencga.app.cli.GeneralCliOptions; import org.opencb.opencga.app.cli.admin.AdminCliOptionsParser; -import org.opencb.opencga.app.cli.conf.Category; -import org.opencb.opencga.app.cli.conf.Configuration; -import org.opencb.opencga.app.cli.conf.Usage; +import org.opencb.opencga.app.cli.config.CliCategory; +import org.opencb.opencga.app.cli.config.CliConfiguration; +import org.opencb.opencga.app.cli.config.CliUsage; import org.opencb.opencga.app.cli.main.OpencgaMain; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -103,16 +103,19 @@ private String getPrefix() { return "opencga.sh "; } + /** + * Read cli-usage.yml file to print the usage. + */ @Override protected void printMainUsage() { - Usage usage = Configuration.getUsage(); - Category[] categories = usage.getCategories(); - for (Category category : categories) { - String[] options = category.getOptions(); - PrintUtils.println(PrintUtils.format(category.getDescription(), PrintUtils.Color.GREEN)); - for (int i = 0; i < options.length; i++) { + CliUsage cliUsage = CliConfiguration.getUsage(); + CliCategory[] categories = cliUsage.getCategories(); + for (CliCategory cliCategory : categories) { + String[] options = cliCategory.getOptions(); + PrintUtils.println(PrintUtils.format(cliCategory.getDescription(), PrintUtils.Color.GREEN)); + for (String option : options) { for (String command : jCommander.getCommands().keySet()) { - if (command.equals(options[i])) { + if (command.equals(option)) { PrintUtils.printCommandHelpFormattedString(command, jCommander.getCommandDescription(command)); } } diff --git a/opencga-app/src/main/resources/usage.yml b/opencga-app/src/main/resources/cli-usage.yml similarity index 100% rename from opencga-app/src/main/resources/usage.yml rename to opencga-app/src/main/resources/cli-usage.yml From 8e2d0e971c9a19ace3c7fdb514c4af7eee3562ca Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Tue, 31 Oct 2023 14:40:28 +0100 Subject: [PATCH 4/7] app: The cli-usage.yml now is in the jar #TASK-5055 --- opencga-app/pom.xml | 14 +++++++--- .../app/cli/config/CliConfiguration.java | 27 ++++++++++++------- .../main/custom/CustomCliOptionsParser.java | 2 +- 3 files changed, 30 insertions(+), 13 deletions(-) diff --git a/opencga-app/pom.xml b/opencga-app/pom.xml index 539781cf264..7a6155e4b0d 100644 --- a/opencga-app/pom.xml +++ b/opencga-app/pom.xml @@ -138,13 +138,21 @@ src/main/java + + + + + + + + src/main/resources true - ${project.basedir}/target/clients/R - compileR.sh + cli-usage.yml + ${project.basedir}/target/classes app/cloud/docker/compose @@ -346,7 +354,7 @@ - + diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/config/CliConfiguration.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/config/CliConfiguration.java index 0f8a810dc2d..767a99ee33a 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/config/CliConfiguration.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/config/CliConfiguration.java @@ -2,11 +2,13 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; +import org.apache.commons.io.FileUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.io.IOException; +import java.util.Scanner; public class CliConfiguration { @@ -23,7 +25,7 @@ public class CliConfiguration { /** * FILENAME is the file location of the configuration yml file */ - public static final String CLI_USAGE_FILENAME = "cli-usage.yml"; + private String cliUsageFileName = "cli-usage.yml"; /** * LOGGER is an instance of the Logger class so that we can do proper @@ -38,12 +40,10 @@ public static CliConfiguration getInstance() { return CliConfiguration.instance; } - private static CliUsage loadConfiguration() throws IOException { + private CliUsage loadConfiguration() throws IOException { // Loading the YAML file from the /conf folder - String appHome = System.getProperty("app.home", System.getenv("OPENCGA_HOME")); - String conf = appHome + "/conf"; - File file = new File(conf + File.separator + CLI_USAGE_FILENAME); - + File file = new File(cliUsageFileName); + FileUtils.copyURLToFile(getClass().getClassLoader().getResource(cliUsageFileName),file); // Mapping the config from the YAML file to the Configuration class logger.info("Loading CLI configuration from: " + file.getAbsolutePath()); ObjectMapper yamlObjectMapper = new ObjectMapper(new YAMLFactory()); @@ -53,18 +53,27 @@ private static CliUsage loadConfiguration() throws IOException { /* * We keep an instance of cliUsage for the Shell */ - public static CliUsage getUsage() { + public CliUsage getUsage() { if (cliUsage == null) { try { cliUsage = loadConfiguration(); } catch (IOException e) { - logger.error("Loading CLI configuration from: " + CLI_USAGE_FILENAME + " Failed"); + logger.error("Loading CLI configuration from: " + cliUsageFileName + " Failed"); + System.err.println("Loading CLI configuration from: " + cliUsageFileName + " Failed"); } } return cliUsage; } - public static void setUsage(CliUsage cliUsage) { + public void setUsage(CliUsage cliUsage) { CliConfiguration.cliUsage = cliUsage; } + + public String getCliUsageFileName() { + return cliUsageFileName; + } + + public void setCliUsageFileName(String cliUsageFileName) { + this.cliUsageFileName = cliUsageFileName; + } } diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/custom/CustomCliOptionsParser.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/custom/CustomCliOptionsParser.java index 68aca5089ed..68c964acd1f 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/custom/CustomCliOptionsParser.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/custom/CustomCliOptionsParser.java @@ -108,7 +108,7 @@ private String getPrefix() { */ @Override protected void printMainUsage() { - CliUsage cliUsage = CliConfiguration.getUsage(); + CliUsage cliUsage = CliConfiguration.getInstance().getUsage(); CliCategory[] categories = cliUsage.getCategories(); for (CliCategory cliCategory : categories) { String[] options = cliCategory.getOptions(); From ccf00898eef6d48c2bd2bf3d316bc2ae2167362d Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Tue, 31 Oct 2023 16:02:02 +0100 Subject: [PATCH 5/7] app: The loaded cli-usage.yml is tmp file #TASK-5055 --- .../org/opencb/opencga/app/cli/config/CliConfiguration.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/config/CliConfiguration.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/config/CliConfiguration.java index 767a99ee33a..b6e5b26960c 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/config/CliConfiguration.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/config/CliConfiguration.java @@ -42,8 +42,10 @@ public static CliConfiguration getInstance() { private CliUsage loadConfiguration() throws IOException { // Loading the YAML file from the /conf folder - File file = new File(cliUsageFileName); + File file = new File(FileUtils.getTempDirectory()+File.separator+cliUsageFileName); + FileUtils.copyURLToFile(getClass().getClassLoader().getResource(cliUsageFileName),file); + // Mapping the config from the YAML file to the Configuration class logger.info("Loading CLI configuration from: " + file.getAbsolutePath()); ObjectMapper yamlObjectMapper = new ObjectMapper(new YAMLFactory()); From 8016adc140d23431909bfedca815611bd5a29e81 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Tue, 31 Oct 2023 17:37:10 +0100 Subject: [PATCH 6/7] pom: Removed filtering in cli-usage.yml and uncomment compileR #TASK-5055 --- opencga-app/pom.xml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/opencga-app/pom.xml b/opencga-app/pom.xml index 7a6155e4b0d..8b78fbd48bd 100644 --- a/opencga-app/pom.xml +++ b/opencga-app/pom.xml @@ -138,17 +138,16 @@ src/main/java - - - - - - - - src/main/resources true + ${project.basedir}/target/clients/R + + compileR.sh + + + + src/main/resources cli-usage.yml From 35389bf4d036b2b8117437d2b72c97f45b5f7c7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Coll=20Morag=C3=B3n?= Date: Tue, 31 Oct 2023 16:56:54 +0000 Subject: [PATCH 7/7] app: Do not generate a temporary file. #TASK-5055 --- .../app/cli/config/CliConfiguration.java | 26 +++++++------------ 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/config/CliConfiguration.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/config/CliConfiguration.java index b6e5b26960c..99144d56fed 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/config/CliConfiguration.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/config/CliConfiguration.java @@ -2,13 +2,12 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; -import org.apache.commons.io.FileUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.io.File; import java.io.IOException; -import java.util.Scanner; +import java.io.InputStream; +import java.io.UncheckedIOException; public class CliConfiguration { @@ -20,7 +19,7 @@ public class CliConfiguration { /** * The instance of Usage that stores the "usage" information */ - private static CliUsage cliUsage; + private CliUsage cliUsage; /** * FILENAME is the file location of the configuration yml file @@ -41,15 +40,11 @@ public static CliConfiguration getInstance() { } private CliUsage loadConfiguration() throws IOException { - // Loading the YAML file from the /conf folder - File file = new File(FileUtils.getTempDirectory()+File.separator+cliUsageFileName); - - FileUtils.copyURLToFile(getClass().getClassLoader().getResource(cliUsageFileName),file); - - // Mapping the config from the YAML file to the Configuration class - logger.info("Loading CLI configuration from: " + file.getAbsolutePath()); - ObjectMapper yamlObjectMapper = new ObjectMapper(new YAMLFactory()); - return yamlObjectMapper.readValue(file, CliUsage.class); + try (InputStream is = getClass().getClassLoader().getResourceAsStream(cliUsageFileName)) { + // Mapping the config from the YAML file to the Configuration class + ObjectMapper yamlObjectMapper = new ObjectMapper(new YAMLFactory()); + return yamlObjectMapper.readValue(is, CliUsage.class); + } } /* @@ -60,15 +55,14 @@ public CliUsage getUsage() { try { cliUsage = loadConfiguration(); } catch (IOException e) { - logger.error("Loading CLI configuration from: " + cliUsageFileName + " Failed"); - System.err.println("Loading CLI configuration from: " + cliUsageFileName + " Failed"); + throw new UncheckedIOException(e); } } return cliUsage; } public void setUsage(CliUsage cliUsage) { - CliConfiguration.cliUsage = cliUsage; + this.cliUsage = cliUsage; } public String getCliUsageFileName() {