Commit 7ac01eb
Accept run_id in upload_to_staging_hf, unblock build-and-test (#794)
* Accept run_id in upload_to_staging_hf, scope staging prefix by run
Main's build-and-test has been failing on every real-content push with
`TypeError: upload_to_staging_hf() got an unexpected keyword argument
'run_id'`. The four callers (`storage/upload_completed_datasets.py`,
`calibration/promote_local_h5s.py`, `modal_app/local_area.py`,
`modal_app/pipeline.py`) all pass `run_id=`, but the function's
signature was never updated. Existing tests mocked the function with
`**kwargs`, which hid the divergence.
Add `run_id: str = ""` to the signature and, when set, stage files under
`staging/{run_id}/{rel_path}` — same convention the surrounding helpers
(`_download_staged_dataset_artifacts`, `_promote_staging_to_hf`) already
use. Fall back to bare `staging/{rel_path}` when `run_id` is empty so
behavior is unchanged for the no-run_id call path.
New unit tests in `tests/unit/utils/test_data_upload.py` exercise the
real function (not a mock) with and without `run_id` and assert on the
resulting `path_in_repo` values, so the next caller drift will surface
in unit CI rather than on a 3-hour integration run.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Rename changelog fragment to PR number
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 64873b1 commit 7ac01eb
3 files changed
Lines changed: 81 additions & 1 deletion
File tree
- changelog.d
- policyengine_us_data/utils
- tests/unit/utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
751 | 751 | | |
752 | 752 | | |
753 | 753 | | |
| 754 | + | |
754 | 755 | | |
755 | 756 | | |
756 | 757 | | |
| |||
762 | 763 | | |
763 | 764 | | |
764 | 765 | | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
765 | 769 | | |
766 | 770 | | |
767 | 771 | | |
768 | 772 | | |
769 | 773 | | |
770 | 774 | | |
| 775 | + | |
771 | 776 | | |
772 | 777 | | |
773 | 778 | | |
| |||
780 | 785 | | |
781 | 786 | | |
782 | 787 | | |
783 | | - | |
| 788 | + | |
784 | 789 | | |
785 | 790 | | |
786 | 791 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
0 commit comments