A package built to support python teaching in the Earth Lab earth analytics program at University of Colorado, Boulder.
To install, use pip. --upgrade
is optional but it ensures that the package overwrites
when you install and you have the current version. If you don't have the package
yet you can still use the --upgrade
argument.
$ pip install --upgrade git+https://github.com/earthlab/earthpy.git
Then import it into python.
>>> import earthpy as et
- Chris Holdgraf
- Leah Wasser
- Carson Farmer
- Max Joseph
This package uses pytest for tests.
To run tests locally, execute the command pytest
from the command line:
$ pytest
If a test requires a data object such as a GeoDataFrame or numpy array, and copies of that data object are required by multiple tests, we can use pytest fixtures to cleanly create and tear down those objects independently for each test.
See earthpy/tests/conftest.py
for fixture
definitions, and earthpy/tests/test_clip.py
for example usage of fixtures in tests.