_map_title crashes for orthographic maps with UnboundLocalError: xpt
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 52/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- python
調査の方向性
まず _map_title の場所を特定し、指定されたデフォルト設定で、空でないタイトルを持つ最小限の ortho contour plot を再現します。各投影で xpt と ypt がどのように割り当てられるかを追跡し、そのうえで、orthographic plot がタイトル付きでレンダリングされ、UnboundLocalError が発生しないことを確認します。
索引モデルが issue の本文から書いたものです。
説明
This actually occurs for other plot types as well.
Version: cfplot 3.4.0; python 3.12
Observed behavior:
- Orthographic contour plot crashes when cf-plot tries to render the map title
- If the title is removed, the plot renders successfully
Expected behavior:
- Orthographic contour plots should render with a title
- At minimum, _map_title should not crash if a projection-specific title anchor has not been computed
Minimal failing scenario:
- Projection: ortho
- Default GUI-style settings:
- [lat_0 = 0.0]
- [lon_0 = 0.0
- Render a contour plot with a non-empty title
Probable root cause:
_map_title() appears to compute xpt, ypt only for some projections, then unconditionally uses them in the non-dims branch.
From the installed 3.4.0 source, the title-anchor coordinates are assigned for cases such as:
- npstere
- spstere
- lcc
but later the code does:
else:
halign = "center"
plotvars.mymap.text(
xpt,
ypt,
title,
...
)
For ortho, xpt/ypt do not appear to be initialized before this branch is reached.
- 主要言語
- Python
- スター
- 21
- フォーク
- 11
- 平均マージ
- 3時間 36分
- マージ済み PR(30日)
- 2
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NCAS-CMS/cf-plot のほかの issue
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 22/100
-
testing
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
-
Add `AGENTS.md` fileオープンdocs enhancement
難易度 3/5 1〜2日 初心者へのやさしさ 64/100
-
Add animation hooks into cf-plot再び着手できるかも @bnlawrence が 108 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンenhancement
-
Ugly nemo plotting issue対応中かも @bnlawrence が 7 日前に担当しました。 オープンbug v35plus
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
NCAS-CMS/cf-plot の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ok-oldking/ok-wuthering-waves#1785 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
healthchecks/healthchecks#1349 ·
-
deployment release-lag
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
nolte/kamerplanter#2374 ·
メンテナーはふだん 1 日以内に返信
-
bug v1 v2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
modelcontextprotocol/python-sdk#3725 ·
メンテナーはふだん 1 日以内に返信
-
batchterms() drops queries without a similar() clause, misaligning results with inputs対応中かも @MohammadHijjawi97 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信