NeurodataWithoutBorders / pynwb

A Python API for working with Neurodata stored in the NWB Format
https://pynwb.readthedocs.io
Other
178 stars 84 forks source link

Upgrade validation methods #1911

Open stephprince opened 6 months ago

stephprince commented 6 months ago

Motivation

Addresses several issues summarized in #1808. This is a breaking change for the next major release.

This PR also modifies the validate method so that it

  1. accepts a single path as input (the CLI still accepts multiple paths)
  2. no longer returns a status code but will return errors if the function fails in the process of performing validation. (The CLI still returns an exit code).

TODO

Checklist

codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 45.00000% with 66 lines in your changes missing coverage. Please review.

Project coverage is 82.25%. Comparing base (a63387d) to head (12bc84c).

Files with missing lines Patch % Lines
src/pynwb/validation_cli.py 0.00% 41 Missing :warning:
src/pynwb/validation.py 67.16% 15 Missing and 7 partials :warning:
src/pynwb/__init__.py 75.00% 2 Missing and 1 partial :warning:

:exclamation: There is a different number of reports uploaded between BASE (a63387d) and HEAD (12bc84c). Click for more details.

HEAD has 7 uploads less than BASE | Flag | BASE (a63387d) | HEAD (12bc84c) | |------|------|------| |unit|4|1| |integration|4|0|
Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #1911 +/- ## ========================================== - Coverage 91.88% 82.25% -9.64% ========================================== Files 27 28 +1 Lines 2711 2733 +22 Branches 707 708 +1 ========================================== - Hits 2491 2248 -243 - Misses 144 381 +237 - Partials 76 104 +28 ``` | [Flag](https://app.codecov.io/gh/NeurodataWithoutBorders/pynwb/pull/1911/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NeurodataWithoutBorders) | Coverage Δ | | |---|---|---| | [integration](https://app.codecov.io/gh/NeurodataWithoutBorders/pynwb/pull/1911/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NeurodataWithoutBorders) | `?` | | | [unit](https://app.codecov.io/gh/NeurodataWithoutBorders/pynwb/pull/1911/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NeurodataWithoutBorders) | `82.25% <45.00%> (-0.60%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NeurodataWithoutBorders#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.