Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Default to version = packageVersion(pkg) and type = "cran" #66

Open
ColinFay opened this issue Jul 13, 2021 · 3 comments
Open
Labels
enhancement New feature or request

Comments

@ColinFay
Copy link

  • What are you trying to do?
> oysteR::audit("shiny")
Error in oysteR::audit("shiny") : 
  argument "version" is missing, with no default

> oysteR::audit("shiny", version = packageVersion("shiny"))
Error in generate_purls(pkg, version, type) : 
  argument "type" is missing, with no default

> oysteR::audit("shiny", version = packageVersion("shiny"), type = "cran")
ℹ Using cached results for 1 package
Error: Can't combine `version` <character> and `version` <package_version>.
  • What feature or behavior is this required for?

It would be nice to default to version = packageVersion(pkg) and type = "cran", which seems to be the most common use case (auditing package version installed on the machine, and for CRAN).

  • How could we solve this issue? (Not knowing is okay!)

Happy to PR this.

  • Anything else?

cc @bhamail / @DarthHater / @brittanybelle / @adrianpowell / @csgillespie

@ColinFay ColinFay added the enhancement New feature or request label Jul 13, 2021
@csgillespie
Copy link
Member

Thanks @ColinFay

  1. Doing a behind the scenes conversion of packageVersion to character seems like a good idea. Just test for class, then convert.
  2. I've been unsure about defaults because the API works for other languages
audit("pandas", version = "0.1.0", type = "pypi")
  1. My gut feeling is to have a new function: audit_r_pkg that defaults to CRAN, and tests all dependencies as well.

Thoughts?

@ColinFay
Copy link
Author

yeah I suppose that does make sense to have an audit_r_pkg with these default :)

Will draft a PR if that's ok with you !

@csgillespie
Copy link
Member

csgillespie commented Jul 13, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants