How keep PYME github PR current

Hi all pyme devels.

A quick question re pull requests. I have a pull request that will probably take a little while before eventually adopted. What is the recommended way to keep the PR current WRT to rest of PYME? Is it best to merge master into the PR branch at regular intervals? I am struggling to work out what is the right approach.

In this case, please note I would like to sit with a machine on this PR but also take advantage of the latest PYME developments (which tend to be largely orthogonal to the PR files).


Hi Christian,

just got back from a short holiday - will get onto that PR soon.

But to answer your question, it should be fine to merge the head back into the PR branch.

What is likely to cause problems, however, is if you keep working on that branch adding unrelated new features (ideally 1 PR = 1 branch = 1 small and self contained set of changes). If you want to make multiple unrelated changes and use them all before they are merged into the upstream I’d recommend the following strategy:

  • create a feature branch for each new feature that will become a PR
  • create a throwaway ‘dummy/testing/lab’ branch which you track on your computer (with the intention that this will never be merged into the main branch).
  • merge your PRs and/or the main branch as needed onto the dummy branch

This should work well as long as you

a) never make any non-merge commits to the dummy branch (this requires a bit of discipline with changing branches before you make a tweak etc, although git is moderately forgiving here - if you forget you can change branches before you commit - it might be possible to enforce this with pre commit hook)
b) spawn new branches from the main/master branch rather than the dummy branch

I’ve added a bit at the end of the contributing docs which outlines the process

Hi David,

Both the suggestions and the updated docs are extremely helpful. Note that this was not meant as a nudge about any specific PR, rather getting better to grips with the git workflow and the PYME development model in general. I’ll try this approach for any future and current PRs.