CONTRIBUTING.md

:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:

The following is a set of guidelines for contributing to the R package SKELETON.

Code Licensing

By contributing, you understand and agree that your work becomes the part of the SKELETON project and will be licensed under the GNU GPL v3.

Reporting Bugs and Submitting Suggestions

Code and Documentation Style Guide

We're currently transitioning the documentation to markdown. - Please write any new documentation in markdown already. - Enable markdown for a particular help page with #' @md. - Whenever touching a function whose documentation is still LaTeX-style, please take the time to convert it to markdown. Here are some regexps to help with search and replace of \code{} and \link[]{}.

Vignette Style and Standards

Working With Git

Branches

This project follows the git flow branching model.

Briefly

The branch master contains stable releases that are tested and guaranteed to work. It is not allowed to contribute directly to master.

The branch develop contains latest delivered development changes for the next release. When develop reaches a stable point and is ready to be released, it gets merged to master and tagged with a version number (e.g. 'v0.99.21'). This procedure is a subject for a strict review.

You should not directly contribute to develop, unless the change is trivial (e.g. a typo). Instead, for any new feature or bugfix, please create a separate supporting branch. We use a default naming convention for them:

It is recommended to use the git flow tool to streamline the process (see Cheatsheet for git flow). However, do not call git flow xxx finish as it makes a merge without the code review - instead, finish your branch by opening a pull request.

Please make sure that the package can be built and and that all checks and unit tests are passed before merging back into develop. The shortcut in RStudio for that is Ctrl+Shift+E.

If you are making a significant change, please also add an entry to NEWS.md.

Wait, What if I'm not Allowed to Create a Branch in the Main Repository?

If you are not a member of the project then you cannot create a branch in the main repository. But this is not a problem! In this case, you simply fork the main repository, make the changes starting off the develop branch, and merge it back into the develop branch of the main repository via a pull request.

After a successful code review the pull request gets accepted, and your changes are represented in the main repo as a separate branch (in accordance with our guidelines). After that you can delete your fork, if you'd like.

Pull Requests

Open a pull request via GitHub interface to let others see your work and review it. It is a collaborative tool, so we encourage you to open a 'draft pull request' as soon as you start working on your part. This provides a place for the community to discuss your work and correct it as you go. Once your part is completed, change the status to “Ready for review”.

The project maintainer may want to merge your pull request when your work is usable, even before it is 100% complete. In such a case, the branch must be deleted and a new one created off the develop branch. You can use the same name for it to indicate that this is a continuation. It will be merged, as usual, via a new pull request. This may seem to be an overhead at first glance, but it leads to a faster integration and makes the the pull requests smaller and less overwhelming.

The merged support branches should be deleted - they're clutter. If you want to keep their name for reference, just apply a git tag after the merge. Never reuse merged branches, it can lead to problems.

Git Commits

Commit often, try to make small atomic commits. An atomic commit addresses only a small separate fix or change and is more or less self-consistent. Every commit should be related to one feature only, but the commit should group strongly related changes together (e.g. when refactoring to rename a function, all files that are affected by this should be in the same commit).

Commit Messages

Versioning

The project adheres to the semantic versioning guidelines, as outlined at https://semver.org/ (Work in progress, see #123).

Briefly, the version string has the form x.y.z (or major.minor.patch), where the major number gets incremeted if a release introduces breaking changes, the minor one after any changes in functionality (new features of bugfixes), and the patch number is increased after any trivial change. If a major or minor number is incremented, all subsequent ones are set to zero.

The version numbers refer only to commits in the master branch, and get incremented in one of two cases: during the release preparation, when a release/x.y.z branch buds off develop and merges into master. after a hotfix, which also results in a new commit on master. * development branches have version x.x.x.9000 (or .9001 and so on - but that is rarely needed). This is important since pkgdown uses the .9000 to distinguish between documentation for the released version vs. the development version.

Release Process

The process starts when the package is in a stable state that can be released to CRAN (release candidate). First, decide on a new version number x.y.z based on the severity of changes. Then:

Thanks! :heart:



r-hyperspec/hySpc.ggplot2 documentation built on May 2, 2023, 2:37 p.m.