xchem/XChemExplorer

View on GitHub

Showing 437 of 1,077 total issues

File XChemExplorer.py has 5159 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import getpass
import glob
import math
import os
import pickle
Severity: Major
Found in xce/XChemExplorer.py - About 2 wks to fix

    File XChemThread.py has 2862 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import csv
    import glob
    import math
    import os
    import pickle
    Severity: Major
    Found in xce/lib/XChemThread.py - About 1 wk to fix

      File XChemRefine.py has 2129 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import getpass
      import glob
      import os
      from datetime import datetime
      
      
      Severity: Major
      Found in xce/lib/XChemRefine.py - About 5 days to fix

        File XChemUtils.py has 2038 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import bz2
        import gzip
        import json
        import math
        import os
        Severity: Major
        Found in xce/lib/XChemUtils.py - About 5 days to fix

          File XChemPANDDA.py has 1814 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          import csv
          import glob
          import os
          from datetime import datetime
          import subprocess
          Severity: Major
          Found in xce/lib/XChemPANDDA.py - About 4 days to fix

            File XChemDeposit.py has 1758 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            import fileinput
            import glob
            import os
            import sys
            
            
            Severity: Major
            Found in xce/lib/XChemDeposit.py - About 4 days to fix

              File XChemDB.py has 1745 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              import csv
              import getpass
              import sqlite3
              from datetime import datetime
              
              
              Severity: Major
              Found in xce/lib/XChemDB.py - About 4 days to fix

                File XChemCootNew.py has 1624 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                import getpass
                import glob
                import os
                import pickle
                from datetime import datetime
                Severity: Major
                Found in xce/lib/XChemCootNew.py - About 4 days to fix

                  File XChemCootTwin.py has 1460 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  import glob
                  import os
                  import pickle
                  
                  import coot
                  Severity: Major
                  Found in xce/lib/XChemCootTwin.py - About 3 days to fix

                    File XChemCootBuster.py has 1454 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    import getpass
                    import glob
                    import os
                    import pickle
                    from datetime import datetime
                    Severity: Major
                    Found in xce/lib/XChemCootBuster.py - About 3 days to fix

                      File XChemCoot.py has 1431 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      import glob
                      import os
                      import pickle
                      
                      import coot
                      Severity: Major
                      Found in xce/lib/XChemCoot.py - About 3 days to fix

                        Function deposition_data has 717 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            def deposition_data(self):
                                depositData = QtGui.QMessageBox()
                                depositDataLayout = depositData.layout()
                        
                                vbox = QtGui.QVBoxLayout()
                        Severity: Major
                        Found in xce/XChemExplorer.py - About 3 days to fix

                          File XChemCootOld.py has 1101 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          import os
                          import pickle
                          
                          import coot
                          import gobject
                          Severity: Major
                          Found in xce/lib/XChemCootOld.py - About 2 days to fix

                            File XChemMain.py has 1013 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            import glob
                            import gzip
                            import os
                            from datetime import datetime
                            
                            
                            Severity: Major
                            Found in xce/lib/XChemMain.py - About 2 days to fix

                              XChemExplorer has 124 functions (exceeds 20 allowed). Consider refactoring.
                              Open

                              class XChemExplorer(QtGui.QApplication):
                                  def __init__(self, args):
                                      # init a QApplication object to hold XCE
                                      QtGui.QApplication.__init__(self, args)
                              
                              
                              Severity: Major
                              Found in xce/XChemExplorer.py - About 2 days to fix

                                Function PDBheader has a Cognitive Complexity of 108 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def PDBheader(self, pdbfile):
                                        PDBinfo = {
                                            "Rcryst": "n/a",
                                            "RcrystTL": "gray",
                                            "Rfree": "n/a",
                                Severity: Minor
                                Found in xce/lib/XChemUtils.py - About 2 days 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 sync_pandda_table_NEW has a Cognitive Complexity of 88 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def sync_pandda_table_NEW(self):
                                        progress_step = 1
                                        progress = 0
                                        self.emit(QtCore.SIGNAL("update_progress_bar"), progress)
                                
                                
                                Severity: Minor
                                Found in xce/lib/XChemThread.py - About 1 day 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 create_maps_table has a Cognitive Complexity of 85 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def create_maps_table(self):
                                        column_name = self.db.translate_xce_column_list_to_sqlite(
                                            self.maps_table_columns
                                        )
                                
                                
                                Severity: Minor
                                Found in xce/XChemExplorer.py - About 1 day 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 phenix_molprobity has a Cognitive Complexity of 84 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def phenix_molprobity(self):
                                        QualityIndicators = {
                                            "MolprobityScore": "n/a",
                                            "MolprobityScoreColor": "gray",
                                            "RamachandranOutliers": "n/a",
                                Severity: Minor
                                Found in xce/lib/XChemUtils.py - About 1 day 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 StartGUI has 333 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    def StartGUI(self):
                                        self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
                                        self.window.connect("delete_event", gtk.main_quit)
                                        self.window.set_border_width(10)
                                        self.window.set_default_size(400, 800)
                                Severity: Major
                                Found in xce/lib/XChemCootOld.py - About 1 day to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language