bio-miga/miga

View on GitHub

Showing 1,586 of 1,600 total issues

Assignment Branch Condition size for parse_cli is too high. [34.94/15]
Open

  def parse_cli
    cli.defaults = { threads: 1 }
    cli.defaults = Hash[@@OPERATIONS.keys.map { |i| [i, true] }]
    cli.parse do |opt|
      operation_n = Hash[@@OPERATIONS.map { |k, v| [v[0], k] }]
Severity: Minor
Found in lib/miga/cli/action/doctor.rb by rubocop

This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

Method has too many lines. [29/10]
Open

  def get_sub_cli
    return [cli] if cli[:file].nil? || cli[:ignore_file]

    glob = []
    cli_default = cli.original_argv + ['--ignore-file']
Severity: Minor
Found in lib/miga/cli/action/get.rb by rubocop

This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Method has too many lines. [29/10]
Open

  def check_software_requirements(rc_fh)
    cli.puts 'Looking for requirements:'
    opt_groups = {
      mytaxa: 'MyTaxa',
      rdp: 'RDP classifier',
Severity: Minor
Found in lib/miga/cli/action/init.rb by rubocop

This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Block has too many lines. [67/25]
Open

    cli.parse do |opt|
      cli.opt_object(opt, [:project, :dataset, :dataset_type])
      opt.on(
        '-I', '--ids ID1,ID2,...', Array,
        '(Mandatory unless -F) IDs in the remote database separated by commas'
Severity: Minor
Found in lib/miga/cli/action/get.rb by rubocop

This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

Assignment Branch Condition size for test_load_status is too high. [33.24/15]
Open

  def test_load_status
    d1 = daemon
    p1 = project
    assert_equal(0, d1.jobs_running.size)
    assert_nil(d1.load_status)
Severity: Minor
Found in test/daemon_test.rb by rubocop

This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

Assignment Branch Condition size for test_status is too high. [33.14/15]
Open

  def test_status
    d = dataset
    assert_equal(:ignore_empty, d.result_status(:trimmed_reads))
    d.add_result(:trimmed_reads)
    assert_equal(:-, d.result_status(:raw_reads))
Severity: Minor
Found in test/result_test.rb by rubocop

This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

Method has too many lines. [28/10]
Confirmed

  def get_type_status_ncbi_asm(metadata)
    from_type = nil

    # Try first from previously pulled NCBI metadata
    if metadata[:ncbi_dataset]
Severity: Minor
Found in lib/miga/remote_dataset.rb by rubocop

This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Assignment Branch Condition size for clean_fasta_file is too high. [33.91/15]
Open

  def clean_fasta_file(file)
    tmp_fh = nil
    tmp_path = nil
    begin
      if file =~ /\.gz/
Severity: Minor
Found in lib/miga/common/format.rb by rubocop

This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

Method has too many lines. [28/10]
Open

  def cli_save_actions(opt)
    cli.opt_flag(
      opt, 'only-metadata',
      'Create datasets without input data but retrieve all metadata',
      :only_md

This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Assignment Branch Condition size for remote_list is too high. [33.78/15]
Open

  def remote_list
    if cli[:ncbi_list_json] && File.size?(cli[:ncbi_list_json])
      return read_ncbi_list_json(cli[:ncbi_list_json])
    end

This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

Method has too many lines. [28/10]
Open

  def merge_bidir_tmp(tmp)
    dist = { aai: {}, ani: {} }
    cli[:threads].times do |i|
      cli.advance('Merging:', i + 1, cli[:threads], false)
      file = File.join(tmp, "#{i}.json")

This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Method has too many lines. [28/10]
Open

  def check_mts(cli)
    cli.say 'Looking for unarchived MyTaxa Scan runs'
    cli.load_project.each_dataset do |d|
      res = d.result(:mytaxa_scan)
      next if res.nil?

This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Assignment Branch Condition size for partial_bidir_tmp is too high. [33.62/15]
Open

  def partial_bidir_tmp(project, ref_ds)
    n = ref_ds.size

    # Read data first (threaded)
    tmp = File.join(project.path, 'doctor-bidirectional.tmp')

This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

Method has too many lines. [28/10]
Open

  def opt_common(opt)
    return unless @opt_common

    if interactive
      opt.on(
Severity: Minor
Found in lib/miga/cli/opt_helper.rb by rubocop

This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Assignment Branch Condition size for ncbi_gb_get is too high. [33.76/15]
Open

    def ncbi_gb_get(opts)
      # Simply use defaults, but ensure that the URL can be properly formed
      o = download_rest(opts.merge(universe: :ncbi, db: :nuccore))
      return o unless o.strip.empty?

Severity: Minor
Found in lib/miga/remote_dataset/download.rb by rubocop

This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

Assignment Branch Condition size for test_profile_advance is too high. [32.02/15]
Open

  def test_profile_advance
    d2 = project.add_dataset('ds_profile_advance')
    assert_equal(0, d2.profile_advance(true).first)
    assert_equal(0, d2.profile_advance(true).last)
    assert_equal(0, d2.profile_advance(true).inject(:+))
Severity: Minor
Found in test/dataset_test.rb by rubocop

This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

Method has too many lines. [27/10]
Confirmed

  def test_preprocessing
    p1 = project
    assert_predicate(p1, :done_preprocessing?)
    d1 = p1.add_dataset('BAH')
    assert_not_predicate(p1, :done_preprocessing?)
Severity: Minor
Found in test/project_test.rb by rubocop

This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Assignment Branch Condition size for test_dataset_clear_run_counts is too high. [32.14/15]
Open

  def test_dataset_clear_run_counts
    dataset.metadata[:_try_something] = 1
    dataset.metadata[:_step] = 'Boop'
    dataset.metadata[:_not_a_counter] = 1
    dataset.save
Severity: Minor
Found in test/hook_test.rb by rubocop

This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

Method has too many lines. [27/10]
Confirmed

    def use_ncbi_taxonomy_dump(path, cli = nil)
      raise "Directory doesn't exist: #{path}" unless File.directory?(path)

      # Structure: { TaxID => ["name", "rank", parent TaxID] }
      MiGA::MiGA.DEBUG "Loading NCBI Taxonomy dump: #{path}"
Severity: Minor
Found in lib/miga/remote_dataset.rb by rubocop

This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Method has too many lines. [27/10]
Confirmed

  def ncbi_asm_json_doc
    return @_ncbi_asm_json_doc unless @_ncbi_asm_json_doc.nil?

    if db == :assembly && %i[ncbi gtdb seqcode].include?(universe)
      metadata[:ncbi_asm] ||= ids.first
Severity: Minor
Found in lib/miga/remote_dataset.rb by rubocop

This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Severity
Category
Status
Source
Language