Skip to content

Commit

Permalink
New option miga get --bypass-metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
lmrodriguezr committed Feb 11, 2024
1 parent be80fbc commit 21125bd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions lib/miga/cli/action/get.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions lib/miga/remote_dataset.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lib/miga/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ 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.
VERSION_NAME = 'mezzotint'

##
# Date of the current gem relese.
VERSION_DATE = Date.new(2024, 2, 8)
VERSION_DATE = Date.new(2024, 2, 11)

##
# References of MiGA
Expand Down

0 comments on commit 21125bd

Please sign in to comment.