KarrLab/datanator

View on GitHub

Showing 376 of 791 total issues

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

    def __init__(self, cache_dirname=None, MongoDB=None, replicaSet=None, db=None,
Severity: Major
Found in datanator/data_source/metabolites_meta_collection.py - About 1 hr to fix

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

        def __init__(self, file_location, MongoDB=None, db=None, collection_str=None, username=None,
    Severity: Major
    Found in datanator/data_source/protein_modification/10_1093_nar_gkw1075.py - About 1 hr to fix

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

          def __init__(self,output_directory, source, MongoDB, db, 
      Severity: Major
      Found in datanator/data_source/metabolite_nosql.py - About 1 hr to fix

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

            def __init__(self, server=None, db=None, username=None, password=None, 
        Severity: Major
        Found in datanator/data_source/ec.py - About 1 hr to fix

          Function fill_gr_131_helper has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

              def fill_gr_131_helper(self, start=0):
                  """Fill 10.1101/gr.131037.111
                  
                  Args:
                      start (:obj:`int`, optional): Starting position. Defaults to 0.
          Severity: Minor
          Found in datanator/data_source/rna_halflife/order_by_ko.py - About 1 hr 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_entity has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

              def build_entity(self, data):
                  """Build entity object from obj.
                  Go into entity collection
          
                  Args:

          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 process_docs has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

              def process_docs(self):
                  files = ['mmc2.txt','mmc3.txt']
                  for file in files:
                      table = pd.read_csv(file,
                                          delimiter='\t',

          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 parse_rxn_cls_txt has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

              def parse_rxn_cls_txt(self, filename):
                  '''Parse kegg_ortho txt file into dictionary object
                      categories = ['ENTRY', 'DEFINITION', 'RPAIR', 'REACTION',
                          'ENZYME', 'PATHWAY', 'ORTHOLOGY']
                  '''
          Severity: Minor
          Found in datanator/data_source/kegg_reaction_class.py - About 1 hr 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 parse_content has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

              def parse_content(self, file_location):
                  """Parse enzyme.dat file.
          
                  Args:
                      file_location(:obj:`str`): location of enzyme.dat file.
          Severity: Minor
          Found in datanator/data_source/ec.py - About 1 hr 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 process_docs has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

              def process_docs(self):
                  id_file= pd.read_csv('mouse_uniprot_mapped.tab',delimiter='\t')
                  id_file = id_file.where(pd.notnull(id_file), None)
                  for i in range(len(id_file)):
                      #update entity collection

          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 __init__ has 10 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def __init__(self, server, src_db='datanator', des_db='datanator', collection_str='uniprot',
          Severity: Major
          Found in datanator/data_source/gene_ortholog.py - About 1 hr to fix

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

                def __init__(self, username=None, password=None, server=None, authSource='admin',
            Severity: Major
            Found in datanator/data_source/sabio_reaction.py - About 1 hr to fix

              Function make_df has 10 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def make_df(self, url, sheet_name, header=0, names=None, usecols=None,
              Severity: Major
              Found in datanator/util/rna_halflife_util.py - About 1 hr to fix

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

                    def __init__(self, cache_dirname=None, MongoDB=None, replicaSet=None, db='test',
                Severity: Major
                Found in datanator/util/mongo_util.py - About 1 hr to fix

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

                      def __init__(self, name=None, cache_dirname=None, clear_content=False, load_content=False, max_entries=float('inf'),
                  Severity: Major
                  Found in datanator/core/data_source.py - About 1 hr to fix

                    Function create_kinetic_law_from_sbml has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        def create_kinetic_law_from_sbml(self, id, sbml, specie_properties, functions, units):
                            """ Add a kinetic law to the local sqlite database
                    
                            Args:
                                id (:obj:`int`): identifier
                    Severity: Minor
                    Found in datanator/data_source/sabio_rk.py - About 1 hr to fix

                      Function load_content has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          def load_content(self):
                              """ Download the content of SABIO-RK and store it to a local sqlite database. """
                      
                              ##################################
                              ##################################
                      Severity: Minor
                      Found in datanator/data_source/sabio_rk.py - About 1 hr to fix

                        Function build_entity has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            def build_entity(self, obj):
                                """Build entity object from obj.
                                Go into entity collection
                        
                                Args:
                        Severity: Minor
                        Found in datanator/schema_2/transform_metabolites_meta.py - About 1 hr to fix

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

                              def __init__(self, cache_dirname, MongoDB, db, verbose=False, 
                          Severity: Major
                          Found in datanator/data_source/pax_nosql.py - About 1 hr to fix

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

                                def __init__(self, cache_dirname=None, MongoDB=None, db=None,
                            Severity: Major
                            Found in datanator/data_source/intact_nosql.py - About 1 hr to fix
                              Severity
                              Category
                              Status
                              Source
                              Language