Skip to content

Simultaneous Update of RMG Py and RMG database

Mark Payne edited this page Oct 21, 2021 · 10 revisions

RMG is held in two different repositories: RMG-Py for code and RMG-database for the database. Sometimes an update of one requires a change in the other. The automated builds, which ensures pull requests don't break functionality, prevent any update that breaks the code. These simultaneous updates can prevent the automated build from passing, and then the pull requests can't be merged. One way to overcome this problem:

  1. Make pull requests in both RMG-Py and RMG-database repositories, avoiding hyphens in your branch names.

  2. Add a commit to RMG-Py modifying the Github Actions workflow: In .github/workflows/CI.yml, replace RMG_DATABASE_BRANCH: main with RMG_DATABASE_BRANCH: your_db_branch_name

  3. Add a commit to RMG-database modifying the Github Actions workflow: In .github/workflows/CI.yml, replace RMG_PY_BRANCH: main with RMG_PY_BRANCH: your_rmg_branch_name

  4. Check that both builds now pass, and check the RMG-tests results too.

  5. When merging, the code reviewer should remove the temporary commit

    • If it is the last commit, use git reset --hard HEAD~.
    • It it is not the last commit, use git rebase -i main, then remove the line containing the temporary commit. You can also rebase on the commit prior to the temporary commit if desired.