Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

Consider deprecating this in favour of a pacta.usethis package #11

Open
jdhoffa opened this issue Jan 30, 2024 · 5 comments
Open

Consider deprecating this in favour of a pacta.usethis package #11

jdhoffa opened this issue Jan 30, 2024 · 5 comments
Labels
breaking change ☠️ API change likely to affect existing code help wanted ❤️ we'd love your help!

Comments

@jdhoffa
Copy link
Member

jdhoffa commented Jan 30, 2024

usethis provides utility functions that allow easy (and consistent) development of R packages.
We may consider writing a wrapper package around this, to facilitate the building and deployment of RMI style R packages.

This could include, for example:

  • Ensure consistently formatted READMEs
  • Add pkgdown websites
  • Add other useful (and optional) GitHub actions from the https://github.com/RMI-PACTA/Actions repo
  • Other things?? For example consistent issue labels?

Two benefits of this approach:

  • It allows users to retroactively format their packages (rather than requiring them to base them off of the pacta.r.packge
  • It allows many optional steps (e.g. users may opt in to certain actions)
  • Others...?

FYI. @cjyetman and @AlexAxthelm curious to hear your thoughts here

@cjyetman
Copy link
Member

{usethis} typically does too much magic for my taste, so I'm not really sure what's possible... but sounds interesting.

@jdhoffa
Copy link
Member Author

jdhoffa commented Jan 30, 2024

For flavor, some of the things we could wrap:

  • create_package(): we could "wrap" this to create an R package or project from our pacta.* or workflow.* template repos (seems a bit overkill tbh)

Could potentially wrap a lot of the tidyverse helpers, replace tidy with rmi, e.g.:

  • use_rmi_logo: To add the RMI logo to a repo README
  • use_rmi_github_actions: To use different GH actions from our Actions repo. Could define "mandatory" actions and have a CLI for "optional" actions or something like that
  • use_*_badge: to add badges
  • just about anything else in (I'm too lazy to copy everything out from here lol): https://usethis.r-lib.org/reference/index.html

None of these things are ground-breaking, but they would allow a utility to ensure we can stay somewhat self-consistent if we want to... Especially now that we have so many individual maintainers, it would be nice to have some standards that help us to not diverge completely.

The benefit I see to this, over just having the template repo, is that the maintainer at the end of the day would decide if/ how/ when they want to use any of these, so @cjyetman if you would prefer not to use "magic side effect" functions, you could still just do everything manually.

Then, the main question would be, who if anyone would find this useful, and is it enough appetite to warrant maintaining it?
The "users" of this that I could imagine are @RMI-PACTA/developers, so can you guys just comment a 👍 or 👎 if this is something you would be interested in/ find useful, and we can go from there?

@jdhoffa
Copy link
Member Author

jdhoffa commented Jan 30, 2024

Soft 👍 (honestly I also just use usethis and am happy to keep doing that and maintaining things manually, its not such a big burden for me)

@jdhoffa jdhoffa added breaking change ☠️ API change likely to affect existing code help wanted ❤️ we'd love your help! labels Feb 6, 2024
@jdhoffa
Copy link
Member Author

jdhoffa commented Feb 7, 2024

An example usethis wrapper can be seen here: https://github.com/RMI-PACTA/r2dii.usethis

@MonikaFu
Copy link

I would be happy to use it if it exists but at the same time, I am not sure if the amount of time we would use it is worth the effort. And if having good practices around package maintenance is not enough here without a helper package. Maybe before we start developing it it would be useful to list all the potential candidates for usethis-like functions specific to our work? Or if not all then some.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking change ☠️ API change likely to affect existing code help wanted ❤️ we'd love your help!
Projects
None yet
Development

No branches or pull requests

3 participants