[Refactor]: Consolidate ingestion routes under `features/ingestion/api/`

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

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
api, backend

調査の方向性

Start with backend/app/features/ingestion/api.py and the five routers in backend/app/api/ (ingestion_summary.py, job_health.py, rejected_executions.py, source_directories.py, metadata_backfill.py), then main.py for router registration. The first step is a maintainer decision on the route-placement convention, so confirm it before moving files. Done means no /ingestions/* router remains under backend/app/api/, /openapi.json is unchanged, and make backend-test passes. The issue is blocked by #306.

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

説明

refactor
Is your feature request related to a problem?

Ingestion routes are split across two locations:

  • backend/app/features/ingestion/api.py: /ingestions (from-path, from-upload, from-hpc-upload, archive-checkpoints, discovery-results, state).
  • backend/app/api/: five more routers with /ingestions prefixes and the Ingestions tag:
    • ingestion_summary.py
    • job_health.py (/ingestions/jobs)
    • rejected_executions.py
    • source_directories.py
    • metadata_backfill.py (/ingestions/metadata-backfill)

The modules in app/api/ import private helpers from features/ingestion/api.py, so the split already crosses module boundaries.

The convention is also contradictory. AGENTS.md says "New endpoints go in backend/app/api/" and "API routes in backend/app/api/", but every feature (catalog, ingestion, machine, user, and others) owns its routes in features/*/api.py.

Blocked by #306, which adds public features/ingestion/access.py helpers.

Describe the solution you'd like
  1. Decide on the convention and update AGENTS.md. Recommended: feature routes live in features/<feature>/api/, and app/api/ keeps only cross-cutting routes (health.py, meta.py, version.py).
  2. Move the five ingestion routers into features/ingestion/api/ (for example, summary.py, job_health.py, rejected_executions.py, source_directories.py, metadata_backfill.py) and update main.py registration.
  3. Move the related tests to match.
Acceptance criteria
  • AGENTS.md states one route-placement convention, and it matches the code.
  • No /ingestions/* router is defined under backend/app/api/.
  • /openapi.json is identical before and after: same paths, methods, tags, and schemas.
  • make backend-test and make pre-commit-run pass.
Describe alternatives you've considered
  • Keep routes in app/api/ and move feature routes there. This conflicts with the feature-based architecture and would touch every feature.
  • Leave the routes as is and only fix AGENTS.md. This documents the inconsistency instead of fixing it.
主要言語
Python
スター
2
フォーク
2
平均マージ
12時間 49分
マージ済み PR(30日)
30

環境構築

はじめの一歩

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

E3SM-Project/simboard のほかの issue

E3SM-Project/simboard の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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