Remove canvas_like and datashader references from source code
まだ誰も着手していません。
評価
調査の方向性
Start in xrspatial/utils.py by locating canvas_like() and its datashader import, then inspect the docstring example in xrspatial/zonal.py and the comment at xrspatial/terrain.py:698. Remove the stale references and unused imports, then run pytest xrspatial/tests/; done means the tests pass and no test or module imports canvas_like.
索引モデルが issue の本文から書いたものです。
説明
Reason or Problem
xrspatial/utils.py defines canvas_like(), which wraps datashader.Canvas.raster() to resample a raster. It is the only place in the library source that imports datashader, it is not exported from __init__.py, and a repo-wide search finds no callers. A couple of docstrings and a comment also mention datashader.
Proposal
- Delete
canvas_like()fromxrspatial/utils.py, including its lazyimport datashader as dsand the try/except that raises ImportError. Remove any imports the deletion leaves unused. - Rewrite the
suggest_zonal_canvas()docstring example inxrspatial/zonal.pyto usearr.xrs.rasterize(...)instead ofds.Canvas().polygons(...). The function body has no datashader dependency, so this is a docstring-only change. - Reword the comment at
xrspatial/terrain.py:698so it describes the pixel-center coordinate convention without naming datashader.
Value
Removes the library's only datashader import and trims stale references, a prerequisite for dropping datashader from packaging.
Done when
pytest xrspatial/tests/passes.- No test or module imports
canvas_like.
Part of removing datashader as a dependency; final packaging removal is tracked in #3450.
- 主要言語
- Python
- スター
- 972
- フォーク
- 92
- 平均マージ
- 2日 12時間
- マージ済み PR(30日)
- 7
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
xarray-contrib/xarray-spatial のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
xarray-contrib/xarray-spatial#3726 ·
-
api area:surface bug severity:medium sweep-api-consistency
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
xarray-contrib/xarray-spatial#3712 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
xarray-contrib/xarray-spatial#3710 ·
-
bug
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
xarray-contrib/xarray-spatial#3707 ·
-
area:surface documentation user-guide-example
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
xarray-contrib/xarray-spatial#3464 ·
xarray-contrib/xarray-spatial の issue をすべて見る
似ている issue
-
documentation help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
simonw/sqlite-utils#872 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100