Match or create providers for raw records

Đang mở
#1,913 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
backend, databases

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
Python
Star
34
Fork
7
Merge trung bình
2 ngày 22 giờ
Pull request đã merge (30 ngày)
21

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của MobilityData/mobility-feed-api

Tất cả issue của MobilityData/mobility-feed-api

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.