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

GitHub Flow Migration #330

Closed
wants to merge 2 commits into from
Closed

GitHub Flow Migration #330

wants to merge 2 commits into from

Conversation

ddsjoberg
Copy link
Collaborator

@ddsjoberg ddsjoberg commented Sep 14, 2023

The devel branch here still has the release version matching the CRAN release. Needs to be updated before merging!

Thank you for your Pull Request! We have developed this task checklist from the Development Process Guide to help with the final steps of the process. Completing the below tasks helps to ensure our reviewers can maximize their time on your code as well as making sure the admiral codebase remains robust and consistent.

Please check off each taskbox as an acknowledgment that you completed the task or check off that it is not relevant to your Pull Request. This checklist is part of the Github Action workflows and the Pull Request will not be merged into the devel branch until you have checked off each task.

  • Place Closes #<insert_issue_number> into the beginning of your Pull Request Title (Use Edit button in top-right if you need to update)
  • Code is formatted according to the tidyverse style guide. Run styler::style_file() to style R and Rmd files
  • Updated relevant unit tests or have written new unit tests, which should consider realistic data scenarios and edge cases, e.g. empty datasets, errors, boundary cases etc. - See Unit Test Guide
  • If you removed/replaced any function and/or function parameters, did you fully follow the deprecation guidance?
  • Update to all relevant roxygen headers and examples, including keywords and families. Refer to the categorization of functions to tag appropriate keyword/family.
  • Run devtools::document() so all .Rd files in the man folder and the NAMESPACE file in the project root are updated appropriately
  • Address any updates needed for vignettes and/or templates
  • Update NEWS.md if the changes pertain to a user-facing function (i.e. it has an @export tag) or documentation aimed at users (rather than developers)
  • Build admiral site pkgdown::build_site() and check that all affected examples are displayed correctly and that all new functions occur on the "Reference" page.
  • Address or fix all lintr warnings and errors - lintr::lint_package()
  • Run R CMD check locally and address all errors and warnings - devtools::check()
  • Link the issue in the Development Section on the right hand side.
  • Address all merge conflicts and resolve appropriately
  • Pat yourself on the back for a job well done! Much love to your accomplishment!

@ddsjoberg ddsjoberg marked this pull request as draft September 14, 2023 22:25
@github-actions
Copy link

github-actions bot commented Sep 14, 2023

Code Coverage

Package Line Rate Health
admiraldev 97%
Summary 97% (1072 / 1102)

Comment on lines -30 to -31
- The `patch` branch is reserved for special hot fixes to address bugs. More info in [Hot Fix Release](release_strategy.html#hot-fix-release)
- The `main`, `devel`, `gh-pages`, `patch` branches are under protection. If you try and push changes to these branches you will get an error unless you are an administrator.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we should keep these two items and just remove devel from the second one.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added back (but in a new PR). All comments are regarding the new PR

@@ -43,23 +38,23 @@ Each feature branch must be related to an issue. We encourage new developers to

### Naming Branches

The name of the branch must be prefixed with the issue number, followed by a short but meaningful description and the `@<target_branch>` suffix. The latter would be `@devel` in most cases. As an example, given an issue #94 "Program function to derive `LSTALVDT`", the branch name would be `94_derive_var_lstalvdt@devel`.
The name of the branch must be prefixed with the issue number, followed by a short but meaningful description and the `@<target_branch>` suffix. The latter would be `@main` in most cases. As an example, given an issue #94 "Program function to derive `LSTALVDT`", the branch name would be `94_derive_var_lstalvdt@main`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

@main does not need to be added as it is the fall back branch.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removed the detail about main as it's not needed


1) Create a Pull Request from `devel` into the `main` branch. Issues identified in this Pull Request should have work done in separate branches and merged once again into `devel`.
1) Verify that all CI/CD checks are passing for the `devel` into the `main` Pull Request, merge and then bundle up and send off to CRAN. See the [chapter](https://r-pkgs.org/release.html#decide-the-release-type) in R Packages for more details.
1) Verify that all CI/CD checks and then bundle up and send off to CRAN. See the [chapter](https://r-pkgs.org/release.html#decide-the-release-type) in R Packages for more details.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't we need a PR into main were we update the version number (remove .9000 part and increase version)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

that depends on the workflow one uses. the PR checklist from usethis, has you keep your version bump to the release version local until CRAN accepts. But others do different things.

1) If CRAN asks for modifications, repeat steps 1-2 as necessary.
1) Once the package is accepted and available on CRAN, a [GitHub action](https://github.com/pharmaverse/admiral/actions/workflows/pages/pages-build-deployment) is set up to rebuild the `{admiral}` website with all the updates for this release.
1) Use the release button on GitHub to "release" the package onto GitHub. This release onto Github archives the version of code within the `main` branch, attaches the News/Changelog file, bundles the code into a `tar.gz` file and makes a validation report via the GitHub action `validation` from [insightsengineering/validatoR](https://github.com/insightsengineering/thevalidatoR). Please see past [admiral releases](https://github.com/pharmaverse/admiral/releases) for reference and the [Releasing to Github](release_strategy.html#releasing-to-github) section for more details.
1) Any issues fixed in the `main` branches should be merged back into `devel`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need a PR to main which adds the .9000 again or should this be done in the first feature branch?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

When we make releases, we should follow the checklist issue created from usethis::use_release_issue(). The last thing to do there is bump the version to xxx.9000. There is no need to wait until the first PR to increase it (although this is certainly something i have done in the past, and either way works perfectly well. But good to stick with standard practices when we can)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we use use_release_issue() and follow the list created by the call or should we follow our list? Unfortunately I couldn't find an example of the list created by use_release_issue() in the usethis documentation. Most likely there are many overlaps. I think we should have just one list to follow.

1) Branches addressing the bugs should have Pull Requests merged into the `patch` branch **NOT** the `devel` branch.
1) When naming the branch follow the [naming conventions](git_usage.html#implementing-an-issue) guide but use the `@main` suffix
1) Branches addressing the bugs should have Pull Requests merged into a single `patch` branch **NOT** the `main` branch, where the `patch` branch has been created from the most recent release of the package.
1) When naming the branch follow the [naming conventions](git_usage.html#implementing-an-issue) guide but use the `@main` suffix.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the @main suffix must not be used because it refers to the devel version of the upstream dependencies. Instead we must use the latest released version of the upstream dependencies. I am not sure how we can refer to them.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated

@ddsjoberg
Copy link
Collaborator Author

@bundfussr feel free to make any changes you see fit. I am less familiar with staged dependencies, and wasn't sure which notation is required there.


**Hot Fix Release**: `patch >> main >> devel`
1) Create a GitHub release on the `patch` branch. Please see past [admiral releases](https://github.com/pharmaverse/admiral/releases) for reference and the [Releasing to Github](release_strategy.html#releasing-to-github) section for more details.
1) These hot fixes should then be merged into the `main` branch through an additional Pull Request.
Copy link
Collaborator

Choose a reason for hiding this comment

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

We need to add that the development version needs to be added again in main.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated


1) Identify all the bugs that need to be fixed for this hot fix release and label with hot fix label.
1) Branches addressing the bugs should have Pull Requests merged into the `patch` branch **NOT** the `devel` branch.
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should add that the patch branch is updated by merging the latest released version into patch.

@ddsjoberg ddsjoberg changed the title GitFlow Migration GitHub Flow Migration Nov 3, 2023
@bms63 bms63 deleted the branch devel November 6, 2023 15:56
@bms63 bms63 closed this Nov 6, 2023
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.

3 participants