An R package for working with CUREd data. This package handles the ingress of data and linking between the different data sources.
Install development versions of this package from GitHub using the following code.
# install.packages("devtools")
devtools::install_github("CUREd-Plus/cuRed")
TODO Add usage once we have code to work with!
This section describes how to contribute to the development of cuRed
.
If you find there are problems or errors with running the code please
search and review the existing
issues (both open
and
closed
) and pull requests
to see if anyone has reported the bug or requested the feature already
and work is already in progress. If nothing exists then you should
create a new issue.
If you wish to contribute to the development of the cuRed
package by
fixing bugs, adding to or extending documentation or extending
functionality or the datasets/variables it works with please setup your
development environment to work with
pre-commit as we use pre-commit
hooks to lint the code and ensure
the package meets the common standards prescribed for package
development and passes linting with styler
and lintr.
If you are unfamiliar working with Git and GitHub with R then you may find Happy Git and GitHub for the useR a useful resource.
If you are a member of the the CUREd-Plus
Organisation you can clone the
repository
and make contributions directly from a branch
. If you are not a member
then you will have to
fork
the repository to your own account and then clone
that
# Member of CUREd-Plus Organisation
git clone [email protected]:AFM-SPM/TopoStats.git
# Non-member of CUREd-Plus cloning fork
git clone [email protected]:<YOUR_GITHUB_USERNAME>/TopoStats.git
If you have cloned the repository directly you will now create a
branch
to work on the issue you wish to address. It is not compulsory but we
try to use a consistent nomenclature for branches that shows who has
worked on the branch, the issue it pertains to and a short description
of the work. To which end you will see branches with the form
<GITHUB_USERNAME>/<GITHUB_ISSUE>-<SHORT-DESCRIPTION>
. Some examples
are shown below…
BRANCH |
GITHUB_USERNAME |
ISSUE |
SHORT-DESCRIPTION |
---|---|---|---|
ns-rse/1-package-setup |
ns-rse |
1 | package-setup short for the issue subject Package setup, checking and linting. |
To make the codebase easier to maintain we ask that you follow the guidelines below on coding style, linting, typing, documentation and testing.
Using a consistent coding style has many benefits (see Linting : What
is all the fluff
about?). For this
project we aim to adhere to lintr
styles and for the package structure we are following the R Packages
(2e) guidelines.
pre-commit
hooks are used to ensure these are consistent before Git
commits are made.
pre-commit runs Git
hooks that
it is configured to run on the code base prior to Git commits being
made. It is highly configurable but as it is written in Python requires
installing in order to analyse the R code and package structure of
cuRed
. If you are not already familiar with Python and the various
options for Virtual Environments the simplest solution will likely be to
install miniconda and
then install the pre-commit
package and install within the repository
conda install conda-forge pre-commit
cd path/to/cloned/cuRed
pre-commit install --install-hooks
For more an overview of pre-commit
see the post pre-commit:
Protecting your future self.