Skip to content

Latest commit

 

History

History
74 lines (49 loc) · 3.81 KB

CONTRIBUTING.md

File metadata and controls

74 lines (49 loc) · 3.81 KB

Contributing

Table of Contents

  1. Feedback
  2. Report Bugs
  3. Creating Pull Requests
  4. Developing with nbdev

Feedback

Do you like geowrangler, have an idea for a feature, or any comment at all? Feel free to file an issue in the geowrangler issue tracker and tag it as an enhancement.

Report Bugs

Report bugs for geowrangler in the issue tracker and tag them as a bug.

If you are reporting a bug, please include:

  • Operating system name and version
  • Python version
  • Dependencies installed
  • Sample data if necessary
  • Details to reproduce the bug

Creating pull requests

  1. Fork the repo in Github or go to https://github.com/thinkingmachines/geowrangler/fork

  2. Set up the development environment following the instructions in DEVELOPMENT

  3. Make the necessary contributions. See Developing with nbdev for more info.

  4. Run the tests and ensure they all pass before submitting a PR. Also add tests whenever adding a new feature. Finally, clean up tests that are longer applicable.

pytest --cov --cov-config=.coveragerc --cov-fail-under=80 -n auto
  1. Commit and Submit PR for review

Note: If the code coverage falls below 80 percent, the PR will be rejected.

Developing with nbdev

nbdev is a library that allows you to develop a python library in Jupyter Notebooks as well, putting all your code and documentation in one place.

Generating the python code

nbdev converts the notebooks within the notebooks/ folder into python code and used as a library.

Once the necessary changes are made, run the following to generate the python code.

nbdev_export

View contributions on documentation site and edit as needed

  1. Run nbdev_docs to create the HTML files via Quarto (can verify locally with some port: nbdev_preview --port 4327)
  2. Edit notebooks/index.ipynb to edit the doc homepage
  3. Edit notebooks/sidebar.yml to edit the left sidebar

Updating Google Colab links in notebooks

  • In notebooks such as tutorial notebooks you may want to add a Google Colab link at the beginning of the notebook for easy accessibility.
  • There is no automatic way yet to update this so it's a manual update of a markdown cell. Since the link points to a notebook in master, testing the Colab button is done after merging. Follow the sample below and replace the notebook name with your contributed notebook name.
  • Sample for notebooks/14_datasets_nightlights.ipynb:

Updating GitHub pages doc site domain after PR is merged

  • After your PR is merged, go the repo site on GitHub -> Settings -> Pages
  • Update the Custom Domain to be geowrangler.thinkingmachin.es
    • We need to update this after every PR merge because GitHub resets the custom domain to blank
  • If you don't have access to Settings, then feel free to reach out to the maintainers to update on your behalf.