-
Notifications
You must be signed in to change notification settings - Fork 4
Update docs #55
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
base: main
Are you sure you want to change the base?
Update docs #55
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,10 +1,12 @@ | ||||||
| #' @include impl_data.R | ||||||
|
|
||||||
| source_code_or_install <- new_union(source_code_resource, install_resource) | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I know this name gets long, but I think we should be consistent, even if verbose. If we can't be consistent because of the variable length, we should instead find a consistent shorthand, (eg
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's first resolve if we keep it or not, but I don't think adding the suffix makes it too long, so I agree with the suggested change. |
||||||
|
|
||||||
| #' @importFrom desc desc | ||||||
| impl_data( | ||||||
| "desc", | ||||||
| class = c("description", "R6"), | ||||||
| for_resource = new_union(source_code_resource, install_resource), | ||||||
| for_resource = source_code_or_install, | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just for my own knowledge, is this for performance reasons? Personally, I kinda prefer the type union for transparency. Conceptually, the source code and install resources are quite different and we just happen to be able to use the same syntactic code to evaluate both because of how If it's for performance reasons, maybe we can wrap this in a But it's not a strong conviction and happy to hear your thoughts on the right path here.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was experimenting with |
||||||
| function(pkg, resource, field, ...) { | ||||||
| desc::desc(resource@path) | ||||||
| } | ||||||
|
|
@@ -14,7 +16,7 @@ impl_data( | |||||
| "name", | ||||||
| title = "Package name", | ||||||
| class = class_character, | ||||||
| for_resource = new_union(source_code_resource, install_resource), | ||||||
| for_resource = source_code_or_install, | ||||||
| function(pkg, resource, field, ...) { | ||||||
| pkg$desc$get_field("Package") | ||||||
| } | ||||||
|
|
@@ -31,7 +33,7 @@ impl_data( | |||||
| impl_data( | ||||||
| "version", | ||||||
| class = class_character, | ||||||
| for_resource = new_union(source_code_resource, install_resource), | ||||||
| for_resource = source_code_or_install, | ||||||
| function(pkg, resource, field, ...) { | ||||||
| pkg$desc$get_field("Version") | ||||||
| } | ||||||
|
|
@@ -48,7 +50,7 @@ impl_data( | |||||
| impl_data( | ||||||
| "md5", | ||||||
| class = class_character, | ||||||
| for_resource = new_union(source_code_resource, install_resource), | ||||||
| for_resource = source_code_or_install, | ||||||
| function(pkg, resource, field, ...) { | ||||||
| pkg$desc$get_field("MD5sum") | ||||||
| } | ||||||
|
|
||||||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.