Skip to content

Commit

Permalink
Merge pull request #293 from ASFHyP3/develop
Browse files Browse the repository at this point in the history
Release v3.0.0
  • Loading branch information
jhkennedy authored Jan 12, 2024
2 parents 38487f0 + 06e2fa8 commit 8952357
Show file tree
Hide file tree
Showing 96 changed files with 2,211 additions and 8,149 deletions.
1 change: 1 addition & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:

jobs:
call-changelog-check-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/[email protected]
secrets:
USER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/distribute.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
python -m build
- name: upload to PyPI.org
uses: pypa/[email protected].10
uses: pypa/[email protected].11
with:
user: __token__
password: ${{ secrets.TOOLS_PYPI_PAK }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/labeled-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ on:

jobs:
call-labeled-pr-check-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/[email protected]
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: Create Release Comment

on:
pull_request:
types:
Expand All @@ -7,6 +9,9 @@ on:

jobs:
call-release-checklist-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/[email protected]
permissions:
pull-requests: write
secrets:
USER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Write release and finish
name: Create Release

on:
push:
Expand All @@ -7,6 +7,7 @@ on:

jobs:
call-release-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/[email protected]
with:
release_prefix: HyP3-lib
Expand Down
26 changes: 7 additions & 19 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,12 @@ name: Static analysis
on: push

jobs:
flake8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
with:
python-version: 3.x

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 flake8-import-order flake8-blind-except flake8-builtins
- name: Lint with flake8
run: |
flake8 --max-line-length=120 --import-order-style=pycharm --statistics \
--application-import-names hyp3lib --ignore=A,B,E,I,W,N8
call-secrets-analysis-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/[email protected]

call-flake8-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/[email protected]
with:
local_package_names: hyp3lib
6 changes: 5 additions & 1 deletion .github/workflows/tag-version.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Tag version
name: Tag New Version

on:
push:
Expand All @@ -7,6 +7,10 @@ on:

jobs:
call-bump-version-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/[email protected]
with:
user: tools-bot
email: [email protected]
secrets:
USER_TOKEN: ${{ secrets.TOOLS_BOT_PAK }}
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test with Pytest
name: Test

on:
push:
Expand All @@ -12,8 +12,9 @@ on:

jobs:
call-pytest-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/[email protected]
with:
local_package_name: hyp3lib
python_versions: >-
['3.7', '3.8', '3.9', '3.10']
["3.9", "3.10", "3.11", "3.12"]
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# hyp3lib stuff
make_cogs_*.log
ps2dem_*_log.txt

#### joe made this: http://goel.io/joe

Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ 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).

## [3.0.0]

### Changed
* `hyp3lib` now uses a `src` layout per this [recommendation](https://packaging.python.org/en/latest/discussions/src-layout-vs-flat-layout/).
* `hyp3lib` now only uses `pyproject.toml` for package creation now that `setuptools` recommends [not using setup.py](https://setuptools.pypa.io/en/latest/userguide/quickstart.html#setuppy-discouraged).
* Updated GitHub Actions to current HyP3 standards.
* Updated formatting using Ruff to pass flake8 check.

### Remove
* Support for Python 3.7 and 3.8 has been dropped in line with NumPy and the larger scientific python ecosystem, as described in [NEP-0029](https://numpy.org/neps/nep-0029-deprecation_policy.html) and [SEPC-0000](https://scientific-python.org/specs/spec-0000/)
* All hyp3lib functionality not currently being used by one of these GitHub orgs: ASFHyP3, asfadmin, ASFOpenSARLab, access-cloud-based-insar, dbekaert, ASFBinderRecipes, or insarlab. For a full list of the deleted files, see [here](https://github.com/ASFHyP3/hyp3-lib/pull/286).
* Removed now unused dependencies from `pyproject.toml` and `environment.yml`.

## [2.0.2]

### Fixed
Expand Down
7 changes: 1 addition & 6 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
include LICENSE
include README.md

graft hyp3lib

global-exclude *.py[cod] __pycache__ *.so
global-exclude *.py[cod] __pycache__ *.so
35 changes: 28 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,35 @@
# HyP3-lib
# HyP3-lib: A Common library for HyP3 plugins

## Common library for HyP3 plugins
> [!WARNING]
> HyP3-lib is currently undergoing a major redesign and many utilities that are no longer used by existing HyP3 plugins have been removed between version 2 and version 3. In addition, we plan to migrate some remaining functionality to other projects and to significantly refactor what remains. For this reason, **if you are using HyP3-lib we strongly recommend pinning to major versions at this time**. We further recommend not using this library in production until its version 4 release.
### Please note that the use of `hyp3lib` version 2 or less is **_NOT_** recommended.
## Purpose
The goal of this package is to provide ASF's various HyP3 plugins with a set of utilities they can use to perform common tasks. This could include tasks such as downloading Sentinel-1 orbit data, or verifying that NASA EarthData credentials are available.

This library is outdated and largely untested, containing a broad collection of scripts/tools developed for upstream packages that have since undergone many *major* releases.
If you're a MintPy user looking to crop HyP3 products, please see our [Time Series Analysis with HyP3 and Mintpy Tutorial](https://hyp3-docs.asf.alaska.edu/tutorials/mintpy).

HyP3 plugins only use a subset of this repository, and version 3 will include drastic changes to reduce the library's scope to *just* those codes supporting HyP3 plugin development. We suggest *not* using this library, *especially* in a production environment, until version 3.0.
If you are looking for a way to request HyP3 products via Python, we suggest checkout our [HyP3 Python SDK](https://github.com/ASFHyP3/hyp3-sdk).

If you're a MintPy user looking to crop HyP3 products, please see our [Time Series Analysis with HyP3 and Mintpy Tutorial](https://hyp3-docs.asf.alaska.edu/tutorials/mintpy).
If you are looking for workflows that take advantage of our HyP3 on-demand products, we suggest checking out our [ASF Tools](https://github.com/ASFHyP3/asf-tools) Python library.

## License
The HyP3-lib package is licensed under the BSD 3-Clause license. See the [`LICENSE`](LICENSE) file for more details.

## Code of conduct
We strive to create a welcoming and inclusive community for all contributors to HyP3-lib. As such, all contributors to this project are expected to adhere to our code of conduct.

Please see [`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md) for the full code of conduct text.

## Contributing
Contributions to the HyP3-lib library are welcome! Whether you're finding bugs, adding new features, fixing anything broken, or improving documentation, get started by submitting an issue or pull request!

Please see [`CONTRIBUTING.md`](CONTRIBUTING.md) for more info.

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

For other uses, we suggest checking out our [`asf-tools`](https://github.com/ASFHyP3/asf-tools) Python library and/or the [HyP3 Python SDK](https://github.com/ASFHyP3/hyp3-sdk).
Found a bug? Want to request a feature?
[open an issue](https://github.com/ASFHyP3/hyp3-lib/issues/new)

General questions? Suggestions? Or just want to talk to the team?
[chat with us on gitter](https://gitter.im/ASFHyP3/community)
31 changes: 13 additions & 18 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,20 @@ channels:
- conda-forge
- nodefaults
dependencies:
- python>=3.9
- pip
# For running
- boto3
- gdal
- lxml
- netCDF4
- numpy
- pillow
- requests
- scipy
- six
- statsmodels
- urllib3
# For packaging, and testing
- build
- flake8
Expand All @@ -12,25 +25,7 @@ dependencies:
- flake8-builtins
- setuptools
- setuptools_scm
- wheel
- pytest
- pytest-console-scripts
- pytest-cov
- responses
# For running
- boto3
- gdal
- imageio
- importlib_metadata
- lxml
- matplotlib
- netCDF4
- numpy<1.24
- pillow
- pyproj>=2
- pyshp
- requests
- scipy
- six
- statsmodels
- urllib3
114 changes: 0 additions & 114 deletions hyp3lib/SLC_copy_S1_fullSW.py

This file was deleted.

30 changes: 0 additions & 30 deletions hyp3lib/__init__.py

This file was deleted.

Loading

0 comments on commit 8952357

Please sign in to comment.