Giter Club home page Giter Club logo

disp-s1's Introduction

DISP-S1

Pytest and build docker image pre-commit.ci status

Surface Displacement workflows for OPERA DISP-S1 products.

Creates the science application software (SAS) using the dolphin library.

Development setup

Prerequisite installs

  1. 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
  1. 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.

  1. Install tophu, dolphin and disp-s1 via pip in editable mode
python -m pip install --no-deps -e dolphin/ tophu/ disp-s1/

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

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

Optional GPU setup

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"

Building the docker image

To build the docker image, run:

./docker/build-docker-image.sh --tag my-tag

which will print out instructions for running the image.

disp-s1's People

Contributors

scottstanie avatar pre-commit-ci[bot] avatar ehavazli avatar liangjyu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.