Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add changelog, contribution guide & templates #55

Merged
merged 27 commits into from
Apr 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
89b93da
Start keeping a changelog (fix #41)
katrinleinweber Mar 30, 2018
a3fd048
Draft issue & PR templates
katrinleinweber Mar 30, 2018
7b3649f
Draft contribution guide (fix #27)
katrinleinweber Apr 4, 2018
157c45f
Highlight importance of comment reactions
katrinleinweber Apr 4, 2018
c39e95a
Broaden scope
katrinleinweber Apr 4, 2018
b49fc05
Improve reading flow
katrinleinweber Apr 4, 2018
c8def88
Fix typo
katrinleinweber Apr 8, 2018
b0a6496
Encourage useful feature requests
katrinleinweber Apr 8, 2018
e4460c2
Rephrase to shorten
katrinleinweber Apr 8, 2018
0403b4d
Update with changes from #59 & #61
katrinleinweber Apr 8, 2018
767b0ad
Explain workflow better (also fix #27)
katrinleinweber Apr 18, 2018
bae0d95
Refer to issues lists
katrinleinweber Apr 18, 2018
f7a8c2d
Record architecture decisions (fixes #53)
katrinleinweber Apr 18, 2018
2555aa9
Add better examples to d6eee742
katrinleinweber Apr 18, 2018
78af714
Find real duplicates of "?format=json" more easily
katrinleinweber Apr 18, 2018
f6ac12d
Move links under References
katrinleinweber Apr 18, 2018
83670d4
Refer to GitHub page
katrinleinweber Apr 18, 2018
79d868e
Advise about temperature ranges
katrinleinweber Apr 18, 2018
e1730a1
Udpdate version & changelog
katrinleinweber Apr 18, 2018
d9e6161
Regenerate docue & site
katrinleinweber Apr 18, 2018
89048f3
Merge remote-tracking branch 'origin/master' into 41-changelog
katrinleinweber Apr 18, 2018
2caced5
Fix errors in devtools::check() due to unexported function examples
katrinleinweber Apr 18, 2018
caef942
Fix typo
katrinleinweber Apr 18, 2018
1036f79
Fix typo
katrinleinweber Apr 18, 2018
89f0220
Trim docu to new defaults from #59 / c6310ee
katrinleinweber Apr 18, 2018
8594fb0
Climb up the Joel Test ladder
katrinleinweber Apr 21, 2018
9cd96f4
Regenerate docu & site after pkgdown update to a7aa75ee
katrinleinweber Apr 21, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
^README\.Rmd$
^docs$
^figure/
^\.github$
55 changes: 55 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Contributing to BacDiveR

This outlines how to propose a change to BacDiveR. Because this project should
be to developed according to the needs of BacDive users, please in particular
feel free to up- or down-vote existing issues, pull requests or comments.
Thumbs-up and -down reactions will inform which issues to prioritise.


### Improving texts

Small typos or grammatical errors in documentation may be edited directly using
the GitHub web interface, so long as the changes are made in the _source_ file.

* YES: you edit a roxygen comment in an `.R` file below `R/` or any `.Rmd` file.
* NO: you edit an `.Rd` file below `man/`.

When in doubt, please proceed with:


### Filing issues (also see the [`ISSUE_TEMPLATE.md`
]((https://github.com/katrinleinweber/BacDiveR/blob/master/.github/ISSUE_TEMPLATE.md))

Please don't hesitate to open an [issue][issues] if you:

a) want to ask a question,

a) suggest a new feature,

a) found a bug. Illustrating it with a [minimal, reproducible example][reprex]
is extremely helpful for fixing it ;-)

a) in other cases, such as wanting to discuss sending a substantial pull request.

Please spend a few minutes searching the [existing issues (also the closed ones)
][issues], though. What you want to write might have been already ;-)

[issues]: https://github.com/katrinleinweber/BacDiveR/issues/
[reprex]: https://www.tidyverse.org/help/#reprex


### Sending pull requests (also see the [`PULL_REQUEST_TEMPLATE.md
`]((https://github.com/katrinleinweber/BacDiveR/blob/master/.github/PULL_REQUEST_TEMPLATE.md))

Contributions through pull requests are welcome, and will be replied to within 1
or 2 (non-holi)days.

* We recommend that you create a Git branch for each PR, preferably with an issue number prepended to the [branch name][bn].
* New code should follow RStudio's style guide. Select code & press `Shift`+`CTRL`/`CMD`+`A` (or go to the "Code Tools" menu > "Reformat Code").
* We use [roxygen2](https://cran.r-project.org/package=roxygen2), with
[Markdown syntax](https://cran.r-project.org/web/packages/roxygen2/vignettes/markdown.html),
for documentation.
* We use [testthat](https://cran.r-project.org/package=testthat). Contributions
with test cases included are easier to accept.

[bn]: https://github.com/katrinleinweber/BacDiveR/branches
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!-- Please start with a brief description what this issue is about. Are you
reporting a problem, asking a question, requesting a new feature, starting a
discussion, etc.? Anything is welcome :-) -->

I have a question:

<!-- When reporting a bug, please include a [minimal reproducible example (AKA a
reprex)](http://reprex.tidyverse.org/). If you've never heard of that, please
read: [tidyverse.org/help/#reprex](https://www.tidyverse.org/help/#reprex).
-->

I noticed the following problem....

```r
# Please insert a repr(oducible )ex(ample) here
```

<!-- When requesting a new feature, please explain why it would be useful, and
how you would like to use it. A user story is a helpful way of phrasing such a
request, see https://en.wikipedia.org/wiki/User_story#Examples -->

I suggest to add a feature. As a ...your role..., I would like to see
...functionality..., in order to....

<!-- In any case, please mark the relevant boxes below (with an x). Striking out
irrelevant lines with ~~ ... ~~ is fine :-) -->

##### I have...

- [ ] ... ensured that I have installed the [latest release version
](https://github.com/katrinleinweber/BacDiveR/releases) and this issue pertains
to it, not to an old version.
- [ ] ... spent a few minutes [searching the existing issues
](https://github.com/katrinleinweber/BacDiveR/issues?utf8=%E2%9C%93&q=all).

<!-- Thank you :-) I'll try to reply to this within one week. -->
24 changes: 24 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!-- Please start with a brief summary. If it's trivial, "See diff" and deleting
the rest of the template text is fine :-) -->

See diff ;-)

<!-- If your PR includes more substantial changes, please explain them above and
then mark the relevant boxes below (with an x). Striking out irrelevant lines
with ~~...~~ is fine :-) -->

##### I have...

- [ ] ... run `testthat::auto_test_package()` and saw now errors.
- [ ] ... added/updated tests to `/tests/testthat/` for new features or bug-fixes.
- [ ] ... updated the [changelog / `NEWS.md`
](https://github.com/katrinleinweber/BacDiveR/blob/master/NEWS.md) in the
`Unreleased` section, if my PR introduces user-facing changes.
- [ ] ... incremented the minor or patch version number in [`DESCRIPTION`
](https://github.com/katrinleinweber/BacDiveR/blob/master/DESCRIPTION), if my PR
is a new feature or a bug-fix.
- [ ] ...read (at least) the [`LICENCSE` (short version)
](https://github.com/katrinleinweber/BacDiveR/tree/master/LICENSE) and agreed
that it will apply to my contribution as well.

<!-- Thank you! -->
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
all: docu vignettes site

check: docu
Rscript -e "devtools::check(document = FALSE)"

docu: vignettes
Rscript -e "devtools::document(); roxygen2::roxygenise()"

site: docu
Rscript -e "pkgdown::build_site()"

vignettes:
Rscript -e "knitr::knit(list.files(path = "vignettes", pattern = "*.Rmd$", full.names = TRUE))"
40 changes: 40 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## Unreleased

### Added

- `retrieve_search_results()`, see #61
- Architecture Decision records, see #53 & `/docs/arch/adr-*.md`

### Changed

- `retrieve_data()` now downloads the dataset(s) by default, not only the ID(s), see #54 & #59

## [0.4.0] - 2018-04-27

### Added

- This changelog (see #41)

### Changed

- Datasets in the aggregated (large) list are now named according to their
`bacdive_ID`s (see #47). Before, the list were only numbered with `1`, `2`, `3`,
etc.

## [0.3.1] - 2018-03-24

### Fixed

- An error in the download of a single dataset found through it's culture collection number (see #45)

### Added

- Usable example / vignette in the README.md file (see #16)

2 changes: 1 addition & 1 deletion R/construct_url.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ construct_url <- function(searchTerm,
searchType,
"/",
searchTerm,
"/?format=json"
"/", "?format=json"
)
)
}
24 changes: 9 additions & 15 deletions R/retrieve_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@
#'
#' @export
#' @examples retrieve_data(searchTerm = "Bacillus subtilis subtilis")
#' # This returns a numeric vector of IDs. To download all the corresponding
#' # data, use:
#' retrieve_data("Bacillus subtilis subtilis")
#'
#' # In case the `searchTerm` is unambiguous already, the data download will
#' # procede automatically:
#' retrieve_data(searchTerm = "DSM 319", searchType = "culturecollectionno")
#' retrieve_data(searchTerm = "AJ000733", searchType = "sequence")
#' retrieve_data(searchTerm = 717, searchType = "bacdive_id")
Expand Down Expand Up @@ -63,17 +57,17 @@ retrieve_data <- function(searchTerm,
download <-
function(URL,
userpwd = paste(get_credentials(), collapse = ":")) {
gsub(
pattern = "[[:space:]]+",
replacement = " ",
perl = TRUE,
# Prevent "lexical error: invalid character inside string."
# https://github.com/jeroen/jsonlite/issues/47
gsub(
pattern = "[[:space:]]+",
replacement = " ",
perl = TRUE,
# Prevent "lexical error: invalid character inside string."
# https://github.com/jeroen/jsonlite/issues/47
RCurl::getURL(URL,
userpwd = userpwd,
userpwd = userpwd,
httpauth = 1L)
)
}
)
}


#' Aggregate BacDive-IDs from a Paged List of Retrieved URLs
Expand Down
Binary file modified README_files/figure-gfm/ggplot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
169 changes: 169 additions & 0 deletions docs/CONTRIBUTING.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading