-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding first gis module to perform geospatial operations, notebook builds #61
Merged
Merged
Changes from 101 commits
Commits
Show all changes
103 commits
Select commit
Hold shift + click to select a range
ec632c4
adding first gis module to perform geospatial operations required for…
sebastienlanglois bd38932
add documentation
sebastienlanglois 629572c
add backward compatibility for type hints
sebastienlanglois a9c8fb7
change kernel in specs
sebastienlanglois 99fc6b0
add climatology extraction from watershed boundaries
sebastienlanglois 96d53be
Merge branch 'main' of https://github.com/hydrologie/xhydro into basi…
sebastienlanglois c761419
correct kernel name
sebastienlanglois 0849dda
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] b10b342
complete climatology example and add correct dependencies
sebastienlanglois f8ef52b
Merge branch 'basin-delineation' of https://github.com/hydrologie/xhy…
sebastienlanglois 6207fe1
update gis notebook with no execution from nbsphinx at the notebook l…
sebastienlanglois f59e9b6
correct typos
sebastienlanglois 7baaccf
precalculate map
sebastienlanglois cbf3cb4
test again readthedocs build
sebastienlanglois cb15134
temporary fix for pydantic dependency
sebastienlanglois 8d0cb9f
add more context to documentation
sebastienlanglois e3461a7
try adding interactive map
sebastienlanglois e48fa87
conditionally run notebooks, add nbQA hooks for cleaning up notebooks…
Zeitsperre 7dea0a1
exclude ipynb files from pretty-json hook
Zeitsperre a45844e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 2c1f9b9
update pre-commit
Zeitsperre 095c0aa
remove kernelspec information
Zeitsperre 2ee6b4e
synchronize dependencies, add test-notebooks Makefile recipe, add pyt…
Zeitsperre 7af3277
add "approved" label handling
Zeitsperre 20ebeef
remove pytest-xdist
Zeitsperre 5905263
add makefile recipe for installing esmpy
Zeitsperre c3c7c48
add builds for testing notebooks and for running preliminary tests wi…
Zeitsperre 4875b9c
preliminary build from conda, ESMF-source build optional
Zeitsperre 519a6df
add default shell
Zeitsperre 3b1d54e
update CHANGES.rst
Zeitsperre 3e65cd4
backticks where needed
Zeitsperre 85e37f3
add land use classification function
sebastienlanglois cb98b00
Merge branch 'main' of https://github.com/hydrologie/xhydro into basi…
sebastienlanglois 9772de3
add unit tests for gis module
sebastienlanglois a8dd3b5
update docstrings
sebastienlanglois d776be7
add first batch of missing tests
sebastienlanglois 2add8ee
Merge branch 'main' of https://github.com/hydrologie/xhydro into basi…
sebastienlanglois 5e53b39
Merge branch 'basin-delineation' into conditional-notebook-builds
Zeitsperre 955cf61
disable ESMF-source build
Zeitsperre 2e391c2
update tests
sebastienlanglois 7e88b44
update changes
sebastienlanglois 4084d57
update typos
sebastienlanglois 5be464e
complete tests
sebastienlanglois cfa6d32
Merge branch 'basin-delineation' into conditional-notebook-builds
Zeitsperre 456c425
Conditionally Run Notebooks (#65)
Zeitsperre f8bf322
add notebooks label to pull requests when notebooks are modified
Zeitsperre cff536f
update CHANGES.rst
Zeitsperre 305a8f7
update CHANGES.rst
Zeitsperre 561d53b
Some small text adjustments
Zeitsperre d576ba3
Add notebooks label to pull requests when notebooks are modified (#68)
Zeitsperre 3a15c0a
strip outputs
sebastienlanglois cd13490
Merge branch 'basin-delineation' of https://github.com/hydrologie/xhy…
sebastienlanglois 0685e5a
strip map
sebastienlanglois a8cb7ac
Apply suggestions from code review
Zeitsperre 7ebb98e
remove nbsphinx execution to never
sebastienlanglois 347d5c0
Merge branch 'basin-delineation' of https://github.com/hydrologie/xhy…
sebastienlanglois 9157eda
only skip running notebooks when SKIP_NOTEBOOKS env var is set
Zeitsperre 1cb2a3f
pin all formatting tools to the same versions
Zeitsperre 654b7a7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] f6f0440
keep notebook outputs
Zeitsperre 811592e
always run when called by GitHub
Zeitsperre 0d0b365
add makefile recipe for checking that notebooks run, ignoring outputs
Zeitsperre 015a348
maybe call the proper notebook testing command in the workflows? that…
Zeitsperre 4288ef2
try keeping run counts, drop empty cells
Zeitsperre 509d791
rerun notebooks
Zeitsperre e5eb465
Merge branch 'main' into basin-delineation
Zeitsperre 66e0fdc
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 5dde017
Merge branch 'main' into basin-delineation
Zeitsperre 77df41e
Apply suggestions from code review
Zeitsperre e239aea
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] a7000cd
use pipe notation
Zeitsperre 1305ef6
fix filename
Zeitsperre 23f60ab
fix filename
Zeitsperre 4c5c5de
fix test outputs
Zeitsperre e3b19ba
mark test as being failable due to API limits
Zeitsperre 2085af1
Merge branch 'main' into basin-delineation
Zeitsperre 9dd505e
Merge branch 'main' into basin-delineation
Zeitsperre ebe93d6
pin intake-esm
Zeitsperre 5a58da0
Merge branch 'main' into basin-delineation
Zeitsperre bb83bbe
Merge branch 'main' into basin-delineation
Zeitsperre d24a903
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] ede5c76
fix version
Zeitsperre ae206ad
use pytest>=8.0.0
Zeitsperre 8600d35
remove duplicate entry
Zeitsperre 5360e2a
pin intake below v2.0.0
Zeitsperre feae452
relax some pins
Zeitsperre c1d5410
version pinning
Zeitsperre 038ac20
Merge branch 'main' into basin-delineation
Zeitsperre 1128b72
update gis notebook
sebastienlanglois cec771a
Merge branch 'basin-delineation' of https://github.com/hydrologie/xhy…
sebastienlanglois b3639fb
updated branch after review
sebastienlanglois f31919b
Merge branch 'main' into basin-delineation
sebastienlanglois ed2e8cf
try pipeline with striped outputs in gis notebook
sebastienlanglois 4d4ba4c
update kernelspec
sebastienlanglois 32b07b5
remove kernelspec field
Zeitsperre 750b5d5
remove kernelspec and add outputs to notebook
sebastienlanglois a0eb88a
Merge branch 'basin-delineation' of https://github.com/hydrologie/xhy…
sebastienlanglois 36901a6
correct gravelius property name
sebastienlanglois 12efda8
Update environment-dev.yml to add missing library planetary-computer
sebastienlanglois d90cc27
update order of notebooks
sebastienlanglois 8043acb
Update .github/workflows/main.yml to add python 3.12
sebastienlanglois 0130c05
fix triggers
Zeitsperre 6bf6c62
harden runners
Zeitsperre File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Zeitsperre We can leave this here as an additional security, but this should not be required anymore (yay!)
xESMF
is badly installed or initiated,xscen
will simply deactivate the functions using it.xhydro/xdatasets
do not use it at all, for now.esmf/esmpy 8.6.0
has been released and should have fixed that bug too.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to, we can remove the
install-esmpy
step frominstall
. This just means that we don't install the GitHub repo version when we run$ make install
. I can see having that disabled as being beneficial for users in systems that don't havegrep
,awk
, andtr
installed (powershell
andcommand prompt
, probably)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's leave that for another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wanted to point out that
xdatasets
hasxesmf
as a dependency because ofxagg
. I had initially created a spinoffxagg
library with noxesmf
dependency (becausexesmf
is used for regridding but not for spatial averaging inxagg
, which is the only thing required forxdatasets
) but we now havexagg
as a dependency.xesmf
is required for the notebooks but might not be for the tests.