Skip to content

solarposition.py: args mismatch for pyephem call from get_solarposition function #374

Closed

Description

@KonstantinTr

pyephem function is defined with next args:

def pyephem(time, latitude, longitude, altitude=0, pressure=101325,
            temperature=12):

then we call it from get_solarposition.

    elif method == 'pyephem':
        ephem_df = pyephem(time, latitude, longitude, pressure, temperature,
                           **kwargs)

as far as altitude is missing and we are passing positional args - pressure goes to altitude, temperature goes to pressure and temperature receives its default value

during the tests pyephem is called with keyword args and the is no test for calling get_solarposition with method='pyephem' arg.

def test_pyephem_physical(expected_solpos):
...
    ephem_data = solarposition.pyephem(times, golden_mst.latitude,
                                       golden_mst.longitude, pressure=82000,
                                       temperature=11)
...

I have fixed pyephem function call from get_solarposition but before creating a pull request I'd like to check what test will be sufficient for covering such a mistake? Will get_solarposition call with a method='pyephem' be enough?

Activity

  1. wholmgren commented on Sep 13, 2017

    @wholmgren
    Member

    Good catch. I think the proposed test would be sufficient.

  2. added this to the 0.5.1 milestone on Sep 13, 2017
  3. added a commit that references this issue on Oct 9, 2017
  4. wholmgren commented on Oct 9, 2017

    @wholmgren
    Member

    closed by #381

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions