From 21125bd19fc9c6fbd6cdab50473c2266cbe68199 Mon Sep 17 00:00:00 2001 From: "Luis M. Rodriguez-R" Date: Sun, 11 Feb 2024 16:43:14 +0100 Subject: [PATCH] New option `miga get --bypass-metadata` --- lib/miga/cli/action/get.rb | 5 +++++ lib/miga/remote_dataset.rb | 1 + lib/miga/version.rb | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/miga/cli/action/get.rb b/lib/miga/cli/action/get.rb index a5ae993..9e106f9 100644 --- a/lib/miga/cli/action/get.rb +++ b/lib/miga/cli/action/get.rb @@ -61,6 +61,10 @@ def parse_cli '--only-metadata', 'Create datasets without input data but retrieve all metadata' ) { |v| cli[:only_md] = v } + opt.on( + '--bypass-metadata', + 'Do not gather optional metadata such as the dataset taxonomy' + ) { |v| cli[:bypass_md] = v } opt.on( '--api-key STRING', 'API key for the given universe' @@ -75,6 +79,7 @@ def perform rd = create_remote_dataset(sub_cli, p) next if rd.nil? + rd.metadata[:bypass_metadata] = true if sub_cli[:bypass_md] if sub_cli[:get_md] update_metadata(sub_cli, p, rd) else diff --git a/lib/miga/remote_dataset.rb b/lib/miga/remote_dataset.rb index f7f757e..c81570f 100644 --- a/lib/miga/remote_dataset.rb +++ b/lib/miga/remote_dataset.rb @@ -188,6 +188,7 @@ def update_metadata(dataset, metadata = {}) # Get metadata from the remote location. def get_metadata(metadata_def = {}) metadata_def.each { |k, v| @metadata[k] = v } + return @metadata if @metadata[:bypass_metadata] case universe when :ebi, :ncbi, :web diff --git a/lib/miga/version.rb b/lib/miga/version.rb index 754835d..26da12d 100644 --- a/lib/miga/version.rb +++ b/lib/miga/version.rb @@ -12,7 +12,7 @@ module MiGA # - String indicating release status: # - rc* release candidate, not released as gem # - [0-9]+ stable release, released as gem - VERSION = [1.3, 10, 3].freeze + VERSION = [1.3, 11, 0].freeze ## # Nickname for the current major.minor version. @@ -20,7 +20,7 @@ module MiGA ## # Date of the current gem relese. - VERSION_DATE = Date.new(2024, 2, 8) + VERSION_DATE = Date.new(2024, 2, 11) ## # References of MiGA