Skip to content

call_MODIS argument cleanup #2519

@infotroph

Description

@infotroph

I won't hold up the PR for this, but two strong suggestions:

  • Changing the arguments to an exported function is a breaking change, so it should have a CHANGELOG entry. Breaking changes aren't always bad -- I think most users will prefer this version over the old one! -- but when we change interfaces we want to do it cautiously and document the changes conspicuously.

  • When a function has some arguments with default values and some without, it's usually best to put the arguments without default values should be at the beginning of the argument list and the ones with defaults (even if they're NULL) afterwards. Since you're changing argument order in this PR anyway, I encourage doing that now to avoid needing another round of breaking changes to do it later.

Originally posted by @infotroph in https://github.com/_render_node/MDIzOlB1bGxSZXF1ZXN0UmV2aWV3VGhyZWFkMjA4Njc2ODEzOnYy/pull_request_review_threads/discussion

Bumped this to a new issue to avoid holding up #2338.

Additional thought: If I'm following right, the outfolder argument is slightly magic in that when it's a path the function both writes to disk and puts the downloaded data in its return value, whereas when outfolder = NULL the function writes no files and only returns the values. This behavior seems reasonable, but should be documented.

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