Skip to content

stac-utils/stactools

Repository files navigation

stactools

Build Status PyPI version Documentation codecov Gitter chat License

stactools is a command line tool and library for working with STAC based on PySTAC.

Installation

> pip install stactools

From source repository:

> git clone https://github.com/stac-utils/stactools.git
> cd stactools
> pip install .

Running

> stactools --help

Versions

To install a specific versions of STAC, install the matching version of stactools.

> pip install stactools==0.1.*

The table below shows the corresponding versions between pystac and STAC:

stactools STAC
0.1.x 1.0.x

Documentation

See the documentation page for the latest docs.

Developing

To ensure development libraries are installed, install everything in requirements-dev.txt:

> pip install -r requirements-dev.txt

Unit Tests

Unit tests are in the tests folder. To run unit tests, use unittest:

> python -m unittest discover tests

To run linters, code formatters, and test suites all together, use test:

> ./scripts/test

Code quality checks

stactools uses flake8 and yapf for code formatting and style checks.

To run the flake8 style checks:

> flake8 stactools
> flake8 tests

To format code:

> yapf -ipr stactools
> yapf -ipr tests

You can also run the ./scripts/test script to check flake8 and yapf.

Documentation

To build and develop the documentation locally, make sure sphinx is available (which is installed with requirements-dev.txt), and use the Makefile in the docs folder:

> cd docs
> make html
> make livehtml

Use 'make' without arguments to see a list of available commands.