Skip to content
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

ENH: add zonal_stats #52

Merged
merged 88 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from 72 commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
2a2e504
example
masawdah Jul 20, 2023
e1e0501
assign the pixels ids based on their polygons then group them using t…
masawdah Jul 20, 2023
4a3d144
fix importing xagg and run an example
masawdah Jul 21, 2023
e3a2443
xagg using openEO data , it needs to implement parallel processing to…
masawdah Jul 21, 2023
d48a019
clean up
masawdah Sep 22, 2023
4ee3653
spatial_aggregation
masawdah Sep 25, 2023
5c008a5
clean up
masawdah Sep 25, 2023
9e5e462
rioxarray
masawdah Sep 25, 2023
35121fe
packages
masawdah Sep 25, 2023
15c04ca
deps
masawdah Sep 25, 2023
5c2a97e
deps
masawdah Sep 25, 2023
f732a4a
deps
masawdah Sep 25, 2023
6fab486
fix the notes
masawdah Sep 27, 2023
fb1e4a1
zonal stats in pytest
masawdah Sep 27, 2023
6f2dbab
handle long lines
masawdah Sep 27, 2023
ce18648
handle long lines
masawdah Sep 27, 2023
4197063
fix pre-commit
masawdah Sep 27, 2023
b291d9f
updated files
masawdah Sep 27, 2023
64a976f
support lat&lon names
masawdah Sep 28, 2023
ae9ece0
fix the dimension names on the fly
masawdah Sep 28, 2023
5b808e0
testpy
masawdah Sep 28, 2023
ce594ba
dask support just axis as integer
masawdah Sep 28, 2023
bc2abeb
Dimension Mapping
masawdah Sep 29, 2023
440b698
updated files
masawdah Sep 29, 2023
0a3d081
[pre-commit.ci] pre-commit autoupdate (#53)
pre-commit-ci[bot] Oct 3, 2023
718c414
MAINT: test on Python 3.12, update actions, use ruff format (#54)
martinfleis Oct 27, 2023
2ab71cf
Update xvec/accessor.py
masawdah Oct 28, 2023
7590f58
Update xvec/accessor.py
masawdah Oct 28, 2023
9ee0df3
Update xvec/accessor.py
masawdah Oct 28, 2023
5add89e
Update xvec/accessor.py
masawdah Oct 28, 2023
4230333
clean uo
masawdah Oct 28, 2023
f485243
clean accessor
masawdah Oct 28, 2023
cafa811
remove dask option
masawdah Oct 28, 2023
29d522e
clean
masawdah Oct 28, 2023
8bb8a1f
internal funcs
masawdah Oct 28, 2023
5d37d9d
pytest
masawdah Oct 28, 2023
81343dc
clean up
masawdah Oct 28, 2023
5f125a3
clean up
masawdah Oct 28, 2023
5122dbd
example
masawdah Jul 20, 2023
de711b5
assign the pixels ids based on their polygons then group them using t…
masawdah Jul 20, 2023
e214e96
fix importing xagg and run an example
masawdah Jul 21, 2023
3a0b15b
xagg using openEO data , it needs to implement parallel processing to…
masawdah Jul 21, 2023
2bc11b6
clean up
masawdah Sep 22, 2023
5edcc20
spatial_aggregation
masawdah Sep 25, 2023
cfcf9da
clean up
masawdah Sep 25, 2023
593607c
rioxarray
masawdah Sep 25, 2023
d6c4046
packages
masawdah Sep 25, 2023
100f92d
deps
masawdah Sep 25, 2023
7e2ee33
deps
masawdah Sep 25, 2023
4541184
deps
masawdah Sep 25, 2023
1f4bdb5
fix the notes
masawdah Sep 27, 2023
d566fca
zonal stats in pytest
masawdah Sep 27, 2023
b786ec8
handle long lines
masawdah Sep 27, 2023
f7703fe
handle long lines
masawdah Sep 27, 2023
8e6c2d5
fix pre-commit
masawdah Sep 27, 2023
84e327e
updated files
masawdah Sep 27, 2023
df466fa
support lat&lon names
masawdah Sep 28, 2023
53ef66a
fix the dimension names on the fly
masawdah Sep 28, 2023
2a33ce5
testpy
masawdah Sep 28, 2023
d1fb637
dask support just axis as integer
masawdah Sep 28, 2023
ed94bf9
Dimension Mapping
masawdah Sep 29, 2023
75f71df
updated files
masawdah Sep 29, 2023
6a531ac
clean uo
masawdah Oct 28, 2023
de4d36c
clean accessor
masawdah Oct 28, 2023
4c91689
remove dask option
masawdah Oct 28, 2023
a73220d
clean
masawdah Oct 28, 2023
040073d
internal funcs
masawdah Oct 28, 2023
848236d
pytest
masawdah Oct 28, 2023
1ec1110
clean up
masawdah Oct 28, 2023
d573e31
Update xvec/accessor.py
masawdah Oct 28, 2023
ba20f48
accessor
masawdah Oct 28, 2023
7b48a6c
Merge branch 'spatial_aggregation' of https://github.com/masawdah/xve…
masawdah Oct 28, 2023
7b5dd1f
dimension-agnostic
masawdah Nov 3, 2023
f63a662
clean up
masawdah Nov 3, 2023
5b4a89a
update pytest
masawdah Nov 3, 2023
20c88bd
refactor
martinfleis Dec 13, 2023
7060895
refactor structure
martinfleis Dec 13, 2023
bc42888
geodatasets
martinfleis Dec 13, 2023
c4e8946
pyogrio for IO
martinfleis Dec 13, 2023
2a3bbd1
api
martinfleis Dec 13, 2023
2e40779
include vectorized rasterize-based method
martinfleis Dec 13, 2023
707f7e9
rasterio link
martinfleis Dec 13, 2023
aa7cb1a
fix docstring
martinfleis Dec 13, 2023
cd00342
fmt
martinfleis Dec 13, 2023
cc51123
fix for DataArray
martinfleis Dec 13, 2023
ff94fd4
testing
martinfleis Dec 14, 2023
4a3d77d
stat -> stats
martinfleis Dec 14, 2023
c230edb
fix keyword
martinfleis Dec 14, 2023
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
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@master
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.x"

Expand All @@ -24,7 +24,7 @@ jobs:
python -m build

- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@v1
with:
user: __token__
password: ${{ secrets.pypi_password }}
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ jobs:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
environment-file: [ci/latest.yaml]
environment-file: [ci/312.yaml]
include:
- environment-file: ci/39.yaml
os: ubuntu-latest
- environment-file: ci/310.yaml
os: ubuntu-latest
- environment-file: ci/311.yaml
os: ubuntu-latest
- environment-file: ci/dev.yaml
os: ubuntu-latest
defaults:
Expand All @@ -31,14 +33,13 @@ jobs:

steps:
- name: checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: setup micromamba
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ${{ matrix.environment-file }}
micromamba-version: "latest"
channel-priority: "flexible"

- name: Install xvec
run: pip install .
Expand Down
8 changes: 2 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
files: 'xvec\/'
repos:
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
language_version: python3
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.0.280"
rev: v0.1.2
hooks:
- id: ruff
- id: ruff-format

ci:
autofix_prs: false
Expand Down
6 changes: 5 additions & 1 deletion ci/310.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ channels:
dependencies:
- python=3.10
# required
- shapely=2
- shapely >=2
- xarray
- rioxarray
- joblib
- rasterio
- tqdm
- pyproj
# testing
- pytest
Expand Down
8 changes: 6 additions & 2 deletions ci/latest.yaml → ci/311.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ name: xvec
channels:
- conda-forge
dependencies:
- python
- python=3.11
# required
- shapely=2
- shapely >=2
- xarray
- rioxarray
- joblib
- rasterio
- tqdm
- pyproj
# testing
- pytest
Expand Down
19 changes: 19 additions & 0 deletions ci/312.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: xvec
channels:
- conda-forge
dependencies:
- python=3.12
# required
- shapely >=2
- xarray
- rioxarray
- joblib
- rasterio
- tqdm
- pyproj
# testing
- pytest
- pytest-cov
- pytest-xdist
- pytest-reportlog
- geopandas-base
6 changes: 5 additions & 1 deletion ci/39.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ channels:
dependencies:
- python=3.9
# required
- shapely=2
- shapely >=2
- xarray
- rioxarray
- joblib
- rasterio
- tqdm
- pyproj
# testing
- pytest
Expand Down
4 changes: 4 additions & 0 deletions ci/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ dependencies:
- cython
- geos
- proj
- rioxarray
- joblib
- rasterio
- tqdm
# testing
- pytest
- pytest-cov
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ line-length = 88
select = ["E", "F", "W", "I", "UP", "B", "A", "C4", "Q"]
exclude = ["doc"]
target-version = "py39"
ignore = ['E501', 'Q000', 'Q001', 'Q002', 'Q003', 'W191']
Loading