Surface Displacement workflows for OPERA DISP-S1 products.
Creates the science application software (SAS) using the dolphin library.
- Download source code:
git clone https://github.com/isce-framework/dolphin.git
git clone https://github.com/isce-framework/tophu.git
git clone https://github.com/opera-adt/disp-s1.git
- Install dependencies, either to a new environment:
mamba env create --name my-disp-env --file disp-s1/conda-env.yml
conda activate my-disp-env
or install within your existing env with mamba.
- Install
tophu, dolphin
anddisp-s1
via pip in editable mode
python -m pip install --no-deps -e dolphin/ tophu/ disp-s1/
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.
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
To enable GPU support (on aurora with CUDA 11.6 installed), install the following extra packages:
mamba install -c conda-forge "cudatoolkit=11.6" cupy "pynvml>=11.0"
To build the docker image, run:
./docker/build-docker-image.sh --tag my-tag
which will print out instructions for running the image.