Match or create providers for raw records

オープン
#1,913 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
backend, databases

調査の方向性

Start by reading the extractor code that creates agencytxt and feedinfo records, the shared services under api/src/shared, and the tasks_executor task patterns. Trace how records, providers, aliases, and contacts are stored, then identify existing URL normalization and locking support. Done means new and backfilled records are linked idempotently, matching follows the stated name and normalized URL rules, and concurrent runs do not create duplicate providers.

索引モデルが issue の本文から書いたものです。

説明

Describe the problem

Every raw agency.txt and feed_info.txt record needs a provider, and there is no capacity to review each one by hand.

Proposed solution
  • Shared link service in api/src/shared: links a record to a provider and adds the record's name as an alias and its URL, email and phone as contacts when missing (URLs compared after normalization). Nothing is removed or overwritten.
  • When the extractor creates a new agencytxt or feedinfo record:
    • if a linked record of the same type has the same name (trimmed) and the same normalized URL, link to its provider;
    • otherwise create a provider (name from the record, status published) and link it.
  • A record without a URL never matches and gets its own provider.
  • Serialize match-or-create per name and normalized URL (advisory lock) so concurrent tasks don't create duplicate providers.
  • tasks_executor task to run match-or-create on all unlinked records (backfill after #1909).

Acceptance criteria:

  • Every new record is linked to a provider.
  • http/https, www. and trailing / differences still match; name differences do not.
  • Reruns and concurrent runs create no duplicate providers.
  • No fuzzy matching or confidence score.
Alternatives you've considered
  • Leaving unmatched records unlinked for manual review: rejected, not enough people to process the queue.
  • Matching on name or URL alone: rejected, a shared parent website or a generic name would wrongly merge separate agencies.
Additional context
主要言語
Python
スター
34
フォーク
7
平均マージ
2日 22時間
マージ済み PR(30日)
21

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

MobilityData/mobility-feed-api のほかの issue

MobilityData/mobility-feed-api の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。