Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
51cf8c4
Bump the pip-deps group with 2 updates
dependabot[bot] Oct 14, 2025
6b3927b
add initial workflow
mfangaritav Oct 16, 2025
c6dddb9
add initial workflow
mfangaritav Oct 16, 2025
286d37c
add opensarlab_lib a requirement
mfangaritav Oct 16, 2025
10b3f33
ruff and mypy
mfangaritav Oct 16, 2025
34fcf69
ruff format
mfangaritav Oct 16, 2025
1a7d6ed
add tests
mfangaritav Oct 20, 2025
0ae5e57
add tests
mfangaritav Oct 20, 2025
851afc3
add more tests and token
mfangaritav Oct 20, 2025
99056c7
ruff
mfangaritav Oct 20, 2025
09b7374
create rename_products function
mfangaritav Oct 20, 2025
f1dafc6
changes to conftest
mfangaritav Oct 20, 2025
80b5cc9
test changes
mfangaritav Oct 20, 2025
5f0a7bc
mypy
mfangaritav Oct 20, 2025
e46447d
Merge pull request #1 from ASFHyP3/dependabot/pip/pip-deps-636b6db794
mfangaritav Oct 20, 2025
d7d8487
Merge branch 'develop' into initial
mfangaritav Oct 20, 2025
68fd08c
split set_same_frame
mfangaritav Oct 21, 2025
0430178
add help strings
mfangaritav Oct 21, 2025
e0e3510
Merge pull request #2 from ASFHyP3/initial
mfangaritav Oct 22, 2025
69258c1
add new format name
mfangaritav Oct 27, 2025
4793d8c
add new format name
mfangaritav Oct 27, 2025
e7d56db
Bump ruff from 0.14.0 to 0.14.2 in the pip-deps group
dependabot[bot] Oct 27, 2025
ee028d9
Merge pull request #5 from ASFHyP3/dependabot/pip/pip-deps-9cc92ce114
mfangaritav Oct 27, 2025
01fd002
Merge branch 'develop' into new_name
mfangaritav Oct 27, 2025
64d22da
remove extra colon
mfangaritav Oct 28, 2025
65bedd0
Merge pull request #4 from ASFHyP3/new_name
mfangaritav Oct 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,5 @@ jobs:
permissions: {}
with:
release_prefix: HyP3 mintpy
release_branch: main
develop_branch: develop
secrets:
USER_TOKEN: ${{ secrets.USERNAME_FOR_GITHUB_ACTIONS_PAK }}
USER_TOKEN: ${{ secrets.TOOLS_BOT_PAK }}
5 changes: 1 addition & 4 deletions .github/workflows/tag-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,5 @@ jobs:
# https://github.com/ASFHyP3/actions#reusable-bump-versionyml
uses: ASFHyP3/actions/.github/workflows/reusable-bump-version.yml@v0.20.0
permissions: {}
with:
user: username_for_github_actions
email: email_for@github_actions.com
secrets:
USER_TOKEN: ${{ secrets.USERNAME_FOR_GITHUB_ACTIONS_PAK }}
USER_TOKEN: ${{ secrets.TOOLS_BOT_PAK }}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [PEP 440](https://www.python.org/dev/peps/pep-0440/)
and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.0]

### Added
- Initial workflow to run MintPy with basic settings.

## [0.1.0]

### Added
Expand Down
55 changes: 54 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,56 @@
# HyP3 mintpy
# HyP3 MintPy

HyP3 plugin for MintPy processing.

## Usage
The `hyp3_mintpy` command line tool can be run using the following structure:
```bash
python -m hyp3_mintpy \
--job-name Okmok_44 \
--min-coherence 0.1 \
```
Where:

* `--job-name` is the multiburst project name name in HyP3
* `--min-coherence` is the minimum coherence for the timeseries inversion

> [!IMPORTANT]
> Earthdata credentials are necessary to access HyP3 data. See the Credentials section for more information.

### Credentials

Generally, credentials are provided via environment variables, but some may be provided by command-line arguments or via a `.netrc` file.

For Earthdata login, you can provide credentials by exporting environment variables:
```
export EARTHDATA_USERNAME=your-edl-username
export EARTHDATA_PASSWORD=your-edl-password
```
or via your [`~/.netrc` file](https://everything.curl.dev/usingcurl/netrc) which should contain lines like these two:
```
machine urs.earthdata.nasa.gov login your-edl-username password your-edl-password
```

## Developer Setup
1. Ensure that conda is installed on your system (we recommend using [mambaforge](https://github.com/conda-forge/miniforge#mambaforge) to reduce setup times).
2. Download a local version of the `hyp3-mintpy` repository (`git clone https://github.com/ASFHyP3/hyp3-mintpy.git`)
3. In the base directory for this project call `mamba env create -f environment.yml` to create your Python environment, then activate it (`mamba activate hyp3-mintpy`)
4. Finally, install a development version of the package (`python -m pip install -e .`)

To run all commands in sequence use:
```bash
git clone https://github.com/ASFHyP3/hyp3-mintpy.git
cd hyp3-mintpy
mamba env create -f environment.yml
mamba activate hyp3-mintpy
python -m pip install -e .
```

## Contributing
Contributions to the HyP3 mintpy plugin are welcome! If you would like to contribute, please submit a pull request on the GitHub repository.

## Contact Us
Want to talk about HyP3 mintpy? We would love to hear from you!

Found a bug? Want to request a feature?
[open an issue](https://github.com/ASFHyP3/hyp3-gather-landsat/issues/new)
4 changes: 4 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ dependencies:
- pytest-console-scripts
- pytest-cov
# For running
- geopandas
- hyp3lib>=3,<4
- hyp3_sdk
- mintpy
- rasterio
# TODO: insert conda-forge dependencies as list here
- pip:
- -r requirements-static.txt
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ classifiers=[
"Programming Language :: Python :: 3.13",
]
dependencies = [
"hyp3lib>=3,<4",
"hyp3lib>=3,<5",
# TODO: insert Python dependencies as list here
]
dynamic = ["version"]
Expand Down
3 changes: 2 additions & 1 deletion requirements-static.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
ruff==0.13.2
ruff==0.14.2
mypy==1.18.2
opensarlab_lib
24 changes: 20 additions & 4 deletions src/hyp3_mintpy/__main__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
"""mintpy processing for HyP3."""

import logging
import os
import warnings
from argparse import ArgumentParser
from pathlib import Path

from hyp3lib.aws import upload_file_to_s3
from hyp3lib.fetch import write_credentials_to_netrc_file

from hyp3_mintpy.process import process_mintpy

Expand All @@ -15,17 +19,29 @@ def main() -> None:
parser.add_argument('--bucket-prefix', default='', help='Add a bucket prefix to product(s)')

# TODO: Your arguments here
parser.add_argument('--greeting', default='Hello world!', help='Write this greeting to a product file')
parser.add_argument('--job-name', help='The name of the HyP3 job', required=True)
parser.add_argument(
'--min-coherence', default=0.01, type=float, help='The minimum coherence to process', required=False
)

args = parser.parse_args()

logging.basicConfig(
format='%(asctime)s - %(levelname)s - %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p', level=logging.INFO
)

product_file = process_mintpy(
greeting=args.greeting,
)
username = os.getenv('EARTHDATA_USERNAME')
password = os.getenv('EARTHDATA_PASSWORD')
if username and password:
write_credentials_to_netrc_file(username, password, append=False)

if not (Path.home() / '.netrc').exists():
warnings.warn(
'Earthdata credentials must be present as environment variables, or in your netrc.',
UserWarning,
)

product_file = process_mintpy(job_name=args.job_name, min_coherence=args.min_coherence)

if args.bucket:
upload_file_to_s3(product_file, args.bucket, args.bucket_prefix)
Expand Down
Loading