Skip to content

Point failed uploads to validation report - #1896

Open
AtomicGlance wants to merge 7 commits into
dandi:masterfrom
AtomicGlance:agent/point-upload-validation-report
Open

Point failed uploads to validation report#1896
AtomicGlance wants to merge 7 commits into
dandi:masterfrom
AtomicGlance:agent/point-upload-validation-report

Conversation

@AtomicGlance

Copy link
Copy Markdown

Summary

  • point failed uploads to the saved validation report with a ready-to-run dandi validate --load command
  • handle validation failures as normal CLI errors, including when development options are enabled
  • cover the report guidance and no-traceback behavior with regression tests

Closes #1859.

Testing

  • python -m pytest dandi/cli/tests/test_cmd_upload.py -q
  • Black, isort, flake8, and codespell on the changed files
  • python -m mypy dandi (93 source files)
  • full CLI suite: 118 passed, 8 skipped, 1 xpassed; 7 environment-dependent failures on Windows from a missing Deno executable and unavailable symlink privileges

@AtomicGlance
AtomicGlance marked this pull request as ready for review August 5, 2026 09:56

@yarikoptic yarikoptic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

overall looks good. minor nit due to my duplication allergies.

Comment thread dandi/upload.py Outdated
@yarikoptic yarikoptic added UX patch Increment the patch version when merged labels Aug 6, 2026
@codecov

codecov Bot commented Aug 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 52.00000% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.55%. Comparing base (4224843) to head (3d5895c).
⚠️ Report is 13 commits behind head on master.

Files with missing lines Patch % Lines
dandi/upload.py 0.00% 6 Missing ⚠️
dandi/tests/test_upload.py 25.00% 3 Missing ⚠️
dandi/exceptions.py 0.00% 2 Missing ⚠️
dandi/tests/fixtures.py 0.00% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (4224843) and HEAD (3d5895c). Click for more details.

HEAD has 9 uploads less than BASE
Flag BASE (4224843) HEAD (3d5895c)
unittests 25 16
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #1896       +/-   ##
===========================================
- Coverage   77.04%   53.55%   -23.49%     
===========================================
  Files          88       89        +1     
  Lines       12989    13085       +96     
===========================================
- Hits        10007     7008     -2999     
- Misses       2982     6077     +3095     
Flag Coverage Δ
unittests 53.55% <52.00%> (-23.49%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AtomicGlance
AtomicGlance requested a review from yarikoptic August 7, 2026 09:19
@AtomicGlance

Copy link
Copy Markdown
Author

I merged the current master into this branch and pushed the update. The validation warning now builds one message and points to the saved report with dandi validate --load.\n\nThe focused CLI regression test passes (1 passed). The upload integration test is skipped on this Windows runner because Docker is not installed. Please take another look when you have a chance.

@yarikoptic

Copy link
Copy Markdown
Member

@AtomicGlance are those \n\n side effects of some suboptimal agent channeling of messages into github? ;) asking since "mine" do not do that, but I also try to explicitly acknowledge use of agents.

@yarikoptic

Copy link
Copy Markdown
Member

seems failing tests relate to these changes.. review/address

dandi/tests/test_upload.py:225: in test_upload_bids_invalid
    assert (
E   assert 'Use `dandi validate --load /tmp/pytest-of-runner/pytest-0/test_upload_bids_invalid0/upload_validation.jsonl` to review the saved results.' in ...

@AtomicGlance

Copy link
Copy Markdown
Author

Yes, I used Codex to help with this. The literal \n\n came from how I passed the comment body through the CLI, and I should have checked the rendered result :)))

I traced the Ubuntu failure to the test helper forcing devel_debug=True, which raises before the user-facing summary warning is logged. I pushed a fix so this test exercises the normal upload path instead. CI is rerunning now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch Increment the patch version when merged UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

upload should point to the validation log file

2 participants