Contributing
Contributions are welcome. Please report bugs and make feature requests with the github issue tracker.
Development environment
geedim
uses the rasterio package, which has binary dependencies. Under
Windows, it is easiest to resolve these dependencies by working in a conda
environment. You can set this up with:
conda create -n <environment name> python=3.9 -c conda-forge
conda activate <environment name>
conda install -c conda-forge earthengine-api rasterio click requests tqdm tabulate pytest
If you are using Linux, or macOS, you may want to create a clean virtual python environment. Once the environment is
set up, create a fork of the geedim
github repository, and clone it:
git clone https://github.com/<username>/geedim.git
Finally, install the local geedim
package into your python environment:
pip install -e geedim
Development guide
Cloud/shadow masking
If you want to add cloud/shadow masking support for a new Earth Engine image collection, you should subclass
geedim.mask.CloudMaskedImage
, and implement at least the _aux_image()
method. Then add a new entry to
geedim.schema.collection_schema
.
Testing
Please include pytest tests with your code. The existing tests require the user
to be registered with Google Earth Engine. Installing the pytest-xdist plugin will help speed the testing process. For conda
users:
conda install -c conda-forge pytest-xdist
Or, using pip
:
pip install pytest-xdist
You can then run the tests from the root of the geedim
repository with:
pytest -v -n auto tests
Style
Please include NumPy docstrings with
your code. Try to conform to the geedim
code style. You can auto-format with
yapf and the included
.style.yapf configuration file:
yapf --style .style.yapf -i <file path>