Skip to content

Simultaneous Update of RMG Py and RMG database

Max Liu edited this page Feb 13, 2017 · 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 Travis builds, which ensures pull requests don't break functionality, prevent any update that breaks the code. These simultaneous updates can prevent the Travis 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.

  2. Add a commit to RMG-Py modifying the Travis build:

    • In .travis.yml, replace
      git clone https://github.com/ReactionMechanismGenerator/RMG-Py.git
      with
      git clone -b <database_branch_name> https://github.com/ReactionMechanismGenerator/RMG-Py.git

    • In deploy.sh, replace
      git commit --allow-empty -m rmgpy-$REV
      with
      DB_DEPLOY_BRANCH="<database_branch_name>"
      git commit --allow-empty -m rmgpydb-$REV-${DB_DEPLOY_BRANCH}

  3. Check that both Travis builds now pass.

  4. 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 master, then remove the line containing the temporary commit. You can also rebase on the commit prior to the temporary commit if desired.
  5. Once the RMG-Py pull request goes through, the RMG-database Travis build should pass. You can rerun the Travis build by visiting the Travis CI website (can be accessed via the check/x/dot icon beside the last commit). It should be able to be code reviewed and committed now.