Showing 376 of 791 total issues
Function __init__
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, cache_dirname=None, MongoDB=None, replicaSet=None, db=None,
Function load_content
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def load_content(self):
""" Collects and Parses all data from Pax DB website and adds to MongoDB
"""
client, db_obj, collection = self.con_db(self.collection)
Function fill_collection
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def fill_collection(self, file_location, sheet_name='Sheet1', start_row=0,
use_columns='A:E,G', column_names=['EC_Number', 'metabolite',
'concentration', 'k_m', 'abbreviation', 'species_name'],
reference={'doi': '10.1038/nchembio.2077'}, unit='M'):
"""
- Read upRead up
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_metabolite_fields
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def fill_metabolite_fields(self, fields=None, collection_src=None, collection_des = None):
'''Fill in values of fields of interest from
metabolite collection: ecmdb or ymdb
Args:
fileds: list of fields of interest
- Read upRead up
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 calc_stats
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def calc_stats(self):
""" Calculate statistics about SABIO-RK
Returns:
:obj:`list` of :obj:`list` of :obj:`obj`: list of list of statistics
- Read upRead up
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_kegg_meta
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def fill_kegg_meta(self, start=0):
"""Fill kegg information for reactions.
Args:
start (:obj:`int`, optional): Starting document. Defaults to 0.
- Read upRead up
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
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def build_obs(self, data, i, species):
"""Build observation objects from obj.
Go into observations collection.
Args:
data (:obj:`Obj`): source object.
- Read upRead up
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 10 (exceeds 5 allowed). Consider refactoring. Open
def build_entity(self, data, i):
"""Build entity object from obj.
Go into entity collection
Args:
- Read upRead up
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_half_life
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def fill_rna_half_life(self, df, species):
"""Load df into rna_halflife collection
Args:
df (:obj:`pandas.DataFrame`): dataframe to be loaded
- Read upRead up
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 add_inchi_key
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def add_inchi_key(self):
"""Add inchi_key field to sabio_compound collection
in MongoDB
"""
query = {}
- Read upRead up
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_half_life
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def fill_rna_half_life(self, df, species):
"""Load df into rna_halflife collection
Args:
df (:obj:`pandas.DataFrame`): dataframe to be loaded
- Read upRead up
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_uniprot
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def fill_uniprot(self, url, sheet_name, usercols='B:D', skiprows=[0,1,2],
insertion=True):
"""Fill uniprot colleciton with ordered_locus_name
from excel sheet
- Read upRead up
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 a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, id='', name='', ncbi_id=None, cross_references=None):
"""
Args:
id (:obj:`str`, optional): identifier
name (:obj:`str`, optional): name
- Read upRead up
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_uniprot_with_df
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def fill_uniprot_with_df(self, df, identifier, identifier_type='oln', species=None):
"""Fill uniprot colleciton with ordered_locus_name
from excel sheet
Args:
- Read upRead up
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 flatten_json
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def flatten_json(self, nested_json):
'''
Flatten json object with nested keys into a single level.
e.g.
{a: b, {a: b,
- Read upRead up
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
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def build_obs(self, data, i):
"""Build observation objects from obj.
Go into observations collection.
Args:
data (:obj:`Obj`): source object.
Function build_obs_s5
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def build_obs_s5(self, data, i, cpt):
"""Build observation objects from obj. (Tables S5)
Go into observations collection.
Args:
data (:obj:`Obj`): source object.
Function fill_gerosa_collection
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def fill_gerosa_collection(self, file_location, sheet_name='Sheet1', start_row=0,
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, cache_dirname, MongoDB, db, replicaSet=None, verbose=False, max_entries=float('inf'),