Skip to content

Latest commit

 

History

History
148 lines (99 loc) · 9.75 KB

CONTRIBUTING.md

File metadata and controls

148 lines (99 loc) · 9.75 KB

Introduction

Welcome to the Geo Open Hack GitHub Community!

Thank you for considering to contribute to this repository with your ideas and suggestions.

Guidelines

Reading our guidelines is key to maximise your contribution, understanding project policies, knowing repositories management, naming conventions, etc.

Contributing through GitHub

Git is a really useful tool for version control. GitHub sits on top of Git and supports collaborative and distributed working.

We know that it can be daunting to start using Git and GitHub if you haven't worked with them in the past, but Geo Open Hack 2024 maintainers are here to help you figure out any of the jargon or confusing instructions you encounter! 💚

In order to contribute via GitHub, you will need to set up a free account and sign in. Here are some instructions to help you get going. Remember that you can ask us any questions you need to along the way.

Writing in Markdown

GitHub has a helpful page on getting started with writing and formatting on GitHub.

Most of the writing that you will do will be in Markdown. You can think of Markdown as a few little symbols around your text that will allow GitHub to render the text with a little bit of formatting. For example, you could write words as bold (**bold**), or in italics (_italics_), or as a link ([link](https://youtu.be/dQw4w9WgXcQ)) to another webpage.

Also when writing in Markdown, please start each new sentence on a new line. Having each sentence on a new line will make no difference to how the text is displayed, there will still be paragraphs, but it makes the diffs produced during the pull request review easier to read! ✨

Where to start: issues

Before you open a new issue, please check if any of our open issues cover your idea already.

Making a change with a pull request

We appreciate all contributions to Geo Open Hack 2024. THANK YOU for helping us build this useful resource. 🌱

All project management, conversations and questions related to Geo Open Hack 2024 project happens here in Geo Open Hack 2024 repository. This is also where you can contribute directly to writing or editing chapters of the rendered website!

The following steps are a guide to help you contribute in a way that will be easy for everyone to review and accept with ease 🎓.

1. Comment on an existing issue or open a new issue referencing your addition

This allows other members of Geo Open Hack 2024 team to confirm that you aren't overlapping with work that's currently underway and that everyone is on the same page with the goal of the work you're going to carry out.

This blog is a nice explanation of why putting this work in upfront is so useful to everyone involved.

2. Fork Geo Open Hack 2024 repository

This is now your own unique copy of Geo Open Hack 2024. Changes here won't affect anyone else's work, so it's a safe space to explore edits to the code!

Make sure to keep your fork up to date with the main repository, otherwise, you can end up with lots of dreaded merge conflicts. If you prefer working in the browser, these instructions describe how to sync your fork to the original repository via GitHub.

3. Make the changes you've discussed

Try to keep the changes focused. If you submit a large amount of work all in one go it will be much more work for whoever is reviewing your pull request. Help them help you. 😉

While making your changes, commit often and write good, detailed commit messages. This blog explains how to write a good Git commit message and why it matters. It is also perfectly fine to have a lot of commits - including ones that break code. A good rule of thumb is to push up to GitHub when you do have passing tests then the continuous integration (CI) has a good chance of passing everything. 😸

If you feel tempted to "branch out" then please make a new branch and a new issue to go with it. This blog details the different Git branching models.

Please do not re-write history! That is, please do not use the rebase command to edit previous commit messages, combine multiple commits into one, or delete or revert commits that are no longer necessary.

Are you new to Git and GitHub or just want a detailed guide on getting started with version control? Check out our Version Control chapter in The Turing Way Book!

4. Submit a pull request

We encourage you to open a pull request as early in your contributing process as possible. This allows everyone to see what is currently being worked on. It also provides you, the contributor, feedback in real-time from both the community and the continuous integration as you make commits (which will help prevent stuff from breaking).

If you have opened the pull request early and know that its contents are not ready for review or to be merged, add "[WIP]" at the start of the pull request title, which stands for "Work in Progress". When you are happy with it and are happy for it to be merged into the main repository, change the "[WIP]" in the title of the pull request to "[Ready for review]".

A member of Geo Open Hack team will then review your changes to confirm that they can be merged into the main repository. A review will probably consist of a few questions to help clarify the work you've done. Keep an eye on your GitHub notifications and be prepared to join in that conversation.

You can update your fork of Geo Open Hack repository and the pull request will automatically update with those changes. You don't need to submit a new pull request when you make a change in response to a review.

You can also submit pull requests to other contributors' branches! Do you see an open pull request that you find interesting and want to contribute to? Simply make your edits on their files and open a pull request to their branch!

What happens if the continuous integration (CI) fails (for example, if the pull request notifies you that "Some checks were not successful")? The CI could fail for a number of reasons. At the bottom of the pull request, where it says whether your build passed or failed, you can click “Details” next to the test, which takes you to a CI run log site. If you have the write access to the repo, you can view the log or rerun the checks by clicking the “Restart build” button in the top right. You can learn more about CI in the Continuous Integration chapter!

GitHub has a nice introduction to the pull request workflow, but please get in touch if you have any questions or ideas 💡.

Local development

You can build and host the book website locally. The steps are:

To build book locally

  1. Install the required software to build the book, optionally in a virtual environment:

    To install Python, we recommend to install conda or miniconda and then create a new conda environment using .binder/environment.yml:

    conda env create -f environment.yml
    

    Do not forget to switch to the geohack conda environment prior to executing any Jupyter notebooks or programs from the geo-open-hack-2024 repository.

    conda activate geohack
    
  2. You can now build or refresh the book using:

    cd ./docs
    jupyter-book build .