Skip to content

Documentation of function parameters is inconsistent and sometimes misleading for new users #116

@horsburgh

Description

@horsburgh

Using dataretrieval 1.0.6 in my class this week. Students noticed the following in PyCharm:

image

I told them they could pass a single site as a string or a list of sites as a list of strings, but they were confused because the highlighted message says "Expected type 'array.pyi' got 'str' instead".

The documentation of the get_discharge_peaks function says "array of strings":

image

I even had one student who converted his site code to a Numpy array and passed it to the get_discharge_peaks function. The function actually returns a response, but it's not just for the one site - it had data for lots of sites. Didn't dig in too deep there.

Documentation of the sites parameter for other functions is ambiguous, but not as confusing. In PyCharm:

image

In the code:

image

@thodson-usgs - we could take a crack at cleaning this up unless this is intentional or there's another reason not to?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions