lucydot/effmass

View on GitHub

Showing 291 of 291 total issues

Function done has 70 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        function done( status, nativeStatusText, responses, headers ) {
            var isSuccess, success, error, response, modified,
                statusText = nativeStatusText;

            // Ignore repeat invocations
Severity: Major
Found in docs/build/_static/jquery-3.5.1.js - About 2 hrs to fix

    Function resolve has 69 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                        function resolve( depth, deferred, handler, special ) {
                            return function() {
                                var that = this,
                                    args = arguments,
                                    mightThrow = function() {
    Severity: Major
    Found in docs/build/_static/jquery-3.5.1.js - About 2 hrs to fix

      Consider simplifying this complex logical expression.
      Open

                              if ( forward && useCache ) {
      
                                  // Seek `elem` from a previously-cached index
      
                                  // ...in a gzip-friendly way
      Severity: Critical
      Found in docs/build/_static/jquery-3.5.1.js - About 2 hrs to fix

        Function deepEq has 66 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function deepEq(a, b, aStack, bStack) {
            // Unwrap any wrapped objects.
            if (a instanceof _) a = a._wrapped;
            if (b instanceof _) b = b._wrapped;
            // Compare `[[Class]]` names.
        Severity: Major
        Found in docs/build/_static/underscore-1.12.0.js - About 2 hrs to fix

          Function superMatcher has 65 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  superMatcher = function( seed, context, xml, results, outermost ) {
                      var elem, j, matcher,
                          matchedCount = 0,
                          i = "0",
                          unmatched = seed && [],
          Severity: Major
          Found in docs/build/_static/jquery-3.5.1.js - About 2 hrs to fix

            Similar blocks of code found in 3 locations. Consider refactoring.
            Open

                plt.plot(
                    np.linspace(segment.dk_angs[0], segment.dk_angs[-1], 100),
                    np.divide(segment.five_point_leastsq_fit(), ev_to_hartree),
            Severity: Major
            Found in effmass/outputs.py and 2 other locations - About 2 hrs to fix
            effmass/outputs.py on lines 245..247
            effmass/outputs.py on lines 258..261

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 55.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 3 locations. Consider refactoring.
            Open

                plt.plot(
                    np.linspace(segment.dk_angs[0], segment.dk_angs[-1], 100),
                    np.divide(segment.finite_difference_fit(), ev_to_hartree),
            Severity: Major
            Found in effmass/outputs.py and 2 other locations - About 2 hrs to fix
            effmass/outputs.py on lines 251..253
            effmass/outputs.py on lines 258..261

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 55.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 3 locations. Consider refactoring.
            Open

                try:
                    plt.plot(
                        np.linspace(segment.dk_angs[0], segment.dk_angs[-1], 100),
                        np.divide(segment.weighted_leastsq_fit(), ev_to_hartree),
            Severity: Major
            Found in effmass/outputs.py and 2 other locations - About 2 hrs to fix
            effmass/outputs.py on lines 245..247
            effmass/outputs.py on lines 251..253

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 55.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Function make_table has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
            Open

            def make_table(segments, which_values=None):
                """Prints table summary of segments data to terminal
            
                Args:
                    segments (list): Which segments to use.
            Severity: Minor
            Found in effmass/outputs.py - About 2 hrs 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 domManip has 60 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function domManip( collection, args, callback, ignored ) {
            
                // Flatten any nested arrays
                args = flat( args );
            
            
            Severity: Major
            Found in docs/build/_static/jquery-3.5.1.js - About 2 hrs to fix

              Function ajaxConvert has 59 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function ajaxConvert( s, response, jqXHR, isSuccess ) {
                  var conv2, current, conv, tmp, prev,
                      converters = {},
              
                      // Work with a copy of dataTypes in case we need to modify it for conversion
              Severity: Major
              Found in docs/build/_static/jquery-3.5.1.js - About 2 hrs to fix

                Function highlightText has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                Open

                jQuery.fn.highlightText = function(text, className) {
                  function highlight(node, addItems) {
                    if (node.nodeType === 3) {
                      var val = node.nodeValue;
                      var pos = val.toLowerCase().indexOf(text);
                Severity: Minor
                Found in docs/build/_static/doctools.js - About 2 hrs 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 displayNextItem has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function displayNextItem() {
                      // results left, load the summary and display it
                      if (results.length) {
                        var item = results.pop();
                        var listItem = $('<li></li>');
                Severity: Major
                Found in docs/build/_static/searchtools.js - About 2 hrs to fix

                  Function init has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      init = jQuery.fn.init = function( selector, context, root ) {
                          var match, elem;
                  
                          // HANDLE: $(""), $(null), $(undefined), $(false)
                          if ( !selector ) {
                  Severity: Major
                  Found in docs/build/_static/jquery-3.5.1.js - About 2 hrs to fix

                    Function __init__ has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        def __init__(self, directory_path, output_name="calculation.out"):
                            r"""
                            Initialises an instance of the :class:`~effmass.inputs.DataAims` class and checks data using :meth:`check_data`.
                    
                            Args:
                    Severity: Major
                    Found in effmass/inputs.py - About 2 hrs to fix

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                          for band in range(0, height):
                              if (holes_array[band, 1] >= holes_array[band, 0]):
                                  not_maxima.append([band, 0])
                      Severity: Major
                      Found in effmass/extrema.py and 1 other location - About 2 hrs to fix
                      effmass/extrema.py on lines 287..289

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 51.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                          assert (
                              states_per_unit_cell < np.absolute(Data.integrated_dos[-1][1] -
                                                                 Data.integrated_dos[CBM_index][1])
                      Severity: Major
                      Found in effmass/dos.py and 1 other location - About 2 hrs to fix
                      effmass/dos.py on lines 158..160

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 51.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                          assert (
                              states_per_unit_cell < np.absolute(Data.integrated_dos[0][1] -
                                                                 Data.integrated_dos[VBM_index][1])
                      Severity: Major
                      Found in effmass/dos.py and 1 other location - About 2 hrs to fix
                      effmass/dos.py on lines 95..97

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 51.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                          for band in range(0, height):
                              if (electrons_array[band, -2] <= electrons_array[band, -1]):
                                  not_minima.append([band, -1])
                      Severity: Major
                      Found in effmass/extrema.py and 1 other location - About 2 hrs to fix
                      effmass/extrema.py on lines 317..319

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 51.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                          for band in range(0, height):
                              if (holes_array[band, -2] >= holes_array[band, -1]):
                                  not_maxima.append([band, -1])
                      Severity: Major
                      Found in effmass/extrema.py and 1 other location - About 2 hrs to fix
                      effmass/extrema.py on lines 283..285

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 51.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Severity
                      Category
                      Status
                      Source
                      Language