Showing 376 of 791 total issues
File victoria_parse_yeast_global_proteome_turnover.py
has 316 lines of code (exceeds 250 allowed). Consider refactoring. Open
import pandas as pd
import bson
from pymongo import MongoClient
from datanator_query_python.util import mongo_util
from datanator_query_python.config import config
Function build_obs_multi_ids
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
def build_obs_multi_ids(self, data, i, species):
"""Build observation object from data with more than one uniprot_id per row
Go into observations 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 add_complexes
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def add_complexes(self):
""" Parse complexes from data and add complexes to MongoDB """
raw_columns = [
'#Complex ac', 'Recommended name', 'Taxonomy identifier',
'Identifiers (and stoichiometry) of molecules in complex', 'Experimental evidence',
- 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 create_cross_references_from_sbml
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def create_cross_references_from_sbml(self, sbml):
""" Add cross references to the local sqlite database for an SBML object
Args:
sbml (:obj:`libsbml.SBase`): object in an SBML documentation
- 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_sabio_entity
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def build_sabio_entity(self, obj):
"""Build entity objects from sabio_rk_old collection.
Args:
obj (:obj:`Obj`): object from which entity objects will be built.
- 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_reactions
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def fill_reactions(self, start=0):
"""Fill reactions in which the protein acts as a catalyst.
Args:
start (:obj:`int`, optional): Starting document in sabio_rk. 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 load_content
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def load_content(self):
""" Download the content of SABIO-RK and store it to a local sqlite database. """
##################################
##################################
- 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 23 (exceeds 5 allowed). Consider refactoring. Open
def build_obs(self, data, i, table):
"""Build observation objects from obj. (Tables S4, S6-S9)
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_obs
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def build_obs(self, data, i, doc):
"""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 insert_canon_anc
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def insert_canon_anc(self, start=0):
"""Insert two arrays to each document, one is
canon_anc_id, the other is canon_anc_name
"""
query = {"canon_anc_ids": {"$exists": False}}
- 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_enzyme_molecular_weights
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def calc_enzyme_molecular_weights(self, enzymes):
""" Calculate the molecular weight of each enzyme
Args:
enzymes (:obj:`list` of :obj:`Enzyme`): list of enzymes
- 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
File uniprot_nosql.py
has 301 lines of code (exceeds 250 allowed). Consider refactoring. Open
'''
Generates uniprot_swiss (reviewed) NoSQL documents
load documents into MongoDB collections
:Author: Zhouyang Lian <zhouyang.lian@familian.life>
File victoria_parse_mouse_global_quantification.py
has 296 lines of code (exceeds 250 allowed). Consider refactoring. Open
import pandas as pd
import bson
from pymongo import MongoClient
from datanator_query_python.util import mongo_util
from datanator_query_python.config import config
Function create_kinetic_law_from_sbml
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def create_kinetic_law_from_sbml(self, id, sbml, root_species, specie_properties, functions, units):
""" Make a kinetic law doc for mongoDB
Args:
id (:obj:`int`): identifier
- 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 parse_paxDB_files
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def parse_paxDB_files(self):
""" This function parses pax DB files and adds them to the NoSQL database
"""
file_path = self.data_files[self.file_id]
entry = {}
- 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 parse_comments
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def parse_comments(self, comment_strs):
if not comment_strs:
return []
comment_strs = re.split(r';[ \n]', comment_strs.strip())
- 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 22 (exceeds 5 allowed). Consider refactoring. Open
def process_docs(self,
col,
db="datanator-test",
skip=0):
"""Processing documents and transform.
- 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
File victoria_parse_column_k0_mouse_brain.py
has 289 lines of code (exceeds 250 allowed). Consider refactoring. Open
import pandas as pd
from pymongo import MongoClient
from datanator_query_python.util import mongo_util
from datanator_query_python.config import config
Function add_reference_eymdb
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
def add_reference_eymdb(self, start=0):
"""(https://github.com/KarrLab/datanator_rest_api/issues/77)
"""
query = {}
projection = {"concentrations": 1, "inchikey": 1}
- 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
File molecule_util.py
has 284 lines of code (exceeds 250 allowed). Consider refactoring. Open
""" Utilities for dealing with molecules
:Author: Yosef Roth <yosefdroth@gmail.com>
:Author: Jonathan <jonrkarr@gmail.com>
:Date: 2017-04-12