Skip to content

Commit 0b1d1ca

Browse files
yarikopticclaude
andcommitted
refactor: update all import paths for dandi/validate/ subpackage
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>
1 parent 1e46e6b commit 0b1d1ca

13 files changed

Lines changed: 20 additions & 20 deletions

File tree

dandi/bids_validator_deno/_validator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from pydantic import DirectoryPath, validate_call
1414

1515
from dandi.utils import find_parent_directory_containing
16-
from dandi.validate_types import (
16+
from dandi.validate.types import (
1717
Origin,
1818
OriginType,
1919
Scope,

dandi/cli/cmd_validate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
from .base import devel_debug_option, devel_option, map_to_click_exceptions
1313
from ..utils import pluralize
14-
from ..validate import validate as validate_
15-
from ..validate_types import Severity, ValidationResult
14+
from ..validate.core import validate as validate_
15+
from ..validate.types import Severity, ValidationResult
1616

1717

1818
@click.command()

dandi/cli/tests/test_cmd_validate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from ..cmd_validate import _process_issues, validate
77
from ...tests.xfail import mark_xfail_windows_python313_posixsubprocess
8-
from ...validate_types import (
8+
from ...validate.types import (
99
Origin,
1010
OriginType,
1111
Scope,

dandi/files/bases.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
from dandi.metadata.core import get_default_metadata
3030
from dandi.misctypes import DUMMY_DANDI_ETAG, Digest, LocalReadableFile, P
3131
from dandi.utils import post_upload_size_check, pre_upload_size_check, yaml_load
32-
from dandi.validate_types import (
32+
from dandi.validate.types import (
3333
ORIGIN_INTERNAL_DANDI,
3434
ORIGIN_VALIDATION_DANDI,
3535
Origin,

dandi/files/bids.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from ..consts import ZARR_MIME_TYPE, dandiset_metadata_file
1717
from ..metadata.core import add_common_metadata, prepare_metadata
1818
from ..misctypes import Digest
19-
from ..validate_types import (
19+
from ..validate.types import (
2020
ORIGIN_VALIDATION_DANDI_LAYOUT,
2121
Scope,
2222
Severity,
@@ -92,7 +92,7 @@ def _get_metadata(self) -> None:
9292
with self._lock:
9393
if self._asset_metadata is None:
9494
# Import here to avoid circular import
95-
from dandi.validate import validate_bids
95+
from dandi.validate.core import validate_bids
9696

9797
# === Validate the dataset using bidsschematools ===
9898
# This is done to obtain the metadata for each asset in the dataset

dandi/files/zarr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
import json
1111
import os
1212
import os.path
13-
import urllib.parse
1413
from pathlib import Path
1514
from time import sleep
1615
from typing import Any, Optional
16+
import urllib.parse
1717

1818
from dandischema.models import BareAsset, DigestType
1919
from pydantic import BaseModel, ConfigDict, ValidationError
@@ -47,7 +47,7 @@
4747
)
4848

4949
from .bases import LocalDirectoryAsset
50-
from ..validate_types import (
50+
from ..validate.types import (
5151
ORIGIN_VALIDATION_DANDI_ZARR,
5252
Origin,
5353
OriginType,

dandi/organize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
pluralize,
4444
yaml_load,
4545
)
46-
from .validate_types import (
46+
from .validate.types import (
4747
ORIGIN_VALIDATION_DANDI_LAYOUT,
4848
Scope,
4949
Severity,

dandi/pynwb_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
)
4343
from .misctypes import Readable
4444
from .utils import get_module_version, is_url
45-
from .validate_types import (
45+
from .validate.types import (
4646
Origin,
4747
OriginType,
4848
Scope,

dandi/tests/test_bids_validator_deno/test_validator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
)
2828
from dandi.consts import dandiset_metadata_file
2929
from dandi.tests.fixtures import BIDS_TESTDATA_SELECTION
30-
from dandi.validate_types import (
30+
from dandi.validate.types import (
3131
OriginType,
3232
Scope,
3333
Severity,

dandi/tests/test_validate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
from .fixtures import BIDS_TESTDATA_SELECTION
88
from .. import __version__
99
from ..consts import dandiset_metadata_file
10-
from ..validate import validate
11-
from ..validate_types import (
10+
from ..validate.core import validate
11+
from ..validate.types import (
1212
Origin,
1313
OriginType,
1414
Scope,

0 commit comments

Comments
 (0)