Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR migrates the Address Base Registry (ABR) data source from the CKAN API (catalog.registries.digital.go.jp) to the ArcGIS Hub OGC API (dataset.address-br.digital.go.jp).
Key changes:
- Replaced CKAN API client with Hub API client implementation
- Updated import paths from
ckan_datatoabr_datadirectories - Added prefecture name-to-code mapping utilities
Reviewed Changes
Copilot reviewed 11 out of 18 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/lib/hub.ts | New Hub API client with search and data retrieval functions |
| src/lib/hub.test.ts | Unit tests for the new Hub API functionality |
| src/lib/prefecture_name_codes.ts | Prefecture name to code mapping constants |
| src/lib/abr_data/index.test.ts | Updated test description from ckan_data to abr_data |
| src/processes/*.ts | Updated imports and API calls to use Hub instead of CKAN |
| package.json | Added @types/geojson dependency for TypeScript support |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
@bougan1160 コメントありがとうございます。
以下のコミットで hub.test.ts として追加しましたので、確認をお願いします。
(なお、undiciのfetchのモックが、 fetch_with_retry.test.ts の方は動作したものの、こちらの方では動作しなかったため、一旦コメントアウト+TODOで残したままとしています。)
cfda442
There was a problem hiding this comment.
undiciのfetchのモックですが、 mockAgent.disableNetConnect() だと、ネットワーク切断状態として動作するようでしたので、もう少し確認してみます。また、jestのsetup/teardown相当のnodeのbeforeEach/afterEachでキャッシュを削除する処理も追加する方向で少し検討してみます。
https://betterstack.com/community/guides/testing/nodejs-test-runner/#step-7-using-test-hooks-for-setup-and-teardown-tasks
There was a problem hiding this comment.
@bougan1160 追加の以下のコミットで、TODOとしていたundiciのfetchモック箇所も修正し、 mockAgent.disableNetConnect() でのネットワーク切断状態のテストも追加しましたので、お手数ですが再度確認をお願いします。
d4c279b
There was a problem hiding this comment.
@bougan1160 コメントありがとうございます。
以下のコミットで fetch_with_retry.test.ts として追加しましたので、確認をお願いします。
cfda442
|
こちら合間が空いてしまいましたが、政令指定都市の地番が変換できていない問題を確認し、以下のコミットで対応しましたので、念のため報告します。 |
|
こちらですが、カタログサイト変更(2025/09/16)前後で住居表示のデータが欠けていることを確認したため、一旦デジタル庁様に問い合わせ中となります。(以下の引用は問い合わせ内容(一部抜粋))
|
概要
ABRデータのダウンロード先をCKAN API (https://catalog.registries.digital.go.jp/) から ArcGIS Hub (https://dataset.address-br.digital.go.jp/) のOGC APIに変更
対応内容
src/lib/ckan.tsを削除し、src/lib/hub.tsを追加getHubItemsByQueryメソッドは、queryだけでなく、categoryLevel,categoryPref,sortByオプション引数を追加町字マスター位置参照拡張/住居表示-住居マスター(位置参照拡張))が存在しなかったため、該当箇所は都道府県毎にループして処理するよう修正DATA.md)を更新確認事項
time npm run run:all実行による、全国データの変換mainブランチと同様、M1 MacBook Pro環境で約2時間程度Closes #17