Skip to content

Strategy to merge the code to main branch

Miguel González-Fierro edited this page Jan 11, 2021 · 1 revision

Merging to main branch from staging

Here we detail what is the strategy to merge code to main branch from our development branch, staging:

  • Each small piece of work is called a milestone, which can be composed by one or several PRs. An example of a milestone is a new algorithm or a new utility function.
  • When a milestone is finished, which should include having tests and updating the documentation, we do a PR to main.
  • After a group of milestones are finished, we consider to do a release. The releases are tracked and planned on this board.

Creating a Release

The release is a stable version of the codes in the repository.

The process of creating a release in the Recommenders repository has the following steps:

  1. Change the version number - this can be found in reco_utils/__init__.py.
  2. Create a tag. A tag is just an annotated pointer to a commit. For creating a tag we can do:
git tag -a 2019.02 -m "Recommenders version 2019.02: 6 new algos, new utilities, bug fixes and more"
git push origin 2019.02
  1. Create a release. A release is how GitHub shows tags to users. In other words, it is the way to ship a stable version to our users. To create a release:
  • In the Recommenders repo, go to releases.
  • Click on Draft a new release.
  • Select the tag you just created.
  • Type a title and description that describes your release.
  • Press publish release
  1. Create a new branch with the name of the version and push it to the repo. This is going to be a stale branch.