pysat/pysatMissions

View on GitHub

Showing 13 of 76 total issues

File missions_sgp4.py has 280 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# -*- coding: utf-8 -*-
# Full author list can be found in .zenodo.json file
# DOI:10.5281/zenodo.3475498
#
# DISTRIBUTION STATEMENT A: Approved for public release. Distribution is
Severity: Minor
Found in pysatMissions/instruments/missions_sgp4.py - About 2 hrs to fix

    File missions_skyfield.py has 252 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    # -*- coding: utf-8 -*-
    # Full author list can be found in .zenodo.json file
    # DOI:10.5281/zenodo.3475498
    #
    # DISTRIBUTION STATEMENT A: Approved for public release. Distribution is
    Severity: Minor
    Found in pysatMissions/instruments/missions_skyfield.py - About 2 hrs to fix

      Function load has 16 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def load(fnames, tag=None, inst_id=None, tle1=None, tle2=None,
      Severity: Major
      Found in pysatMissions/instruments/missions_skyfield.py - About 2 hrs to fix

        Function load has 16 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def load(fnames, tag=None, inst_id=None, tle1=None, tle2=None,
        Severity: Major
        Found in pysatMissions/instruments/missions_sgp4.py - About 2 hrs to fix

          Function load has 10 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def load(fnames, tag=None, inst_id=None, obs_long=0., obs_lat=0., obs_alt=0.,
          Severity: Major
          Found in pysatMissions/instruments/missions_ephem.py - About 1 hr to fix

            Function load has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            def load(fnames, tag=None, inst_id=None, tle1=None, tle2=None,
                     alt_periapsis=None, alt_apoapsis=None,
                     inclination=None, raan=0., arg_periapsis=0., mean_anomaly=0.,
                     epoch=None, bstar=0., one_orbit=False, num_samples=None, cadence='1S'):
                """Generate position of satellite in ECI co-ordinates.
            Severity: Minor
            Found in pysatMissions/instruments/missions_sgp4.py - About 1 hr to fix

              Function load has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              def load(fnames, tag=None, inst_id=None, tle1=None, tle2=None,
                       alt_periapsis=None, alt_apoapsis=None,
                       inclination=None, raan=0., arg_periapsis=0., mean_anomaly=0.,
                       epoch=None, bstar=0., one_orbit=False, num_samples=None, cadence='1S'):
                  """Generate position of satellite in ECI co-ordinates.
              Severity: Minor
              Found in pysatMissions/instruments/missions_skyfield.py - About 1 hr to fix

                Function project_ecef_vector_onto_sc has 8 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def project_ecef_vector_onto_sc(inst, x_label, y_label, z_label,
                Severity: Major
                Found in pysatMissions/methods/spacecraft.py - About 1 hr to fix

                  Function load has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def load(fnames, tag=None, inst_id=None, tle1=None, tle2=None,
                           alt_periapsis=None, alt_apoapsis=None,
                           inclination=None, raan=0., arg_periapsis=0., mean_anomaly=0.,
                           epoch=None, bstar=0., one_orbit=False, num_samples=None, cadence='1S'):
                      """Generate position of satellite in ECI co-ordinates.
                  Severity: Minor
                  Found in pysatMissions/instruments/missions_sgp4.py - About 55 mins 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 package_check has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def package_check(package_name):
                      """Throw a warning if optional package is not installed.
                  
                      Some systems are having issues installing OMMBV and apexpy.
                      This allows these packages to be optionally installed.
                  Severity: Minor
                  Found in pysatMissions/utils/_core.py - About 45 mins 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 load has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def load(fnames, tag=None, inst_id=None, tle1=None, tle2=None,
                           alt_periapsis=None, alt_apoapsis=None,
                           inclination=None, raan=0., arg_periapsis=0., mean_anomaly=0.,
                           epoch=None, bstar=0., one_orbit=False, num_samples=None, cadence='1S'):
                      """Generate position of satellite in ECI co-ordinates.
                  Severity: Minor
                  Found in pysatMissions/instruments/missions_skyfield.py - About 45 mins 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 _check_orbital_params has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def _check_orbital_params(kwargs):
                      """Check that a complete set of unconflicted orbital parameters exist.
                  
                      Parameters
                      ----------
                  Severity: Minor
                  Found in pysatMissions/instruments/methods/orbits.py - About 25 mins 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 load has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def load(fnames, tag=None, inst_id=None, obs_long=0., obs_lat=0., obs_alt=0.,
                           tle1=None, tle2=None, num_samples=None, cadence='1S'):
                      """Generate position of satellite in both geographic and ECEF co-ordinates.
                  
                      Note
                  Severity: Minor
                  Found in pysatMissions/instruments/missions_ephem.py - About 25 mins 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

                  Severity
                  Category
                  Status
                  Source
                  Language