Skip to content
Knut-Frode Dagestad edited this page Jun 12, 2024 · 16 revisions

Contributing through pull requests

  • Make your own fork of OpenDrift in the GitHub web portal
  • Check out the OpenDrift master to your local computer, using SSH: git clone [email protected]:OpenDrift/opendrift.git
  • Add your own fork as a remote in your local terminal: git remote add <your git username> [email protected]:<your git username>/opendrift.git
  • Add a local branch in your fork named e.g. "dev": git checkout -b dev <your git username>/<dev>
  • Make the actual changes to the OpenDrift code within this branch.
  • Commit these changes with git commit -m "<Description of changes>"
  • Push changes to your local branch with git push (confirm with your username and password)
  • Go to OpenDrift on GitHub (https://github.com/OpenDrift/opendrift/). You should now normally see a message at the top of the new page where you can click to add a new pull request. Sometimes this is not shown, e.g. if other pull requests have been recently made or cancelled. If so, you can click "Pull requests" at the top menu, then click "New pull request". Then click "compare across forks", where the right side of the arrow should be changed to your own fork, and the corresponding branch with newly commited developments (e.g. "dev"). Finally click "Create pull request"

Releasing a new OpenDrift version (for core developers only)

  • Checkout branch master from origin (official opendrift repository)
  • Make sure master is up-to-date (git pull)
  • Update history.rst
  • Update version in pyproject.toml.
  • Update version in opendrift/version.py.
  • Stage changes: git add -u .
  • Make a release commit on master: git commit -m "Release x.y.z"
  • Push the release commit to origin: git push
  • Tag the new release: git tag vx.y.z
  • Push the tag to the origin repository: git push origin --tags

PyPi and Conda

  • When a new tag is created as in the previous section a package will automatically be uploaded to PyPi
  • conda-forge will detect this new package after a while and automatically create a PR for the new version
  • Review the PR and merge it and a new package will be uploaded to conda-forge
  • (If you're in a hurry, the last two steps can be done manually)