Skip to content

Commit 7009ac5

Browse files
committed
Remove hard-wired instances of "master"
Closes #375
1 parent 3fbe964 commit 7009ac5

File tree

7 files changed

+133
-145
lines changed

7 files changed

+133
-145
lines changed

.github/CONTRIBUTING.Rmd

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ output:
1919
- GOOD PR title: "Obtain user's intent via mind-reading; fixes #86".
2020
- BAD PR title: "Fixes #1043". Please remind us all what issue #1043 is about!
2121
- BAD PR title: "Something about #345". This will not actually close issue #345 upon merging. [Use the magic words](https://help.github.com/articles/closing-issues-using-keywords/).
22-
* Add a bullet to `NEWS.md` with a concise description of the change, if it's something a user would want to know when updating the package. [dplyr's `NEWS.md`](https://github.com/tidyverse/dplyr/blob/master/NEWS.md) is a good source of examples. Note the sentence format, the inclusion of GitHub username, and links to relevant issue(s)/PR(s). We will handle any organization into sub-sections just prior to a release. What merits a bullet?
22+
* Add a bullet to `NEWS.md` with a concise description of the change, if it's something a user would want to know when updating the package. [dplyr's `NEWS.md`](https://github.com/tidyverse/dplyr/blob/main/NEWS.md) is a good source of examples. Note the sentence format, the inclusion of GitHub username, and links to relevant issue(s)/PR(s). We will handle any organization into sub-sections just prior to a release. What merits a bullet?
2323
- Fixing a typo in the docs does not, but it is still awesome and deeply appreciated.
2424
- Fixing a bug or adding a new feature is bullet-worthy.
2525

@@ -61,7 +61,7 @@ For small changes, it's fine to test your specific change locally and make a PR.
6161

6262
#### Auth
6363

64-
A token is put into force at the beginning of a test run by the first few lines of [tests/testthat/helper.R](https://github.com/tidyverse/googledrive/blob/master/tests/testthat/helper.R).
64+
A token is put into force at the beginning of a test run by the first few lines of [tests/testthat/helper.R](https://github.com/tidyverse/googledrive/blob/main/tests/testthat/helper.R).
6565

6666
* This reflects the approach documented in the gargle vignette [Managing tokens securely](https://gargle.r-lib.org/articles/articles/managing-tokens-securely.html). We use embedded, encrypted service account token.
6767
* If you want to use a token you already have, edit those lines to use any of the techniques described in the gargle vignette [Non-interactive auth](https://gargle.r-lib.org/articles/non-interactive-auth.html). Don't commit and submit this change as part of a pull request; just use it as a pragmatic way to run tests with a token you have on hand.
@@ -123,7 +123,10 @@ Note that the current user is appended! This is so that concurrent test runs do
123123

124124
### Continuous integration
125125

126-
googledrive is checked on the current R release on Windows, via [AppVeyor](https://ci.appveyor.com/project/tidyverse/googledrive), and on several versions of R on Linux, via [Travis CI](https://travis-ci.org/tidyverse/googledrive). We use [codecov](https://codecov.io/github/tidyverse/googledrive?branch=master) to track the test coverage. In general, the package is subjected to `R CMD check`, unit tests, and test coverage analysis after every push to GitHub. There are encrypted service account tokens on both AppVeyor and Travis CI, so tests against the Drive API can be run.
126+
googledrive is checked on a large matrix of R versions and operating systems via GitHub Actions.
127+
We use [codecov](https://codecov.io/github/tidyverse/googledrive?branch=main) to track the test coverage.
128+
In general, the package is subjected to `R CMD check`, unit tests, and test coverage analysis after every push to GitHub.
129+
For internal branches, an encrypted service account token is available on GHA, so tests against the Drive API can be run.
127130

128131
Things are a bit different for pull requests from outside contributors, however. These PRs do not have access to the encrypted tokens, therefore many tests must be skipped. The PR will still be vetted via `R CMD check` and tests that do not call the Drive API can still be run. After you make a PR, it's a good idea to check back after a few minutes to see all of these results. If there are problems, read the log and try to correct the problem proactively. We "squash and merge" most pull requests, internal or external, so don't agonize over the commit history.
129132

.github/CONTRIBUTING.md

Lines changed: 61 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -11,70 +11,70 @@ Contributing to googledrive
1111

1212
## Making a pull request
1313

14-
- Uphold the design principles and package mechanics outlined below.
15-
- When in doubt, discuss in an issue before doing lots of work.
16-
- Make sure the package still passes `R CMD check` locally for you.
17-
It’s a good idea to do that before you touch anything, so you have
18-
a baseline.
19-
- Match the existing code style. Our intent is to follow
14+
- Uphold the design principles and package mechanics outlined below.
15+
- When in doubt, discuss in an issue before doing lots of work.
16+
- Make sure the package still passes `R CMD check` locally for you.
17+
It’s a good idea to do that before you touch anything, so you have a
18+
baseline.
19+
- Match the existing code style. Our intent is to follow
2020
<https://style.tidyverse.org>. Please use the [styler
2121
package](https://styler.r-lib.org) to re-style any code that you
2222
touch.
23-
- Tests: please *try* to run our tests or at least those that exercise
23+
- Tests: please *try* to run our tests or at least those that exercise
2424
your PR. Add tests, if relevant. If things go sideways, just say so.
2525
We are painfully aware that it’s not easy to test API-wrapping,
2626
auth-requiring packages like googledrive and are open to
2727
constructive feedback. More below.
28-
- Documentation: Update the documentation source, if your PR changes
28+
- Documentation: Update the documentation source, if your PR changes
2929
any behavior. We use
3030
[roxygen2](https://cran.r-project.org/package=roxygen2), so you must
3131
edit the roxygen comments above the function; never edit `NAMESPACE`
3232
or `.Rd` files by hand. More below.
33-
- Website: The pkgdown-created website is built and deployed
33+
- Website: The pkgdown-created website is built and deployed
3434
automatically via Travis-CI. Some changes require an edit to the
3535
`reference` section of `_pkgdown.yml`, i.e. to make sure that a
3636
function appears there.
37-
- If the PR is related to an issue, link to it in the description,
37+
- If the PR is related to an issue, link to it in the description,
3838
with [the `#15`
3939
syntax](https://help.github.com/articles/autolinked-references-and-urls/)
4040
and the issue slug for context. If the PR is meant to close an
4141
issue, make sure one of the commit messages includes [text like
42-
`closes #44` or `fixes
43-
#101`](https://help.github.com/articles/closing-issues-using-keywords/).
42+
`closes #44` or
43+
`fixes #101`](https://help.github.com/articles/closing-issues-using-keywords/).
4444
Provide the issue number and slug in the description, even if the
4545
issue is mentioned in the title, because auto-linking does not work
4646
in the PR title.
47-
- GOOD PR title: “Obtain user’s intent via mind-reading; fixes
48-
\#86”.
49-
- BAD PR title: “Fixes \#1043”. Please remind us all what issue
50-
\#1043 is about\!
51-
- BAD PR title: “Something about \#345”. This will not actually
52-
close issue \#345 upon merging. [Use the magic
47+
- GOOD PR title: “Obtain user’s intent via mind-reading; fixes
48+
#86”.
49+
- BAD PR title: “Fixes #1043”. Please remind us all what issue
50+
#1043 is about!
51+
- BAD PR title: “Something about #345”. This will not actually
52+
close issue #345 upon merging. [Use the magic
5353
words](https://help.github.com/articles/closing-issues-using-keywords/).
54-
- Add a bullet to `NEWS.md` with a concise description of the change,
54+
- Add a bullet to `NEWS.md` with a concise description of the change,
5555
if it’s something a user would want to know when updating the
5656
package. [dplyr’s
57-
`NEWS.md`](https://github.com/tidyverse/dplyr/blob/master/NEWS.md)
58-
is a good source of examples. Note the sentence format, the
59-
inclusion of GitHub username, and links to relevant issue(s)/PR(s).
60-
We will handle any organization into sub-sections just prior to a
61-
release. What merits a bullet?
62-
- Fixing a typo in the docs does not, but it is still awesome and
57+
`NEWS.md`](https://github.com/tidyverse/dplyr/blob/main/NEWS.md) is
58+
a good source of examples. Note the sentence format, the inclusion
59+
of GitHub username, and links to relevant issue(s)/PR(s). We will
60+
handle any organization into sub-sections just prior to a release.
61+
What merits a bullet?
62+
- Fixing a typo in the docs does not, but it is still awesome and
6363
deeply appreciated.
64-
- Fixing a bug or adding a new feature is bullet-worthy.
64+
- Fixing a bug or adding a new feature is bullet-worthy.
6565

6666
## Package philosophy
6767

68-
- When in doubt, take a cue from the Unix file system commands or the
68+
- When in doubt, take a cue from the Unix file system commands or the
6969
Google Drive browser UI.
70-
- Have a reasonable default whenever humanly possible. This applies to
70+
- Have a reasonable default whenever humanly possible. This applies to
7171
auth, file name, file location, etc.
72-
- Be pipe-friendly.
73-
- If it’s not well-documented (e.g. working example\!), it doesn’t
72+
- Be pipe-friendly.
73+
- If it’s not well-documented (e.g. working example!), it doesn’t
7474
really exist.
75-
- Accommodate initial file specification via path or name, but
75+
- Accommodate initial file specification via path or name, but
7676
constantly push downstream work to be based on file id.
77-
- Return a tidy tibble, almost always a
77+
- Return a tidy tibble, almost always a
7878
[`dribble`](https://tidyverse.github.io/googledrive/reference/dribble.html),
7979
whenever it makes sense.
8080

@@ -96,7 +96,7 @@ do things we haven’t made available in the high-level interface.
9696

9797
We use [roxygen2](https://cran.r-project.org/package=roxygen2),
9898
specifically with the [Markdown
99-
syntax](https://roxygen2.r-lib.org/articles/rd-formatting.html),
99+
syntax](https://cran.r-project.org/web/packages/roxygen2/vignettes/markdown.html),
100100
to create `NAMESPACE` and all `.Rd` files. All edits to documentation
101101
should be done in roxygen comments above the associated function or
102102
object.
@@ -132,13 +132,13 @@ googledrive.
132132

133133
A token is put into force at the beginning of a test run by the first
134134
few lines of
135-
[tests/testthat/helper.R](https://github.com/tidyverse/googledrive/blob/master/tests/testthat/helper.R).
135+
[tests/testthat/helper.R](https://github.com/tidyverse/googledrive/blob/main/tests/testthat/helper.R).
136136

137-
- This reflects the approach documented in the gargle vignette
137+
- This reflects the approach documented in the gargle vignette
138138
[Managing tokens
139139
securely](https://gargle.r-lib.org/articles/articles/managing-tokens-securely.html).
140140
We use embedded, encrypted service account token.
141-
- If you want to use a token you already have, edit those lines to use
141+
- If you want to use a token you already have, edit those lines to use
142142
any of the techniques described in the gargle vignette
143143
[Non-interactive
144144
auth](https://gargle.r-lib.org/articles/non-interactive-auth.html).
@@ -157,18 +157,17 @@ test run also creates and destroys files, both locally and on Drive, but
157157
that is different and not what we’re talking about here.
158158

159159
1. Source `tests/testthat/driver.R` to extract and aggregate the
160-
current setup and clean code across all test
161-
files.
162-
160+
current setup and clean code across all test files.
161+
163162
``` r
164163
## gather all the test setup and clean code from individual test files
165164
source(testthat::test_path("driver.R"))
166165
## leaves behind:
167166
## * all-test-setup.R
168167
## * all-test-clean.R
169168
```
170-
171-
- This creates two R scripts: `tests/testthat/all-test-setup.R`
169+
170+
- This creates two R scripts: `tests/testthat/all-test-setup.R`
172171
and `tests/testthat/all-test-clean.R`. Inspect them.
173172

174173
2. When you are truly ready to perform setup or clean, edit the code to
@@ -179,8 +178,6 @@ that is different and not what we’re talking about here.
179178
3. Render `all-test-setup.R` with the Knit button in RStudio or like
180179
so:
181180

182-
<!-- end list -->
183-
184181
``` r
185182
rmarkdown::render(testthat::test_path("all-test-setup.R"))
186183
```
@@ -193,7 +190,7 @@ You should now be able to run the tests via *Build \> Test Package* or
193190

194191
You can leave the setup in place for as long as you’re working on
195192
googledrive, i.e. you don’t need to do this for every test run. In fact,
196-
that is the whole point\!
193+
that is the whole point!
197194

198195
When your googledrive development is over, render the clean script:
199196

@@ -203,21 +200,21 @@ rmarkdown::render(testthat::test_path("all-test-clean.R"))
203200

204201
Again, read the report to look over what happened, in case anything was
205202
trashed that should not have been (btw, let us know about that so we can
206-
fix\!). Once you’re satisfied that your own files were not touched, you
203+
fix!). Once you’re satisfied that your own files were not touched, you
207204
can `drive_empty_trash()` to truly delete the test files.
208205

209206
#### Adding tests
210207

211208
If you’re going to add or modify tests, follow these conventions:
212209

213-
- Test files are marked up with knitr chunk headers in comments, e.g.
214-
`# ---- clean ----` or `# ---- tests ----`. This is what enables the
215-
`driver.R` script to isolate the setup or cleaning code. Don’t break
216-
that.
217-
- Any file that is truly necessary and can be setup in advance and
210+
- Test files are marked up with knitr chunk headers in comments,
211+
e.g. `# ---- clean ----` or `# ---- tests ----`. This is what
212+
enables the `driver.R` script to isolate the setup or cleaning code.
213+
Don’t break that.
214+
- Any file that is truly necessary and can be setup in advance and
218215
persist? Do it, in order to make future test runs faster. Put the
219216
associated setup and clean code at the top of the test file.
220-
- All test files should have a name that documents why they exist and
217+
- All test files should have a name that documents why they exist and
221218
who made them. Use the `# ---- nm_fun ----` chunk to define naming
222219
functions used in that test file (see existing files for examples).
223220
Always use one of these functions to generate file names. Use
@@ -236,28 +233,26 @@ file:
236233
DESCRIPTION-TEST-drive-upload-travis
237234
<informative-slug>-TEST-<test-context>-<user>
238235

239-
Note that the current user is appended\! This is so that concurrent test
236+
Note that the current user is appended! This is so that concurrent test
240237
runs do not attempt to edit the same files.
241238

242239
### Continuous integration
243240

244-
googledrive is checked on the current R release on Windows, via
245-
[AppVeyor](https://ci.appveyor.com/project/tidyverse/googledrive), and
246-
on several versions of R on Linux, via [Travis
247-
CI](https://travis-ci.org/tidyverse/googledrive). We use
248-
[codecov](https://codecov.io/github/tidyverse/googledrive?branch=master)
249-
to track the test coverage. In general, the package is subjected to `R
250-
CMD check`, unit tests, and test coverage analysis after every push to
251-
GitHub. There are encrypted service account tokens on both AppVeyor and
252-
Travis CI, so tests against the Drive API can be run.
241+
googledrive is checked on a large matrix of R versions and operating
242+
systems via GitHub Actions. We use
243+
[codecov](https://codecov.io/github/tidyverse/googledrive?branch=main)
244+
to track the test coverage. In general, the package is subjected to
245+
`R CMD check`, unit tests, and test coverage analysis after every push
246+
to GitHub. For internal branches, an encrypted service account token is
247+
available on GHA, so tests against the Drive API can be run.
253248

254249
Things are a bit different for pull requests from outside contributors,
255250
however. These PRs do not have access to the encrypted tokens, therefore
256-
many tests must be skipped. The PR will still be vetted via `R CMD
257-
check` and tests that do not call the Drive API can still be run. After
258-
you make a PR, it’s a good idea to check back after a few minutes to see
259-
all of these results. If there are problems, read the log and try to
260-
correct the problem proactively. We “squash and merge” most pull
251+
many tests must be skipped. The PR will still be vetted via
252+
`R CMD check` and tests that do not call the Drive API can still be run.
253+
After you make a PR, it’s a good idea to check back after a few minutes
254+
to see all of these results. If there are problems, read the log and try
255+
to correct the problem proactively. We “squash and merge” most pull
261256
requests, internal or external, so don’t agonize over the commit
262257
history.
263258

R/camelCase.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# camelCase() and toCamel() taken from
2-
# https://github.com/rstats-db/bigrquery/blob/master/R/camelCase.R
2+
# https://github.com/r-dbi/bigrquery/blob/main/R/camelCase.R
33

44
# in theory, belongs in gargle
55
# but then we'd need to export it and I'm not sure it's worth it

README.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ googledrive::drive_deauth()
3333
<!-- badges: start -->
3434
[![CRAN status](https://www.r-pkg.org/badges/version/googledrive)](https://CRAN.R-project.org/package=googledrive)
3535
[![R-CMD-check](https://github.com/tidyverse/googledrive/workflows/R-CMD-check/badge.svg)](https://github.com/tidyverse/googledrive/actions)
36-
[![Codecov test coverage](https://codecov.io/gh/tidyverse/googledrive/branch/master/graph/badge.svg)](https://codecov.io/gh/tidyverse/googledrive?branch=master)
36+
[![Codecov test coverage](https://codecov.io/gh/tidyverse/googledrive/branch/main/graph/badge.svg)](https://codecov.io/gh/tidyverse/googledrive?branch=main)
3737
<!-- badges: end -->
3838

3939
## Overview

0 commit comments

Comments
 (0)