Skip to content

Refactoring of codebase into dandi/validate/ subpackage for larger #1822#1830

Merged
yarikoptic merged 5 commits intomasterfrom
enh-validators-base
Apr 2, 2026
Merged

Refactoring of codebase into dandi/validate/ subpackage for larger #1822#1830
yarikoptic merged 5 commits intomasterfrom
enh-validators-base

Conversation

@yarikoptic
Copy link
Copy Markdown
Member

by unpopular demand of @CodyCBakerPhD in

to simplify review of that beast which I now will force push - it was rebased on top of this, so we could concentrate on functional changes.

Marking as 'minor' since chance structure and thus API. Besides that, there should be no functional changes and should be mergeable as long as CI is green

yarikoptic and others added 4 commits April 2, 2026 16:21
…e/ subpackage

Pure file move with no content changes, plus __init__.py re-exports for
backward compatibility. Imports will be updated in the next commit.

Co-Authored-By: Claude Code 2.1.63 / Claude Opus 4.6 <noreply@anthropic.com>
Update imports across 13 files to use the new subpackage structure:
- dandi.validate_types → dandi.validate.types
- dandi.validate → dandi.validate.core (for explicit imports)
- Relative imports adjusted accordingly

Co-Authored-By: Claude Code 2.1.63 / Claude Opus 4.6 <noreply@anthropic.com>
- test_validate.py → dandi/validate/tests/test_core.py
- test_validate_types.py → dandi/validate/tests/test_types.py
- Update relative imports in moved test files
- Fix circular import: don't eagerly import core in __init__.py

Co-Authored-By: Claude Code 2.1.63 / Claude Opus 4.6 <noreply@anthropic.com>
…ate CLI

Decompose the monolithic validate() click command into helpers:
- _collect_results(): runs validation and collects results
- _filter_results(): applies min-severity and ignore filters
- _process_issues(): simplified, no longer handles ignore (moved to _filter)

No behavior changes; all existing tests pass unchanged.

Co-Authored-By: Claude Code 2.1.63 / Claude Opus 4.6 <noreply@anthropic.com>
@yarikoptic yarikoptic added the minor Increment the minor version when merged label Apr 2, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

❌ Patch coverage is 62.96296% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.09%. Comparing base (9b5b3f6) to head (015407c).
⚠️ Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
dandi/files/zarr.py 0.00% 2 Missing ⚠️
dandi/validate/__init__.py 0.00% 2 Missing ⚠️
dandi/bids_validator_deno/_validator.py 0.00% 1 Missing ⚠️
dandi/files/bases.py 0.00% 1 Missing ⚠️
dandi/files/bids.py 50.00% 1 Missing ⚠️
dandi/organize.py 0.00% 1 Missing ⚠️
dandi/pynwb_utils.py 0.00% 1 Missing ⚠️
dandi/upload.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1830      +/-   ##
==========================================
- Coverage   75.12%   75.09%   -0.04%     
==========================================
  Files          84       85       +1     
  Lines       11931    11932       +1     
==========================================
- Hits         8963     8960       -3     
- Misses       2968     2972       +4     
Flag Coverage Δ
unittests 75.09% <62.96%> (-0.04%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 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.

@yarikoptic yarikoptic requested a review from CodyCBakerPhD April 2, 2026 21:02
@CodyCBakerPhD
Copy link
Copy Markdown
Contributor

Ahh so easy to review this one!

Thank you :)

@yarikoptic yarikoptic merged commit f14c1ee into master Apr 2, 2026
61 of 64 checks passed
@yarikoptic yarikoptic deleted the enh-validators-base branch April 2, 2026 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor Increment the minor version when merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants