Skip to content

Commit

Permalink
Minor adjustments for large NCBI lists
Browse files Browse the repository at this point in the history
  • Loading branch information
lmrodriguezr committed Jan 24, 2024
1 parent 41bb936 commit f3794fe
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/miga/cli/action/download/ncbi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def remote_list

if cli[:ncbi_list_json]
cli.say "Saving remote list: #{cli[:ncbi_list_json]}"
MiGA::Json.generate_plain(list, cli[:ncbi_list_json])
MiGA::Json.generate_fast(list, cli[:ncbi_list_json])
end

list
Expand Down
7 changes: 7 additions & 0 deletions lib/miga/json.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ def generate_plain(obj, path = nil)
generate_generic(:generate, obj, path)
end

##
# Generates and returns plain JSON to represent +obj+ without checking for
# circular references. If +path+ is passed, it saves the JSON in that file.
def generate_fast(obj, path = nil)
generate_generic(:fast_generate, obj, path)
end

private

def generate_generic(method, obj, path)
Expand Down
2 changes: 1 addition & 1 deletion lib/miga/project/dataset.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def dataset_names_hash
##
# Returns MiGA::Dataset
def dataset(name)
name = name.miga_name
name = name.to_s.miga_name
return nil unless MiGA::Dataset.exist?(self, name)

@datasets ||= {}
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, 9, 5].freeze
VERSION = [1.3, 9, 6].freeze

##
# Nickname for the current major.minor version.
VERSION_NAME = 'mezzotint'

##
# Date of the current gem relese.
VERSION_DATE = Date.new(2024, 1, 23)
VERSION_DATE = Date.new(2024, 1, 24)

##
# References of MiGA
Expand Down

0 comments on commit f3794fe

Please sign in to comment.