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

update str_extract to remove stringr dep #10

Merged
merged 4 commits into from
Feb 19, 2025
Merged

Conversation

ayogasekaram
Copy link
Contributor

@ayogasekaram ayogasekaram commented Jan 31, 2025

closes #9


Pre-review Checklist (if item does not apply, mark is as complete)

  • All GitHub Action workflows pass with a ✅
  • PR branch has pulled the most recent updates from master branch: usethis::pr_merge_main()
  • If a bug was fixed, a unit test was added.
  • If a standalone script was updated, a comment is added to the script header (changelog) AND the last-updated field has been updated.
  • Code coverage is suitable for any new functions/features (generally, 100% coverage for new code): devtools::test_coverage()
  • Request a reviewer

Reviewer Checklist (if item does not apply, mark is as complete)

  • If a bug was fixed, a unit test was added.
  • If a standalone script was updated, a comment is added to the script header (changelog) AND the last-updated field has been updated.
  • Run pkgdown::build_site(). Check the R console for errors, and review the rendered website.
  • Code coverage is suitable for any new functions/features: devtools::test_coverage()

When the branch is ready to be merged:

  • All GitHub Action workflows pass with a ✅
  • Approve Pull Request
  • Merge the PR. Please use "Squash and merge" or "Rebase and merge".
  • Create an issue in any repositories using {standalone} to update the standalone scripts.

@ddsjoberg
Copy link
Collaborator

Thanks @ayogasekaram !! We can leave the stringr standalone file as it is. But we do need to update lines 163 and 164 to not use str_*() functions in the install packages standalone file.

compare = .data$version |> str_extract(pattern = "[>=<]+"),

@ddsjoberg ddsjoberg requested a review from Melkiades February 15, 2025 05:18
Copy link

@Melkiades Melkiades left a comment

Choose a reason for hiding this comment

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

Lgtm! Thanks Abi :) Could you add a small test to the stringr standalone? Just to guarantee identical ouputs (I think they do generate identical outputs but it is good to have a very small check of this)

@ayogasekaram
Copy link
Contributor Author

Hey @Melkiades Thank you for taking a look! As for the code, this is already in place in the stringr standalone script:

https://github.com/insightsengineering/standalone/blob/3a7ad7048513a2b318d8171cef18eb75a6298315/R/standalone-stringr.R#L39C1-L45C2
https://github.com/insightsengineering/standalone/blob/3a7ad7048513a2b318d8171cef18eb75a6298315/R/standalone-stringr.R#L59C1-L61C2

and is already covered by the unit tests for this script. Is there a specific test I should add?

@ayogasekaram
Copy link
Contributor Author

I added some anyways :) Let me know if those suffice!

@Melkiades
Copy link

I added some anyways :) Let me know if those suffice!

For me it is great! So we are 100% sure that it does the same thing. I do not know if it is fine keeping the stringr in suggestion, though. If we keep it there, I would keep the test. What do you think @ddsjoberg?

@ddsjoberg
Copy link
Collaborator

Awesome, thank you both!! Looks great!

@ayogasekaram ayogasekaram merged commit 60ba1ed into main Feb 19, 2025
7 checks passed
@ayogasekaram ayogasekaram deleted the 9_str_dep@main branch February 19, 2025 19:54
@github-actions github-actions bot locked and limited conversation to collaborators Feb 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unspecified dep in the pkg install script on the stringr standalone script
3 participants