Skip to content

Commit

Permalink
Merge branch 'cran_submit'
Browse files Browse the repository at this point in the history
  • Loading branch information
dramanica committed Jun 18, 2024
2 parents d5ef361 + 79f6536 commit 7fac1e9
Show file tree
Hide file tree
Showing 142 changed files with 17,231 additions and 13,302 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ ci_dependencies
^CRAN-SUBMISSION$
^codecov.yml
^data-raw$
.covrignore
233 changes: 0 additions & 233 deletions .circleci/config.yml

This file was deleted.

7 changes: 7 additions & 0 deletions .covrignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
R/zzz.R
R/download_worldclim_present.R
R/download_worldclim_future.R
R/download_etopo.R
R/load_etopo.R
R/download_chelsa.R
R/download_chelsa_trace21k.R
28 changes: 28 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!-- This CODE_OF_CONDUCT.md is adapted from the same document in the tidyverse package -->


# Contributor Code of Conduct

As contributors and maintainers of this project, we pledge to respect all people who
contribute through reporting issues, posting feature requests, updating documentation,
submitting pull requests or patches, and other activities.

We are committed to making participation in this project a harassment-free experience for
everyone, regardless of level of experience, gender, gender identity and expression,
sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.

Examples of unacceptable behavior by participants include the use of sexual language or
imagery, derogatory comments or personal attacks, trolling, public or private harassment,
insults, or other unprofessional conduct.

Project maintainers have the right and responsibility to remove, edit, or reject comments,
commits, code, wiki edits, issues, and other contributions that are not aligned to this
Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed
from the project team.

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by
opening an issue or contacting one or more of the project maintainers.

This Code of Conduct is adapted from the Contributor Covenant
(https://www.contributor-covenant.org), version 1.0.0, available at
https://contributor-covenant.org/version/1/0/0/.
102 changes: 102 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Contributing to pastclim


This document outlines how to contribute to the development of `pastclim`. The
package is maintained on a voluntary basis, so help is always appreciated.

## The basic process of contributing

Development work for `pastclim` occurs in the `dev` branch. So, if you want to
propose any changes, you should work on `dev`. Start by forking the project
onto your github repository, make the changes directly in your fork (either in
the `dev` branch, or make a custom branch). After updating all the documentation
and checking that all tests pass (see below), start a Pull Request. Your proposed
changes will be reviewed, and you might be asked to fix/improve your code. This
can be an iterative process, requiring a few rounds of revision depending on
the complexity of the code.

Functions should be documented using [`roxygen`](https://cran.r-project.org/web/packages/roxygen2/vignettes/roxygen2.html).
If any of your changes affects the documentation , you should rebuild it.
From the root directory of the package, simply run:

```
devtools::document()
```

If you implemented a new functionality, or patched a bug, you should consider
whether you should add an appropriate unit test. `pastclim` uses the `testthat`
framework for unit tests. You should make sure that tests work with :
```
devtools::test()
```

Finally, before you submit a push request, you should check that your changes
don't break the build. You can do that with `check`, which also builds the
vignette and runs the tests.:
```
devtools::check()
```

Make sure that you have resolved all warnings and notes raised by
`devtools::check()`!

Once you have followed **those 3 steps**, you are ready to make your Pull Request.
Your changes will go through automatic continuous integration, which will check
the impact of those changes on multiple platforms. If everything goes well, you
will see a green tick on your submission.

## Fixing typos

If you spot typos, spelling mistakes, or grammatical errors in the documentation,
you should fix them directly in the file that describes the function. This is the
`.R` file in the `R` directory, NOT the `.Rd` file in the `man` directory. `.Rd`
files are automatically generated by `roxygen2` and should not be edited by hand.
We recommend that you study first how
[roxygen2 comments](https://roxygen2.r-lib.org/articles/roxygen2.html) work.

## Functional changes

If you want to make a change that impacts the functioning of `pastclim`,
it's a good idea to first file an issue
explaining what you have in mind. If the change is meant to fix a bug, then
add a minimal
[reprex](https://www.tidyverse.org/help/#reprex).

A good reprex is also the
perfect starting point for writing a unit test, which should accompany any
functional change in the code. Unit tests are also essential when fixing bugs, so
that you can both demonstrate that the fix work, and prevent future changes
from undoing your work. For unit testing, we use `testthat`; you will find tests under
`tests`, with a file dedicated to each function, following the convention
`test_my_function.R` for naming files. When creating tests, try to make use
built-in datasets, rather than adding data
files to the package.

Ideally, the body of your Pull Request will include the phrase `Fixes #issue-number`,
where `issue_number` is the number on Github. In this way, your Pull Request
will be automatically linked to the issue, and the issue will be closed when
the Pull Request is merged in.

For user-facing changes, add a bullet to the top of `NEWS.md`
(i.e. just below the first header). Follow the style described
in <https://style.tidyverse.org/news.html>.

Our continuous integration checks that the Pull Request does not
reduce test coverage.


### Code style

New code should follow the tidyverse [style guide](https://style.tidyverse.org).
You can use the [styler](https://CRAN.R-project.org/package=styler) package
to apply these styles, but please don't restyle code that has nothing to do with your PR.

Lots of commenting in the code helps mantainability; so, if in doubt, always
add an explanation to your new code.

## Code of Conduct
Please note that the tidyverse project is released with a
[Contributor Code of Conduct](CODE_OF_CONDUCT.md). By contributing to this
project you agree to abide by its terms.

2 changes: 1 addition & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [master, dev, cran_submission]
branches: [master, dev]
pull_request:
branches: [master, dev]

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
on:
push:
branches: [master, dev]
pull_request:
branches: [master, dev]
# pull_request:
# branches: [master, dev]
release:
types: [published]
workflow_dispatch:
Expand Down
Loading

0 comments on commit 7fac1e9

Please sign in to comment.