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

Harmonise orderly_artefact() with orderly_dependency etc #160

Merged
merged 6 commits into from
Jul 15, 2024
Merged

Conversation

richfitz
Copy link
Member

@richfitz richfitz commented Jul 5, 2024

This PR does part 1 of harmonising orderly_artefact() with orderly_resource and friends:

  • the description argument, which other functions lack becomes optional in the schema and the function definition
  • warn if orderly_dependency() is used where the description arg is unnamed

This latter change, once in the wild, will make it less disruptive to change the order of the arguments, so that we have

orderly_artefact <- function(files, description = NULL) ...

See #150 for context

@richfitz richfitz marked this pull request as ready for review July 5, 2024 15:57
@richfitz richfitz requested review from M-Kusumgar and plietar July 5, 2024 15:57
Copy link
Member

@plietar plietar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any part of Packit that uses the artefacts from the metadata to view packets?

R/metadata.R Outdated
assert_scalar_character(description, call = environment())
orderly_artefact <- function(description = NULL, files) {
if (!is.null(description)) {
assert_scalar_character(description, call = environment())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about assert_scalar_character(description, call = environment(), allow_null = TRUE) ?

Quick grep through gives me a handful of occurrences of this pattern.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, good idea

Copy link
Contributor

@M-Kusumgar M-Kusumgar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@richfitz richfitz merged commit 8157057 into main Jul 15, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants