-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding first gis module to perform geospatial operations, notebook bu…
…ilds (#61) <!-- Please ensure the PR fulfills the following requirements! --> <!-- If this is your first PR, make sure to add your details to the AUTHORS.rst! --> ### Pull Request Checklist: - [x] This PR addresses an already opened issue (for bug fixes / features) - This PR fixes #60 - [x] (If applicable) Documentation has been added / updated (for bug fixes / features). - [X] (If applicable) Tests have been added. - [X] CHANGES.rst has been updated (with summary of main changes). - [X] Link to issue (:issue:`number`) and pull request (:pull:`number`) has been added. ### What kind of change does this PR introduce? This PR adds a GIS module for usual geospatial operations that are common in hydrology such a watershed delineation, watershed properties extraction, etc. It adapts the work that's been done in [ravenpy](https://ravenpy.readthedocs.io/) while also adding some new functionalities. **Watershed Delineation** - [x] Support concurrent delineation of multiple watersheds simultaneously. - [X] Enable access to official watershed polygons (shapefiles/geojson/geoparquet) from authoritative sources (DEH, HYDAT, USGS, HQ, etc.) —implemented collaboratively with xdatasets. **Physiographic Variable (or others) Extraction** - [x] Support simultaneous extraction of physiographic variables across multiple watersheds. - [X] Facilitate the extraction of variables present in STAC catalogs (e.g., Planetary Computer). - [X] Implement extraction considering pixel weighting rather than an "all_touched" approach, as this can significantly impact final results —implemented collaboratively with xdatasets. ### Does this PR introduce a breaking change? No ### Other information: This PR also integrates the changes from #65 and #68
- Loading branch information
Showing
20 changed files
with
12,849 additions
and
1,047 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: Label Pull Request on Pull Request review approval | ||
|
||
on: | ||
pull_request_review: | ||
types: | ||
- submitted | ||
pull_request_target: | ||
types: | ||
- ready_for_review | ||
- review_requested | ||
|
||
permissions: | ||
checks: write | ||
contents: read | ||
pull-requests: write | ||
|
||
jobs: | ||
label_approved: | ||
name: Label on Approval | ||
if: | | ||
(!contains(github.event.pull_request.labels.*.name, 'approved')) && | ||
(github.event.review.state == 'approved') && | ||
(github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Label Approved | ||
uses: actions/github-script@v7.0.1 | ||
with: | ||
script: | | ||
github.rest.issues.addLabels({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
labels: ['approved'] | ||
}) | ||
comment_approved: | ||
name: Comment Concerning Approved Tag | ||
if: | | ||
(github.event_name == 'pull_request_target') && | ||
(github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Find comment | ||
uses: peter-evans/find-comment@v2.4.0 | ||
id: fc | ||
with: | ||
issue-number: ${{ github.event.pull_request.number }} | ||
comment-author: 'github-actions[bot]' | ||
body-includes: This Pull Request is coming from a fork and must be manually tagged `approved` in order to perform additional testing | ||
- name: Create comment | ||
if: | | ||
(steps.fc.outputs.comment-id == '') && | ||
(!contains(github.event.pull_request.labels.*.name, 'approved')) && | ||
(github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name) | ||
uses: peter-evans/create-or-update-comment@v3.1.0 | ||
with: | ||
comment-id: ${{ steps.fc.outputs.comment-id }} | ||
issue-number: ${{ github.event.pull_request.number }} | ||
body: | | ||
> **Warning** | ||
> This Pull Request is coming from a fork and must be manually tagged `approved` in order to perform additional testing. | ||
edit-mode: replace | ||
- name: Update comment | ||
if: | | ||
contains(github.event.pull_request.labels.*.name, 'approved') | ||
uses: peter-evans/create-or-update-comment@v3.1.0 | ||
with: | ||
comment-id: ${{ steps.fc.outputs.comment-id }} | ||
issue-number: ${{ github.event.pull_request.number }} | ||
body: | | ||
> **Note** | ||
> This Pull Request is approved! | ||
reactions: | | ||
hooray | ||
edit-mode: append |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.