KarrLab/datanator

View on GitHub

Showing 376 of 791 total issues

Function __init__ has 8 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def __init__(self,

    Function __init__ has 8 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def __init__(self, max_entries=float('inf'),
    Severity: Major
    Found in datanator/data_source/protein_localization/experimental.py - About 1 hr to fix

      Function __init__ has 8 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def __init__(self,

        Function __init__ has 8 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def __init__(self,

          Consider simplifying this complex logical expression.
          Open

                  if len(self.structure) >= 7 and self.structure[0:6] == 'InChI=' and \
                          obConversion.SetInFormat('inchi') and \
                          obConversion.ReadString(mol, self.structure):
                      return 'inchi'
                  elif obConversion.SetInFormat('can') and \
          Severity: Major
          Found in datanator/util/molecule_util.py - About 1 hr to fix

            Function __init__ has 8 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def __init__(self,
            Severity: Major
            Found in datanator/parse_metabolite_concentration.py - About 1 hr to fix

              Function parse_html_iter has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
              Open

                  def parse_html_iter(self):
                      """Parse org code HTML iteratively.
              
                      Yield:
                          (:obj:`obj`): {'kegg_organism_id':  , 'org_name':   , 'org_synonym':  }
              Severity: Minor
              Found in datanator/data_source/kegg_org_code.py - About 55 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function fill_names has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
              Open

                  def fill_names(self):
                      """Fill names of metabolites in 'name' field
                      """
                      docs = self.collection.find({})
                      count = self.collection.count_documents({})
              Severity: Minor
              Found in datanator/data_source/metabolites_meta_collection.py - About 55 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function load_kinetic_laws has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
              Open

                  def load_kinetic_laws(self, ids):
                      """ Download kinetic laws from SABIO-RK
              
                      Args:
                          ids (:obj:`list` of :obj:`int`): list of IDs of kinetic laws to download
              Severity: Minor
              Found in datanator/data_source/sabio_rk.py - About 55 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function load_content has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
              Open

                  def load_content(self):
                      """ Download the content of SABIO-RK and store it to a remote mongoDB. """
              
                      def ids_to_process(total_ids, query):
                          exisitng_ids = self.collection.distinct('kinlaw_id', filter=query)
              Severity: Minor
              Found in datanator/data_source/sabio_rk_nosql.py - About 55 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function load_content has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
              Open

                  def load_content(self):
                      '''Load kegg_orthologs into MongoDB
                      '''
                      _, _, collection = self.con_db(self.collection)
                      root_url = self.ENDPOINT_DOMAINS['root']
              Severity: Minor
              Found in datanator/data_source/kegg_orthology.py - About 55 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function fill_collection has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
              Open

                  def fill_collection(self, start_row=0):
                      """
                      Fill collection collection_str.
              
                      Args:
              Severity: Minor
              Found in datanator/data_source/protein_modification/10_1093_nar_gkw1075.py - About 55 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function build_obs_protein has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
              Open

                  def build_obs_protein(self, data, i, description):
                      """Build observation objects from obj.
                      Go into observations collection.
                      Args:
                          data (:obj:`Obj`): source object.

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function fill_rna_halflife has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
              Open

                  def fill_rna_halflife(self, df, start=2):
                      """Fill rna_halflife collection with information parsed
                      from the publication
                      
                      Args:
              Severity: Minor
              Found in datanator/data_source/rna_halflife/doi_10_1038_srep01318.py - About 55 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function normalize_kinetic_laws has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
              Open

                  def normalize_kinetic_laws(self, ids):
                      """ Normalize parameter values
              
                      Args:
                          ids (:obj:`list` of :obj:`int`): list of IDs of kinetic laws to download
              Severity: Minor
              Found in datanator/data_source/sabio_rk.py - About 55 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function build_uniprot_entity has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
              Open

                  def build_uniprot_entity(self, obj):
                      """Build entity from uniprot collection.
              
                      Args:
                          (:obj:`Obj`): object from which entity object will be built.
              Severity: Minor
              Found in datanator/schema_2/transform.py - About 55 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function fill_collection has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def fill_collection(self, file_location, sheet_name='Sheet1', start_row=0,

                Function process_fastq has 7 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def process_fastq(experiment_name, sample_name, strain_name, num_fastq_files, read_type, output_directory, temp_directory):
                Severity: Major
                Found in datanator/data_source/process_rna_seq/core.py - About 50 mins to fix

                  Function __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def __init__(self,

                    Function __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def __init__(self, MongoDB=None, db=None, username=None, password=None,
                    Severity: Major
                    Found in datanator/data_source/brenda/core.py - About 50 mins to fix
                      Severity
                      Category
                      Status
                      Source
                      Language