Skip to content

Point failed uploads to validation report - #1896

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

Point failed uploads to validation report#1896
AtomicGlance wants to merge 1 commit 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
Comment on lines +481 to +488
if validation_log_path is None:
lgr.warning("One or more assets failed validation.")
else:
lgr.warning(
"One or more assets failed validation. Use"
" `dandi validate --load %s` to review the saved results.",
validation_log_path,
)

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.

Suggested change
if validation_log_path is None:
lgr.warning("One or more assets failed validation.")
else:
lgr.warning(
"One or more assets failed validation. Use"
" `dandi validate --load %s` to review the saved results.",
validation_log_path,
)
msg = "One or more assets failed validation."
if validation_log_path:
msg += f" Use `dandi validate --load "{validation_log_path}"`" \
" to review the saved results.",
lgr.warning(msg)

to avoid duplication

@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 56.52174% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.09%. Comparing base (38bc2ee) to head (aa64a2e).
⚠️ Report is 5 commits behind head on master.

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

❗ There is a different number of reports uploaded between BASE (38bc2ee) and HEAD (aa64a2e). Click for more details.

HEAD has 182 uploads less than BASE
Flag BASE (38bc2ee) HEAD (aa64a2e)
unittests 197 15
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #1896       +/-   ##
===========================================
- Coverage   76.96%   53.09%   -23.87%     
===========================================
  Files          88       89        +1     
  Lines       12882    12901       +19     
===========================================
- Hits         9914     6850     -3064     
- Misses       2968     6051     +3083     
Flag Coverage Δ
unittests 53.09% <56.52%> (-23.87%) ⬇️

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.

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