Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify code #325

Open
olgabot opened this issue Dec 1, 2015 · 0 comments
Open

Simplify code #325

olgabot opened this issue Dec 1, 2015 · 0 comments

Comments

@olgabot
Copy link
Collaborator

olgabot commented Dec 1, 2015

Looking into the McCabe index which measures the amount of complexity in the code, many functions in flotilla are too complex. Once we replace the guts holding the data with xray then I think many of these will fall away but yeah there's a lot of if/elses in this code :)

$ flake8 --max-complexity 10 | grep complex
./flotilla/datapackage.py:124:1: C901 'make_study_datapackage' is too complex (12)
./flotilla/data_model/gene_ontology.py:51:1: C901 'GeneOntologyData.enrichment' is too complex (11)
./flotilla/data_model/metadata.py:21:1: C901 'MetaData.__init__' is too complex (12)
./doc/sphinxext/ipython_directive.py:152:1: C901 'block_parser' is too complex (12)
./doc/sphinxext/ipython_directive.py:387:1: C901 'EmbeddedSphinxShell.process_input' is too complex (17)
./doc/sphinxext/ipython_directive.py:642:1: C901 'EmbeddedSphinxShell.process_pure_python' is too complex (17)
./flotilla/test/data_model/test_basedata.py:304:1: C901 'test_subsets_from_metadata' is too complex (11)
./flotilla/study.py:77:1: C901 'Study.__init__' is too complex (16)
./flotilla/study.py:1417:1: C901 'Study.save' is too complex (14)
./flotilla/visualize/generic.py:7:1: C901 'violinplot' is too complex (13)
./flotilla/visualize/network.py:26:1: C901 'NetworkerViz.draw_graph' is too complex (21)
./flotilla/visualize/network.py:220:1: C901 'NetworkerViz.draw_nonreduced_graph' is too complex (18)
./flotilla/visualize/decomposition.py:23:1: C901 'DecompositionViz.__init__' is too complex (11)
./flotilla/visualize/decomposition.py:358:1: C901 'DecompositionViz.plot_samples' is too complex (16)
./flotilla/visualize/decomposition.py:562:1: C901 'DecompositionViz.plot_violins' is too complex (15)
./flotilla/visualize/ipython_interact.py:83:1: C901 'Interactive.interactive_pca' is too complex (13)
./flotilla/visualize/ipython_interact.py:277:1: C901 'Interactive.interactive_classifier' is too complex (11)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant