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

Add deprecation warning for validate paths argument #2024

Merged
merged 3 commits into from
Jan 28, 2025

Conversation

stephprince
Copy link
Contributor

@stephprince stephprince commented Jan 27, 2025

Motivation

In #1911, the validate(paths=...) argument was removed in favor of using validate(path=...) to simplify code and because validating multiple paths is a rarer use case that can be implemented by the user in a loop if needed.

To follow the typical deprecation cycle and provide a warning to users using this keyword argument, this PR readds the paths argument and issues a deprecation warning for PyNWB 4.0.

How to test the behavior?

from pynwb import validate
validate(paths=['test.nwb'])

Checklist

  • Did you update CHANGELOG.md with your changes?
  • Have you checked our Contributing document?
  • Have you ensured the PR clearly describes the problem and the solution?
  • Is your contribution compliant with our coding style? This can be checked running ruff check . && codespell from the source directory.
  • Have you checked to ensure that there aren't other open Pull Requests for the same change?
  • Have you included the relevant issue number using "Fix #XXX" notation where XXX is the issue number? By including "Fix #XXX" you allow GitHub to close issue #XXX when the PR is merged.

Copy link

codecov bot commented Jan 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.79%. Comparing base (337c914) to head (8726327).
Report is 1 commits behind head on release-3.0.0.

Additional details and impacted files
@@                Coverage Diff                @@
##           release-3.0.0    #2024      +/-   ##
=================================================
+ Coverage          92.76%   92.79%   +0.02%     
=================================================
  Files                 28       28              
  Lines               2724     2735      +11     
  Branches             712      715       +3     
=================================================
+ Hits                2527     2538      +11     
  Misses               127      127              
  Partials              70       70              
Flag Coverage Δ
integration 73.63% <100.00%> (+0.10%) ⬆️
unit 82.63% <41.66%> (-0.19%) ⬇️

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.

@stephprince stephprince marked this pull request as ready for review January 28, 2025 00:01
@stephprince stephprince requested a review from rly January 28, 2025 00:02
@stephprince stephprince merged commit 8ea9ca1 into release-3.0.0 Jan 28, 2025
24 of 25 checks passed
@stephprince stephprince deleted the add-validator-arg-deprecations branch January 28, 2025 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants