Skip to content
/ greta.template Public template

a template repository to help set up new greta extension packages

License

Notifications You must be signed in to change notification settings

greta-dev/greta.template

Repository files navigation

greta.template

Codecov test coverage R-CMD-check

This is an empty repository to help you build an extension to greta. It’s a GitHub template repository, so you can make a copy to build your extension from by following these steps:

  1. Click Use this template to the left of Clone or download. template
  2. Give this repo a new name (preferably greta.<something>) and create a new repo in your account.
  3. Clone the repository and start filling out all the fields to make the package your own. See Jenny Bryan’s Happy Git with R if you’d like some help with this.

Please don’t hit the fork button, that would make a permanent link between your repository and this one!


to do list

Here’s a list of things to do once you’ve made a copy of the template, to make sure the package is ship-shape. Maybe take a look at the corresponding parts of greta or tensorflow if you need inspiration or text to copy and adapt!

  • Pick a package name (preferably with ‘greta.’ at the beginning). Update the package name in:
    • the ‘Package’ field in DESCRIPTION
    • the library() and test_check() calls in tests/testthat.R
    • in the @name documentation field in R/package.R
    • at the top of README.Rmd
    • the repo name (if it changed since you made it)
    • the R project file; rename it from greta.template.Rproj to greta.<something>.Rproj
  • Come up with a helpful package title. Add it to:
    • the ‘Title’ field in DESCRIPTION
    • the @title documentation field in R/package.R
    • at the top of your GitHub repo
  • Fill in the the author details in DESCRIPTION
  • Update the ‘URL’ and ‘BugReports’ fields in DESCRIPTION to point to your repo
  • Decide what sort of license you want to use for your package (you are completely free to change the CC0 license in the template). See https://choosealicense.com or r-pkgs.org for help choosing.
    • create the license file and edit the ‘License’ field in DESCRIPTION (e.g. with the usethis package)
  • Write short paragraph describing the package. Copy it to:
    • the ‘Description’ field of DESCRIPTION
    • the @description documentation field of R/package.R
  • add a github actions badge with use_github_actions_badge()
  • edit the codecov badge in README.Rmd to point to your package
  • Write a simple example introducing the package and add it to R/package.R
  • Update README.Rmd to sell to people with a sales pitch and maybe an example that creates a figure, to get people excited about your package.
  • Start adding functions, documentation and examples to new R files in R folder
  • Write some unit tests for these functions in the tests/testthat folder
  • Delete the example function and test files R/square.R and tests/testthat/test-square.R

If you see something missing in this template or the to do list, please let us know via the issues, or send a pull request. We’d really appreciate it. This template comes with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms. We also hope people using the template will keep the Code of Conduct with their package code.

p.s. thanks @karthik for the awesome template-template I shamelessly copied from karthik/binder-test

About

a template repository to help set up new greta extension packages

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages