Showing 376 of 791 total issues
Function fill_uniprot
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def fill_uniprot(self, url, sheet_name, usercols='B:D', skiprows=[0,1,2],
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, MongoDB=None,
Function one_to_many
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def one_to_many(self, inchi, collection_str='metabolites_meta',
Function parse_pathway_disease
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def parse_pathway_disease(self, lines, category='pathway'):
"""Parse parthway or disease or module information
Args:
line (:obj:`readlines()`): pathway lines.
- 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 load_kinetic_laws
has a Cognitive Complexity of 7 (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
- 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 remove_redudant_id
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def remove_redudant_id(self):
"""Remove redundant entries in uniprot collection.
Priority:
1. Has 'abundances' field
1. Has 'ko_name' field
- 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 bulk_load
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def bulk_load(self, bulk_size=100):
"""Loading bulk data into MongoDB.
Args:
bulk_size(:obj:`int`): number of entries per insertion. Defaults to 100.
- 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 get_json_ends
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def get_json_ends(tree):
ends = []
nodes = [tree]
while nodes:
new_nodes = []
- 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 load_ko
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def load_ko(self):
'''Load ko number for uniprot_id if such information
exists
'''
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_trna_collection
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def fill_trna_collection(self, file_location, start_row=0,
column_names=[],
reference={'doi': '10.1093/nar/gkx1030'},
query='amino_acid'):
"""
- 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 update_directory
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def update_directory(self):
data = pd.read_csv(self.dataset, delimiter='\t', nrows=10000)
data = data.where(pd.notnull(data), None)
for i in range(len(data)):
- 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 load_missing_kinetic_law_information_from_tsv
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def load_missing_kinetic_law_information_from_tsv(self, ids):
""" Update the properties of kinetic laws in the local sqlite database based on content downloaded
from SABIO in TSV format.
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 createJSON
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def createJSON(self):
data = pd.read_csv(self.dataset, delimiter='\t')
data = data.where(pd.notnull(data), None)
- 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 _default
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _default(self):
if self.app.pargs.by_name:
compounds = pubchempy.get_compounds(self.app.pargs.name_or_id, 'name')
results = [[compound.synonyms[0], 'pubchem.compound', compound.cid, compound.inchi] for compound in compounds]
else:
- 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_taxon_info
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def add_taxon_info(self):
"""Fill in taxonomic information
"""
projection = {'_id': 0, 'kinlaw_id': 1, 'taxon_id': 1}
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 build_entity
has a Cognitive Complexity of 7 (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 label_existence
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def label_existence(self, start=0):
"""Label reactant's existence in metabolites collections.
"""
docs = self.metabolites_meta_manager.find({})
count = self.metabolites_meta_manager.count_documents({})
- 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 stringify
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def stringify(self):
#TODO: Add the modifier
participants = self.get_ordered_participants()
result = ''
- 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 process_docs
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def process_docs(self, skip=0):
query = {}
projection = {"_id": 0}
docs = self.client["datanator-test"]["metabolites_meta"].find(filter=query, projection=projection)
for i, doc in enumerate(docs):
- 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"