Skip to contents

Thank you for any and all contributions! Following these guidelines will help streamline the process of contributing and make sure that we’re all on the same page. While we ask that you read this guide and follow it to the best of your abilities, we welcome contributions from all, regardless of your level of experience.

By participating in this project, you agree to abide by the code of conduct.

Types of contributions

Don’t feel that you must be a computer whiz to make meaningful contributions. Feel free to:

New to GitHub?

Getting ready to make your first contribution? Here are a couple of tutorials you may wish to check out:

How to contribute code

  • Open and issue or comment on an existing one and describe what you’d like to do (this ensures you don’t waste your time if the problem has been or is in the process of being resolved and gives us a chance to chat about you plan to address the problem)
  • Fork the repository
  • Clone the repository from GitHub to your computer e.g,. git clone https://github.com/ropensci/weathercan.git
  • Make sure to track progress upstream (i.e., on our version of weathercan at ropensci/weathercan)
    • git remote add upstream https://github.com/ropensci/weathercan.git
    • Before making changes make sure to pull changes in from upstream with git pull upstream
  • Make your changes
    • For changes beyond minor typos, add an item to NEWS.md describing the changes and add yourself to the DESCRIPTION file as a contributor
  • Push to your GitHub account
  • Submit a pull request to home base (main branch) at ropensci/weathercan

Code formatting

  • Please don’t do large scale code formatting as part of a PR meant to fix a non-formatting related problem, it makes it hard to see what changes are actually being made
  • In general follow the convention of http://r-pkgs.had.co.nz/r.html#style (snake_case functions and argument names, etc.)
  • Where there is conflict, default to the style of weathercan
  • Use explicit package imports (i.e. package_name::package_function) and avoid @import if at all possible
  • We use the Air formatter for everything else

Use of AI

  • Using AI as a tool to help you review weathercan is totally fine
  • Please do a solid review of the AI code suggestions and ask if you’re unsure what they mean
  • Let us know how you’re using AI so we have the proper context when responding to a PR

Development and Testing - In depth

In order to actively develop and test weathercan (i.e. beyond small documentation changes) you will need to set up your system for R Package development (R Packages is a great resource here).

  • After cloning the repository (above), install R packages devtools and pak.
  • If using RStudio, open the weathercan project
  • Use pak to install all weathercan dependencies: pak::local_install()
  • Try running tests any time you edit something (in RStudio, this is Ctrl/Cmd-Shift-T)
  • You can load all internal functions for interactive testing using Ctrl/Cmd-Shift-L.

If this doesn’t work, please try and update this section! The more the better.