Skip to content

Commit

Permalink
Merge branch 'main' into aria_prep_corr
Browse files Browse the repository at this point in the history
  • Loading branch information
yunjunz authored Aug 15, 2024
2 parents 92bc5a3 + f5fc900 commit 9b6a635
Show file tree
Hide file tree
Showing 177 changed files with 7,699 additions and 3,400 deletions.
47 changes: 28 additions & 19 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ version: 2.1
jobs:
unit-n-workflow-tests:
docker:
- image: ubuntu:bionic
- image: cimg/base:current
environment:
CONDA_PREFIX: /root/tools/miniconda3
CONDA_PREFIX: /root/tools/miniforge
MINTPY_HOME: /root/tools/MintPy
user: root
working_directory: /root/tools/MintPy
Expand All @@ -13,22 +13,17 @@ jobs:
steps:
- checkout
- run:
name: Setting Up Environment with Miniconda
name: Setting Up Environment with Miniforge
command: |
apt update
apt-get update --yes && apt-get upgrade --yes
apt-get install --yes git wget
# download and install miniconda3
# install miniforge
mkdir -p ${HOME}/tools
cd ${HOME}/tools
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b -p ${HOME}/tools/miniconda3
${HOME}/tools/miniconda3/bin/conda init bash
# add conda-forge channel and install mamba
${HOME}/tools/miniconda3/bin/conda config --add channels conda-forge
#${HOME}/tools/miniconda3/bin/conda config --set channel_priority strict
${HOME}/tools/miniconda3/bin/conda install --yes mamba
cat ${HOME}/.condarc
wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh
bash Miniforge3-Linux-x86_64.sh -b -p ${HOME}/tools/miniforge
${HOME}/tools/miniforge/bin/mamba init bash
# modify/export env var PATH to BASH_ENV to be shared across run steps
echo 'export PATH=${CONDA_PREFIX}/bin:${PATH}' >> ${BASH_ENV}
Expand All @@ -38,11 +33,13 @@ jobs:
command: |
export PYTHONUNBUFFERED=1
# install dependencies and source code
source activate root
mamba install --verbose --yes gdal">=3" --file ${MINTPY_HOME}/requirements.txt
# pin gdal version as "<=3.8" because:
# 1) gdal-3.9 could not read the GMT-6 *.grd file properly
# 2) gdal-3.9 could not be imported in circle CI (https://github.com/insarlab/MintPy/issues/1220)
mamba install --verbose --yes --file ${MINTPY_HOME}/requirements.txt gdal"<=3.8"
python -m pip install ${MINTPY_HOME}
# test installation
smallbaselineApp.py -v
smallbaselineApp.py -h
tropo_pyaps3.py -h
solid_earth_tides.py -h
Expand All @@ -55,25 +52,37 @@ jobs:
${MINTPY_HOME}/tests/dem_error.py
- run:
name: Workflow Test 1/4 - FernandinaSenDT128 (ISCE/topsStack)
name: Integration Test 1 - FernandinaSenDT128 (ISCE2/topsStack)
command: |
mkdir -p ${HOME}/data
${MINTPY_HOME}/tests/smallbaselineApp.py --dir ${HOME}/data --dset FernandinaSenDT128
- run:
name: Workflow Test 2/4 - SanFranSenDT42 (ARIA)
name: Integration Test 2 - SanFranSenDT42 (ARIA)
command: |
mkdir -p ${HOME}/data
${MINTPY_HOME}/tests/smallbaselineApp.py --dir ${HOME}/data --dset SanFranSenDT42
- run:
name: Workflow Test 3/4 - WellsEnvD2T399 (Gamma)
name: Integration Test 3 - RidgecrestSenDT71 (HyP3)
command: |
mkdir -p ${HOME}/data
${MINTPY_HOME}/tests/smallbaselineApp.py --dir ${HOME}/data --dset RidgecrestSenDT71
- run:
name: Integration Test 4 - SanFranBaySenD42 (GMTSAR)
command: |
mkdir -p ${HOME}/data
${MINTPY_HOME}/tests/smallbaselineApp.py --dir ${HOME}/data --dset SanFranBaySenD42
- run:
name: Integration Test 5 - WellsEnvD2T399 (Gamma)
command: |
mkdir -p ${HOME}/data
${MINTPY_HOME}/tests/smallbaselineApp.py --dir ${HOME}/data --dset WellsEnvD2T399
- run:
name: Workflow Test 4/4 - WCapeSenAT29 (SNAP)
name: Integration Test 6 - WCapeSenAT29 (SNAP)
command: |
mkdir -p ${HOME}/data
${MINTPY_HOME}/tests/smallbaselineApp.py --dir ${HOME}/data --dset WCapeSenAT29
Expand Down
5 changes: 3 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ PASTE ERROR MESSAGE HERE

**System information**

* Operating system: <!-- macOS, Linux-CentOS, Linux-RedHat, Linux-Ubuntu, Windows, etc. -->
* Python environment: <!-- conda, macports, pip, manual, etc. -->
* Operating system: <!-- macOS, Linux, Windows, etc. -->
* Python environment: <!-- conda, macports, pip, path setup, etc. -->
* MintPy version: <!-- output of `smallbaselineApp.py -v` -->
* InSAR processor/product: <!-- isce2, aria, fringe, miaplpy, hyp3, gamma, snap, roipac, etc. -->
* Your custom / default template file (if the bug is related to a specific dataset): <!-- It helps the diagnose a lot if you could post the configurations you used. You can drag-and-drop them here directly. -->
7 changes: 7 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# .github/release.yml

changelog:
exclude:
authors:
- dependabot
- pre-commit-ci
12 changes: 6 additions & 6 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ jobs:
name: Build Docker image and push to GitHub Container Registry
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand All @@ -39,7 +39,7 @@ jobs:
echo "MINTPY_VERSION=$(git describe --tags)" >> $GITHUB_ENV
- name: Build, tag, and push image to Github Container Registry
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
Expand All @@ -52,14 +52,14 @@ jobs:
- name: Add develop tag
if: github.ref == 'refs/heads/main'
uses: akhilerm/tag-push-action@v2.1.0
uses: akhilerm/tag-push-action@v2.2.0
with:
src: ghcr.io/${{ env.REPO }}:${{ env.MINTPY_VERSION }}
dst: ghcr.io/${{ env.REPO }}:develop

- name: Add latest tag
if: startsWith(github.ref, 'refs/tags/v')
uses: akhilerm/tag-push-action@v2.1.0
uses: akhilerm/tag-push-action@v2.2.0
with:
src: ghcr.io/${{ env.REPO }}:${{ env.MINTPY_VERSION }}
dst: ghcr.io/${{ env.REPO }}:latest
8 changes: 4 additions & 4 deletions .github/workflows/build-n-publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python 3.10
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"

Expand All @@ -41,7 +41,7 @@ jobs:
--outdir dist/
.
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: |
dist/*.tar.gz
Expand All @@ -54,7 +54,7 @@ jobs:
if: github.repository_owner == 'insarlab' && github.event_name == 'push'
steps:

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
# unpacks default artifact into dist/
# if `name: artifact` is omitted, the action will create extra parent dir
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ dist/
downloads/
eggs/
.eggs/
fix_typos/
lib/
lib64/
parts/
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fail_fast: true

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.4.0"
rev: "v4.6.0"
hooks:
- id: check-added-large-files
args: ['--maxkb=20']
Expand All @@ -27,7 +27,7 @@ repos:
exclude: tests/data/

- repo: https://github.com/PyCQA/isort
rev: "5.12.0"
rev: "5.13.2"
hooks:
- id: isort
name: sort imports
Expand All @@ -36,7 +36,7 @@ repos:
'--combine-as']

- repo: https://github.com/asottile/pyupgrade
rev: "v3.3.1"
rev: "v3.17.0"
hooks:
- id: pyupgrade
name: modernize python
Expand Down
13 changes: 9 additions & 4 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"

# Build documentation in the docs/ directory with Sphinx
#sphinx:
# configuration: docs/conf.py
Expand All @@ -18,7 +24,6 @@ formats: all

# Optionally set the version of Python and requirements required to build your docs
# conda method does not work because of the "command killed due to excessive memory consumption" error
python:
version: 3.7
install:
- requirements: docs/requirements4rtd.txt
#python:
# install:
# - requirements: docs/requirements4rtd.txt
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ LABEL org.opencontainers.image.source="https://github.com/insarlab/MintPy"
LABEL org.opencontainers.image.documentation="https://mintpy.readthedocs.io/en/latest/"
LABEL org.opencontainers.image.licenses="GPL-3.0-or-later"

# Dynamic lables to define at build time via `docker build --label`
# Dynamic labels to define at build time via `docker build --label`
# LABEL org.opencontainers.image.created=""
# LABEL org.opencontainers.image.version=""
# LABEL org.opencontainers.image.revision=""
Expand Down
2 changes: 1 addition & 1 deletion docs/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at `yunjunzgeo at gmail dot com` or `hersh.fattahi at gmail dot com`. All
reported by contacting the project team at `yunjunz at outlook dot com` or `hersh.fattahi at gmail dot com`. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Expand Down
26 changes: 18 additions & 8 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This document is inspired by similar instructions from numpy, GMT, ISCE, gdal and jupyterhub. If you're reading this section, you're probably interested in contributing to MintPy. Welcome and thanks for your interest in contributing!

These are several ways to contribute to the MintPy project:
There are several ways to contribute to the MintPy project:

* Writing or proofreading documentation (including tutorials and examples in jupyter-notebooks)
* Submitting bug reports or feature requests on [GitHub issue](https://github.com/insarlab/MintPy/issues)
Expand Down Expand Up @@ -36,12 +36,12 @@ is a great starting point if you are new to version control.
- `origin`, which refers to your personal fork

+ Setting up [`pre-commit`](https://pre-commit.com/) within `MintPy` directory:
- Run `pre-commit install` to set up the git hook scripts, so that `pre-commit` will run automatically on `git commit`. If the `No .pre-commit-config.yaml file was found` error occurrs, update your local MintPy to the latest upstream version to have this config file.
- Run `pre-commit install` to set up the git hook scripts, so that `pre-commit` will run automatically on `git commit`. If the `No .pre-commit-config.yaml file was found` error occurs, update your local MintPy to the latest upstream version to have this config file.


#### 2. Develop your contribution: ####

+ **Open an [issue](https://github.com/insarlab/MintPy/issues) first** if you plan to introduce a new feature or to change funcationality, we may have easier ways to help you implement it. If there is already an issue that matches your idea, leave a comment there instead to let us know what you plan to do. For bug fixes, documentation updates, etc., this is generally not necessary.
+ **Open an [issue](https://github.com/insarlab/MintPy/issues) first** if you plan to introduce a new feature or to change functionality, we may have easier ways to help you implement it. If there is already an issue that matches your idea, leave a comment there instead to let us know what you plan to do. For bug fixes, documentation updates, etc., this is generally not necessary.

+ Pull the latest changes from upstream:

Expand All @@ -56,19 +56,25 @@ is a great starting point if you are new to version control.
git checkout -b seasonal_fitting
```

+ Work on your idea, run tests and commit locally (`git add` and `git commit`) and/or to your fork on GitHub as you progress (`git push` in command line or [GitHub Desktop](https://desktop.github.com/) with graphical user interface). Use a clear commit message describing the motivation of a change, the nature of a bug for bug fixes or some details on what an enchancement does.
+ Work on your idea, run tests, and commit locally (`git add` and `git commit`) and/or to your fork on GitHub as you progress (`git push` in the command line or [GitHub Desktop](https://desktop.github.com/) with graphical user interface). Use a clear commit message describing the motivation for a change, the nature of a bug for bug fixes, or some details on what an enhancement does.

+ Run the following `pre-commit` commands repeatedly until all checks are passed:

```
pre-commit run --all-files
```

+ Run the [overall test](./CONTRIBUTING.md#testing) locally.

#### 3. To submit your contribution: ####

+ Go to your fork on GitHub. The new branch will show up with a Pull request button. Click and fill out the pull request template, make sure the title and message are clear, concise, and self-explanatory (these descriptions are how we keep track of the changes made to the project over time). Then click the button to submit it.
+ Go to your fork on GitHub. The new branch will show up with a Pull Request button. Click and fill out the pull request template, and make sure the title and message are clear, concise, and self-explanatory (these descriptions are how we keep track of the changes made to the project over time). Then click the button to submit it.

#### 4. Review process: ####

We follow the [git pull request (PR) workflow](https://www.asmeurer.com/git-workflow/) to make changes to our codebase. Every change made goes through a PR, even our own, so that our [continuous integration](https://en.wikipedia.org/wiki/Continuous_integration) services have a chance to check that the code is up to standards. GitHub will show the status of the these checks on the PR. Try to get them all passsing (green). If you have any trouble, leave a comment in the PR.
We follow the [git pull request (PR) workflow](https://www.asmeurer.com/git-workflow/) to make changes to our codebase. Every change made goes through a PR, even our own, so that our [continuous integration](https://en.wikipedia.org/wiki/Continuous_integration) services have a chance to check that the code is up to standards. GitHub will show the status of these checks on the PR. Try to get them all passing (green). If you have any trouble, leave a comment in the PR.

+ Reviewers (the other developers and interested community members) will write inline and/or general comments on your PR to help you improve its implementation, documentation and style. We don't want to break the shared codebase, so care must be taken not to introduce bugs. Please don’t let the review discourage you from contributing: its only aim is to improve the quality of project, not to criticize (we are, after all, very grateful for the time you’re donating!).
+ Reviewers (the other developers and interested community members) will write inline and/or general comments on your PR to help you improve its implementation, documentation and style. We don't want to break the shared codebase, so care must be taken not to introduce bugs. Please don’t let the review discourage you from contributing: its only aim is to improve the quality of the project, not to criticize (we are, after all, very grateful for the time you’re donating!).

+ To update your PR, make your changes on your local repository, run tests, and only if they succeed commit and push to your fork. As soon as those changes are pushed up (to the same branch as before) the PR will update automatically. If you have no idea how to fix the test failures, you may push your changes anyway and ask for help in a PR comment.

Expand Down Expand Up @@ -102,9 +108,13 @@ It's a good idea to test any changes or bugs you have fixed, in the feature bran
${MINTPY_HOME}/tests/smallbaselineApp.py
```

It takes about 15 mins to finish.
It takes about 15 minutes to finish.


## Things you should NOT do ##

(For anyone with push rights to github.com/insarlab/MintPy) Never modify a commit or the history of anything that has been committed to the `main` branch.

## Looking for ideas to contribute? ##

Feel ready and look for something to try? Check our [to-do list](https://github.com/insarlab/MintPy/wiki/To-do-list) and [roadmap](https://github.com/insarlab/MintPy/wiki/version-2-roadmap) for the next major version 2.0!
4 changes: 2 additions & 2 deletions docs/FAQs.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ For line-of-sight (LOS) phase in the unit of radians, i.e. 'unwrapPhase' dataset

For LOS displacement (velocity) in the unit of meters (m/yr), i.e. 'timeseries' dataset in `timeseries.h5` file, positive value represents motion toward the satellite (uplift for pure vertical motion).

### 2. How to prepare the input for MintPy if I am using currently un-supported InSAR softwares?
### 2. How to prepare the input for MintPy if I am using currently un-supported InSAR software?

The input of MintPy routine workflow (`smallbaselineApp.py`) is a stack of unwrapped interferograms. For "stack", we mean all the interferograms (unwrapped phase and spatial coherence) and geometries (DEM, incidence angle, etc.) have the same spatial extent and same spatial resolution, either in geo-coordinates or radar (range-doppler) coordinates. The input has 2 components: data and attributes.

Expand Down Expand Up @@ -39,7 +39,7 @@ For dataset in geo-coordinates [recommended]:

For dataset in radar-coordinates, the extra lookup table file(s) is required (_e.g._ lat/lon.rdr for `ISCE-2`, sim_\*.UTM_TO_RDC for `Gamma`, geo_\*.trans for `ROI_PAC`).

All the files above should be in the same spatial extent and same spatial resolution (except for the lookup table in geo-coordinates from Gamma/ROI_PAC). If they are not (e.g. different row/column number, different spatial extent in terms of SNWE, different spatial resolution, etc.), the easiest way is to geocode them with the same ouput spatial extent and same output spatial resolution.
All the files above should be in the same spatial extent and same spatial resolution (except for the lookup table in geo-coordinates from Gamma/ROI_PAC). If they are not (e.g. different row/column number, different spatial extent in terms of SNWE, different spatial resolution, etc.), the easiest way is to geocode them with the same output spatial extent and same output spatial resolution.

MintPy read data files via `mintpy.utils.readfile.read()`. It supports the following two types of file formats:

Expand Down
Loading

0 comments on commit 9b6a635

Please sign in to comment.