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

Vignette re: how to update released site #2051

Merged
merged 13 commits into from
Mar 2, 2022
Merged

Conversation

jennybc
Copy link
Member

@jennybc jennybc commented Feb 27, 2022

Closes #1950

I've tried to make this generally applicable / readable. But yes it is our team's Spring Cleaning that is the immediate motivation.

Maybe this gets merged and refined over the course of the week. Then when our Spring Cleaning is done, we can dial back some of the things that are specific to us.

@jennybc jennybc requested a review from hadley February 27, 2022 23:17
Comment on lines 32 to 33
- Add "tidyverse/tidytemplate" to `Config/Needs/website` in DESCRIPTION, if
repo is owned by one of these orgs: tidyverse, r-lib, tidymodels, rstudio.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is pretty specific to us.

Comment on lines +119 to +120
(if owning org is one of: tidyverse, r-lib, tidymodels, rstudio)
add "tidyverse/tidytemplate" to Config/Needs/website in DESCRIPTION
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, pretty specific to us.

@jennybc
Copy link
Member Author

jennybc commented Feb 28, 2022

And let me pre-emptively apologize for not releasing usethis. That would have been nice, but in the grand scheme of things, it wouldn't make a huge difference here.

* Update to usethis >= v2.1.5.9000, maybe with
`pak::pak("r-lib/usethis")`.
* Check out your default branch and `git pull`.
* Call `usethis::use_pkgdown_github_pages()`. This is safe and a good idea even
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, I just discovered this isn't quite true. It can overwrite an existing _pkgdown.yml with different / less content. Of course, if you're using Git, this is no big deal because you can discard the changes, wholesale or selectively.

But I will look into whether this can be made "safer", quickly.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's where use_pkgdown() started to overwrite existing _pkgdown.yml:

r-lib/usethis@ffa8112

I guess it is hard to selectively make desired changes to existing _pkgdown.yml, i.e. to modify it vs overwrite it.

Maybe the best we can do is still recommend that our team does this, then they'll have to selectively keep/discard changes before they commit.

git cherry-pick SHA
git checkout REF -- path/to/a/specific/file
```
* Push this branch, maybe using `usethis::pr_push()`.
Copy link
Member

@hadley hadley Feb 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you create a PR, Github will warn you that it can't be automatically merged, but this seems to be ok?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After doing this a few times, I just pushed the branch but didn't make the PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I say this below, in the longer form, but I'll repeat "don't open the PR" here.

@hfrick hfrick mentioned this pull request Mar 1, 2022
7 tasks
@thomasp85 thomasp85 mentioned this pull request Mar 1, 2022
23 tasks

If you're already up-to-speed, here's the checklist:

* Update to usethis >= v2.1.5.9000, maybe with
Copy link
Member

@hadley hadley Mar 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you could collapse these first eight bullet points to — make sure the development version of the site looks the way that you want it before embark on updating the released site.

* Backport innovations from the future. Most likely candidates:
- `_pkgdown.yml`
- `.github/workflows/pkgdown.yaml`
- `Config/Needs/website` field of DESCRIPTION
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be useful just include what you need here:

Config/Needs/website: tidyverse/tidytemplate

@jennybc
Copy link
Member Author

jennybc commented Mar 1, 2022

OK @hadley check again

@DavisVaughan DavisVaughan mentioned this pull request Mar 1, 2022
24 tasks
Comment on lines 44 to 46
- `README.Rmd` / `README.md`. Do you need `devtools::build_readme()`?
- Any fixes to released roxygen comments / docs, then `document()`.
- Any new vignettes or articles that apply to the released version.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still think this is a bit aggressive; it's definitely more of an optional extra.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't tell if "this" refers the vignette point or to all the 3 bullets (README, oxygen comments, vignettes). But I've edited best I can, given that.

(I am often updating README, for example, to get updated badges.)

release.

Example for readr, whose latest release is 2.1.1:
`git checkout -b update-pkgdown-2-1-1 v2.1.1`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should have a usethis helper for this? Then it could automatically push/pull?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it depends on whether this ends up feeling like a one-time thing for us.

@DavisVaughan DavisVaughan mentioned this pull request Mar 1, 2022
23 tasks
@hadley hadley mentioned this pull request Mar 1, 2022
15 tasks
@jennybc
Copy link
Member Author

jennybc commented Mar 1, 2022

This is ready for another look @hadley

@jennybc jennybc merged commit 9aae873 into main Mar 2, 2022
@jennybc jennybc deleted the how-to-update-released-site branch March 2, 2022 19:14
@hadley hadley mentioned this pull request Mar 2, 2022
15 tasks
@sbearrows sbearrows mentioned this pull request Mar 3, 2022
23 tasks
@hadley hadley mentioned this pull request Mar 9, 2022
12 tasks
@hadley hadley mentioned this pull request Mar 22, 2022
23 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to update the site for released version of a package
2 participants