Skip to content

feat: add NDPCProvider and register in dps contest group (#3483)#3513

Merged
KATO-Hiro merged 6 commits into
stagingfrom
#3483
May 10, 2026
Merged

feat: add NDPCProvider and register in dps contest group (#3483)#3513
KATO-Hiro merged 6 commits into
stagingfrom
#3483

Conversation

@KATO-Hiro

@KATO-Hiro KATO-Hiro commented May 10, 2026

Copy link
Copy Markdown
Collaborator

close #3483

Summary by CodeRabbit

リリースノート

  • 新機能

    • NDPC(Next DP Contest)コンテストをサポートしました。
    • 20 個の問題(A~T)を追加しました。
    • タスク一覧で NDPC コンテストの検索・フィルタリングが可能になりました。
  • ドキュメント

    • NDPC 実装に関するガイドと手順書を追加しました。

本PRのスコープ外だが対応が必要だったタスク

  • atcoder_account の migration で DSL と SQL の内容の不一致により、後続のマイグレーションができない状態を解消
    • 対処方法: DSL の内容に SQL を合わせる(updatedAt の default を削除)

KATO-Hiro and others added 6 commits May 10, 2026 05:50
Add Next DP Contest (NDPC) support:
- NDPC enum value to Prisma schema
- NDPC constant to ContestType object
- classifyContest recognizes contest_id 'ndpc'
- contestTypePriorities assigns priority 6 (after TDPC)
- getContestNameLabel returns 'NDPC'
- Test cases for all three functions

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Register NDPC in DP contests group:
- NDPCProvider implemented to filter NDPC tasks
- dps preset now includes NDPC alongside EDPC, TDPC, and FPS 24
- Update button label and aria-label to reflect 4 DP contests
- Update affected test cases for priority ordering

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Revert to Educational/Genius/Special/External classification.
Update priority ranges after NDPC insertion at priority 6:
- Educational contests (0-11, 17)
- Contests for genius (12-16)
- Special contests (18-20)
- External platforms (21-23)

Also fix single-char lambda parameter in docs code example.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Add /add-contest-table-provider skill with TDD-based implementation guide
- Add comprehensive checklist for 5-layer implementation (Prisma → types → utils → providers → groups)
- Document 3 implementation patterns (range filter, single source, composite)
- Update how-to-add-contest-table-provider with common mistake #5 (contestTypePriorities JSDoc categories)
- Update claude-code.md with new skill reference

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…default

- Add NDPC (National Informatics Olympiad - Domestic Programming Contest) to ContestType
- Fix atcoder_account.updatedAt to drop incorrect DEFAULT CURRENT_TIMESTAMP (managed by Prisma @updatedat)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Plan implementation is complete. Archive plan per AGENTS.md guidelines.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented May 10, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Next DP Contest (NDPC) という新しいコンテストタイプをシステムに追加するPR。Prismaスキーマの拡張、NDPCProvider実装、コンテスト分類・優先度ロジックの更新、20問分のタスク登録、および包括的なテスト拡張で構成。

Changes

Next DP Contest (NDPC) サポートの統合実装

Layer / File(s) Summary
Prismaスキーマ・マイグレーション
prisma/schema.prisma, prisma/migrations/...
ContestType enum に NDPC を追加。atcoder_account.updatedAt のデフォルト値を削除。
データ層(タスク登録)
prisma/tasks.ts
NDPC向け 20 問(A~T)のタスクレコードを追加(ndpc2026_andpc2026_t)。
型定義・定数層
src/lib/types/contest.ts, src/lib/utils/contest.ts
ContestType.NDPC を定数に追加。classifyContest()ndpc 識別コードを追加。getContestNameLabel()NDPC ラベル追加。
優先度・ロジック更新
src/lib/utils/contest.ts
contestTypePrioritiesNDPC (優先度 6) を挿入、後続エントリを再番号付け。
プロバイダー実装
src/features/tasks/utils/contest-table/dp_providers.ts
新クラス NDPCProvider を実装。DP系プロバイダーグループに統合。
プロバイダーグループ更新
src/features/tasks/utils/contest-table/contest_table_provider_groups.ts, contest_table_provider_groups.test.ts
DPS ("EDPC・TDPC・FPS 24") プリセットに NDPCProvider を追加し、グループサイズを 4 に更新。
テストケース拡張
src/test/lib/utils/test_cases/contest_type.ts, contest_name_labels.ts, task_results.ts
NDPC用テストケース配列を追加(ndpc, ndpc2026_a など)。
包括的なテスト更新
src/test/lib/utils/contest.test.ts, task.test.ts, dp_providers.test.ts
各テストに NDPC ケースを統合。タスク順序テストに ndpc2026_a を挿入。
ドキュメント・スキル定義
.claude/skills/add-contest-table-provider/, docs/guides/...
プロバイダー追加スキル・ガイド追加。既存ガイド(how-to-add-contest-table-provider.md)に NDPC 実装例を追記。

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~35 minutes

Poem

次のDP、新しい舞台へ✨
スキーマに NDPC が加わり、
プロバイダーは型にそっと収まり、
二十問が整列した。
構造は完璧、テストも万全。🚀

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Out of Scope Changes check ❓ Inconclusive ドキュメント、スキル定義、テストケース追加は全てNDPC機能関連で正当。ただしatcoder_accountのmigrationは#3483の要件外の可能性がある。 atcoder_account.updatedAtのデフォルト値削除が#3483に関連するか確認し、関連がなければ別PRに分離することを検討してください。
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed PRタイトルは「NDPCProviderを追加し、dpsコンテストグループに登録する」という変更の中心を正確に反映している。簡潔で具体的で、スキャン時に主要な変更が明確に理解できる。
Linked Issues check ✅ Passed PR#3483の「Next DP Contestテーブル追加」要件に対し、ContestType追加、Prismaスキーマ更新、NDPCProvider実装、dpsグループ登録、テストカバレッジなど、必要なコード変更がすべて実装されている。
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch #3483

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@KATO-Hiro KATO-Hiro left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@KATO-Hiro KATO-Hiro merged commit 4ee8210 into staging May 10, 2026
3 checks passed
@KATO-Hiro KATO-Hiro deleted the #3483 branch May 10, 2026 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] テーブル「Next DP Contest」を追加しましょう

1 participant