Skip to main content

A set of helper functions to make working with spatial data in open source tools easier. This package is maintained by Earth Lab and was originally designed to support the earth analytics education program.

Project description

DOI Build Status codecov Docs build Code style: black

EarthPy

A package that supports working with spatial data in python teaching.

Install

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

Active Contributors

  • Leah Wasser
  • Max Joseph
  • Joe McGlinchy
  • Tim Head
  • Chris Holdgraf
  • Jenny Palomino

Testing

This package uses pytest for tests. To run tests locally, execute the command pytest from the command line:

$ pytest --doctest-modules

The --doctest-modules syntax allows pytest to check examples in docstrings contained in modules (e.g., if a function has an example section), in addition to the normal tests that pytest would discover.

Testing example code in the docs directory

To locally test examples in the docs directory (e.g., examples contained in .rst files), you can run the following command from the top-level earthpy directory:

$ make -C docs doctest

Data generated for testing

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

earthpy-0.6.2.tar.gz (19.0 kB view details)

Uploaded Source

File details

Details for the file earthpy-0.6.2.tar.gz.

File metadata

  • Download URL: earthpy-0.6.2.tar.gz
  • Upload date:
  • Size: 19.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for earthpy-0.6.2.tar.gz
Algorithm Hash digest
SHA256 737309de304be69febadd41f5c516a7d50c2cd2f6cf5568c5c83aa55b84a3b0b
MD5 dd5f96ae33443d2815862d19ec1dc171
BLAKE2b-256 9098fd9691e52328bd9a9a6957e12091b37f73715fd725493901a4fd9799951b

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page