Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BF: convert str errors from checking nwb version into proper ValidationResult #1174

Merged
merged 1 commit into from
Dec 14, 2022

Conversation

yarikoptic
Copy link
Member

It also caused another kaboom within hdmf bubbling up through nwbinspector, filed NeurodataWithoutBorders/nwbinspector#329

@codecov
Copy link

codecov bot commented Dec 14, 2022

Codecov Report

Base: 89.08% // Head: 89.13% // Increases project coverage by +0.05% 🎉

Coverage data is based on head (72258b1) compared to base (923d7b0).
Patch coverage: 83.33% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1174      +/-   ##
==========================================
+ Coverage   89.08%   89.13%   +0.05%     
==========================================
  Files          76       76              
  Lines        9461     9510      +49     
==========================================
+ Hits         8428     8477      +49     
  Misses       1033     1033              
Flag Coverage Δ
unittests 89.13% <83.33%> (+0.05%) ⬆️

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

Impacted Files Coverage Δ
dandi/pynwb_utils.py 82.68% <83.33%> (-0.14%) ⬇️
dandi/upload.py 85.27% <0.00%> (-0.51%) ⬇️
dandi/files/_private.py 98.11% <0.00%> (ø)
dandi/validate_types.py 100.00% <0.00%> (ø)
dandi/tests/test_files.py 100.00% <0.00%> (ø)
dandi/cli/tests/test_cmd_validate.py 100.00% <0.00%> (ø)
dandi/tests/fixtures.py 98.60% <0.00%> (+0.03%) ⬆️
dandi/files/__init__.py 93.75% <0.00%> (+0.07%) ⬆️
dandi/tests/test_organize.py 95.29% <0.00%> (+0.14%) ⬆️
dandi/validate.py 97.87% <0.00%> (+0.14%) ⬆️
... and 3 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@yarikoptic
Copy link
Member Author

@jwodder -- any clue why typing check fails with

typing: commands[0]> mypy dandi
dandi/pynwb_utils.py:396: error: "list" is not subscriptable, use "typing.List"
instead  [misc]
                nwb_errors: list[str] = []
                            ^
Found 1 error in 1 file (checked 78 source files)

whenever tox -e typing is ok for me locally and we have plenty of other similar ones

❯ git grep ': list\['
dandi/cli/tests/test_move.py:    mocker: MockerFixture, cmdline: list[str], srcs: list[str], kwargs: dict[str, Any]
dandi/files/bases.py:        errors: list[ValidationResult] = pynwb_validate(
dandi/files/bases.py:    d: dict, required: list[str], file_path: str
dandi/files/bases.py:    errors: list[ValidationResult] = []
dandi/files/bids.py:    dataset_files: list[BIDSAsset] = field(default_factory=list)
dandi/files/bids.py:                self._dataset_errors: list[ValidationResult] = []
dandi/files/bids.py:        errors: list[ValidationResult] = []
dandi/files/zarr.py:    files: list[LocalZarrEntry]
dandi/files/zarr.py:            to_delete: list[RemoteZarrEntry] = []
dandi/files/zarr.py:            digesting: list[Future[Optional[tuple[LocalZarrEntry, str]]]] = []
dandi/files/zarr.py:    digested_entries: list[tuple[LocalZarrEntry, str]] = field(default_factory=list)
dandi/files/zarr.py:    fresh_entries: list[LocalZarrEntry] = field(default_factory=list)
dandi/move.py:    relcontents: list[str]
dandi/move.py:        self, plan: list[Movement], dry_run: bool = False
dandi/move.py:        self, plan: list[Movement], dry_run: bool = False
dandi/move.py:        motions: list[Movement] = []
dandi/move.py:        relcontents: list[str] = []
dandi/move.py:        self, local_moves: list[Movement], remote_moves: list[Movement]
dandi/move.py:    def __init__(self, mismatches: list[str]) -> None:
dandi/pynwb_utils.py:            nwb_errors: list[str] = []

?

dandi/pynwb_utils.py Show resolved Hide resolved
…onResult

It also caused another kaboom within hdmf bubbling up through nwbinspector, filed
NeurodataWithoutBorders/nwbinspector#329
@yarikoptic yarikoptic merged commit 8e67482 into master Dec 14, 2022
@yarikoptic yarikoptic deleted the bf-errors branch December 14, 2022 21:52
@jwodder jwodder added the patch Increment the patch version when merged label Dec 14, 2022
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants