# 職務経歴書: 非IT経歴・休暇・資本金単位 + GitHubコントリビューション可視化#280
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
職務経歴書(Resume)を IT エンジニア以外の経歴にも対応させた。在籍企業を「非IT企業」としてマークすると取引先/プロジェクトの代わりに自由記述の「詳細」を入力でき、在籍中の「休暇」(育児/介護/留学等)を取引先と並べて期間・詳細付きで記述できる。あわせて資本金の単位を企業ごとに選択可能にした(従来は「千万円」固定)。
同コミットには GitHub 連携ダッシュボードのコントリビューション可視化(緑の四角ヒートマップ)と連携UI刷新も含まれる(詳細は
report/pr_github_contributions.md)。背景・目的
従来の職務経歴書は「IT企業の取引先 → プロジェクト」という構造に固定されており、次のケースを表現できなかった:
変更内容
Backend
models/resume.py)ResumeExperienceにcapital_unit(既定「千万円」)/is_it_company(既定 True)/description(非IT時の詳細)を追加ResumeClientにis_vacation/vacation_start_date/vacation_end_date/vacation_is_current/vacation_descriptionを追加。vacation_start_date/vacation_end_dateはformat_year_monthを通す read プロパティでYYYY-MM文字列化(NULL は"")alembic_migrations/versions/)0039_add_capital_unit:capital_unitを追加(既存行の後方互換としてserver_default="千万円")0040_add_resume_non_it_and_vacation: 非IT フラグ/詳細・休暇カラム群を追加(is_it_companyは既存行を IT 企業前提としてserver_default=1、is_vacationは0)op.add_column、downgrade の列削除は ALTER/DROP 非対応のためbatch_alter_table(テーブル再作成)schemas/resume.py)Experienceにcapital_unit: Literal["万円","百万円","千万円","億円"]/is_it_company/descriptionを追加Clientに休暇フィールド群を追加し、validate_vacation_dates(mode="after")で休暇時のみ開始年月必須・継続中なら end を""に正規化・end >= startを検証(Experience.validate_datesと同契約)repositories/resume.py): 新フィールドを payload から読み出して行を構築。休暇期間はparse_year_monthで日付化markdown/generators/resume_generator.py): 資本金は{cap}{capital_unit}を出力。非IT企業は取引先ループをスキップし「詳細」を出力。休暇エントリは「#### 休暇」+ 期間 + 詳細pdf/generators/resume_generator.py+templates/resume.css):_build_vacation_htmlを追加。非IT企業は.company-detailに詳細を表示、休暇は.vacationブロックで表示。資本金単位を反映Frontend
types.ts,formTypes.ts,constants.ts)CapitalUnit型(backendLiteralと手動同期)、CAPITAL_UNITS/DEFAULT_CAPITAL_UNITを追加CareerExperience/CareerClientに新フィールドを追加。blank テンプレートにも初期値を反映forms/CareerFormEditors/CareerExperienceEditor.tsx)CAPITAL_UNITS)を追加formMappers.ts: API レスポンスの新フィールドを?? デフォルトで吸収(後方互換)payloadBuilders.ts: 非IT企業はdescriptionのみ送信し clients を空に、休暇 client はvacation_*のみ送信。事前バリデーション(詳細必須・休暇期間必須・期間整合)を追加constants/messages.ts):EXPERIENCE_DESCRIPTION_REQUIRED/VACATION_START_DATE_REQUIRED/VACATION_END_DATE_REQUIREDをVALIDATION_MESSAGESに追加動作確認
make test-backend/make lint-backendtest_schemas.py(capital_unit / is_it_company / 休暇バリデーション)、test_markdown_generator.py・test_pdf_generator.py(非IT詳細・休暇・資本金単位の出力)、test_endpoints.py、test_contributions.py、test_worker/test_github_link.pymake lint-frontend/make lint-frontend-messages、unit tests(payloadBuilders.test.tsに非IT/休暇の送信・バリデーション、useCareerExperienceMutators.test.ts、ContributionHeatmap.test.tsx、GitHubLinkDashboard.test.tsx)npm run test:e2e(github-link.spec.ts/navigation.spec.ts更新)影響範囲・補足
make migrate)。既存行はserver_defaultで後方互換(全社 IT企業・資本金単位「千万円」・休暇なし扱い)schemas/resume.py↔ frontendtypes.tsの手動同期運用(codegen 未導入)。CapitalUnitの Literal を増減する場合は両方を更新するdescriptionのみ)になる