CONTRIBUTING.md

Contributing

Welcome

Thank you for your interest in contributing to mmrefpoints! We hope to maintain this package as a resource for a broad set of stakeholders and modelers.

Table of Contents

Short Links

How Can I Contribute?

Style Guides

Short Links

How Can I Contribute?

Style Guides

Reporting Bugs

Bugs are tracked as GitHub issues. If you find a bug, please make your report as detailed as possible. Fill out the required bug report template; the information it asks for helps us resolve issues faster.

Note: If you find a Closed issue that looks like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one (you can tag issues by a hashtag (#) followed by the issue number).

Suggesting Enhancements

:pencil: We are always interested in how to make this package more useful and accessible. If you have an enhancement to suggest, please submit a Feature Request.

How do I submit a good enhancement suggestion?

Enhancement suggestions are tracked as GitHub issues. Create an issue on the mmrefpoints repository and include the following:

Pull requests

If you have a code suggestion in hand, please submit a pull request.

Write an issue on GitHub

Git commit messages

(many of these are lifted from the Atom style guide for commit messages)

Code style guides

We have adapted the following coding style guidelines from simulation developers with established guidelines, like ss3sim.

You will notice that some of the functionality of mmrefpoints may not follow all the advice in this style guide. I am working on streamlining much of this code (especially the Shiny code :construction_worker:), so in the meantime we request that you do as we style guide, not as we do.

Coding style

Importing functions from other packages

(these guidelines are lifted and adapted from the ss3sim developer wiki, which contains a lot of useful resources for developing code)

What if you need to use a function from another package? Normally you might attach all the functions from a package with a call to library(). This is a bad practice in the context of writing an R package. We shouldn't be attaching other packages in the user's environment. In the context of writing a package we will instead import that function for our use. The package structure ensures that the user has the package installed.

For more details, see http://r-pkgs.had.co.nz/namespace.html

Say you want to use the function mle2 from the bbmle package.

Here are the steps to use the function within your package:

The above steps outline one of two preferred notations. Within mmrefpoints we also use the :: notation to be explicit about what package a function comes from. E.g., shiny.i18n::update_lang() clearly tells readers of the code that the update_lang() function comes from the shiny.i18n package without readers having to navigate to the top of the code to read the roxygen documentation. This notation also requires that packages be listed in the Imports section of the DESCRIPTION file. We support either notation, but we have largely switched to this one as time goes on.

Occasionally your code might call so many functions from another package that you just want all the functions available. In that case use @import bbmle at the top. I have done this in places in mmrefpoints. But, it is best practices to import specific functions that we need because it saves time, which users appreciate. It also makes the code more explicit.

Code of conduct

Contributors to mmrefpoints follow the Contributor Covenant code of conduct. For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq.



mcsiple/mmrefpoints documentation built on June 17, 2022, 8:41 p.m.