Skip to content

opera-adt/disp-xr

Repository files navigation

Xarray tools for OPERA DISP

Analysis tools using xarray for OPERA Surface Displacement from Sentinel-1 (DISP-S1) and Surface Displacement from NISAR (DISP-NISAR).

Development setup

Prerequisite installs

  1. Download source code:
git clone https://github.com/opera-adt/disp-xr.git
  1. Install dependencies, either to a new environment:
mamba env create --name disp_xr --file disp-xr/environment.yml
conda activate disp_xr

or install within your existing env with mamba.

  1. Install disp_xr via pip in editable mode
python -m pip install --no-deps -e  disp-xr

Setup for contributing

We use pre-commit to automatically run linting, formatting, and mypy type checking. Additionally, we follow numpydoc conventions for docstrings. To install pre-commit locally, run:

pre-commit install

This adds a pre-commit hooks so that linting/formatting is done automatically. If code does not pass the checks, you will be prompted to fix it before committing. Remember to re-add any files you want to commit which have been altered by pre-commit. You can do this by re-running git add on the files.

Since we use black for formatting and flake8 for linting, it can be helpful to install these plugins into your editor so that code gets formatted and linted as you save.

Running the unit tests

NOTE: ADD TESTS

After making functional changes and/or have added new tests, you should run pytest to check that everything is working as expected.

First, install the extra test dependencies:

python -m pip install --no-deps -e .[test]

Then run the tests:

pytest

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •