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

Update deprecations #2011

Merged
merged 24 commits into from
Dec 23, 2024
Merged

Update deprecations #2011

merged 24 commits into from
Dec 23, 2024

Conversation

stephprince
Copy link
Contributor

@stephprince stephprince commented Dec 18, 2024

Motivation

Fix #2008. Upgrades PendingDeprecationWarnings to DeprecationWarnings and upgrades DeprecationWarnings to raise ValueErrors when creating new objects or UserWarnings on read. Also removes functions previously marked for deprecation.

Here is a summary of the classes and methods updated:

  • ProcessingModule.add_container will be replaced by ProcessingModule.add
  • ProcessingModule.get_container will be replaced by ProcessingModule.get
  • ProcessingModule.add_data_interface will be replaced by ProcessingModule.add
  • ProcessingModule.get_data_interface will be replaced by ProcessingModule.get
  • ScratchData.notes will be replaced by ScratchData.description
  • Clustering will raise an error when creating a new object.
  • ClusterWaveforms will raise an error when creating a new object.
  • /intracellular_ephys/filtering will raise an error when creating a new object.
  • NWBFile arg ic_electrodes will be replaced by arg icephys_electrodes
  • NWBFile ec_electrodes property is replaced by electrodes
  • NWBFile.add_ic_electrode, NWBFile.create_ic_electrode, and NWBFile.get_ic_electrode will be removed
  • NWBFile.add_epoch_metadata_column will be removed
  • SweepTable will raise an error when creating a new object and functions that interacted with the SweepTable will be modified
  • ImageSeries.bits_per_pixel will be removed
  • ImageSeries.format changed to external, default value for format should raise Value error
  • ImagingPlane.manifold will raise an error when creating a new object
  • ImagingPlane.conversion will be deprecated in favor of origin coords and grid_spacing
  • IndexSeries.unit is fixed
  • Indexed_timeseries replaced by indexed_images
  • _get_resources was removed
  • NWBFile.modules is replaced by NWBFile.processing

TODO

  • target the release-3.0 branch before merging (?)
  • instead of raising UserWarnings for deprecated types on read, we discussed offline about not raising any warnings on read. A user working with older files using deprecated types will likely not be able to do anything to address the presence of deprecated types.

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 Dec 18, 2024

Codecov Report

Attention: Patch coverage is 96.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 92.70%. Comparing base (80fc386) to head (1c4bca2).
Report is 5 commits behind head on release-3.0.0.

Files with missing lines Patch % Lines
src/pynwb/file.py 85.71% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@                Coverage Diff                @@
##           release-3.0.0    #2011      +/-   ##
=================================================
+ Coverage          91.69%   92.70%   +1.01%     
=================================================
  Files                 27       27              
  Lines               2708     2687      -21     
  Branches             707      706       -1     
=================================================
+ Hits                2483     2491       +8     
+ Misses               149      127      -22     
+ Partials              76       69       -7     
Flag Coverage Δ
integration 73.12% <34.00%> (+0.30%) ⬆️
unit 83.58% <96.00%> (+0.94%) ⬆️

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.

test.py Outdated Show resolved Hide resolved
@stephprince stephprince marked this pull request as ready for review December 18, 2024 08:15
@stephprince stephprince requested a review from oruebel December 18, 2024 08:16
CHANGELOG.md Outdated Show resolved Hide resolved
src/pynwb/base.py Outdated Show resolved Hide resolved
src/pynwb/base.py Outdated Show resolved Hide resolved
src/pynwb/core.py Outdated Show resolved Hide resolved
src/pynwb/file.py Outdated Show resolved Hide resolved
src/pynwb/file.py Outdated Show resolved Hide resolved
src/pynwb/file.py Show resolved Hide resolved
src/pynwb/file.py Outdated Show resolved Hide resolved
docs/source/conf.py Outdated Show resolved Hide resolved
docs/source/conf.py Outdated Show resolved Hide resolved
src/pynwb/core.py Outdated Show resolved Hide resolved
src/pynwb/core.py Outdated Show resolved Hide resolved
src/pynwb/file.py Outdated Show resolved Hide resolved
src/pynwb/file.py Outdated Show resolved Hide resolved
src/pynwb/file.py Outdated Show resolved Hide resolved
src/pynwb/file.py Outdated Show resolved Hide resolved
src/pynwb/file.py Outdated Show resolved Hide resolved
src/pynwb/file.py Show resolved Hide resolved
@rly
Copy link
Contributor

rly commented Dec 23, 2024

Great, detailed work! Please merge into a release-3.0.0 branch.

@stephprince stephprince changed the base branch from dev to release-3.0.0 December 23, 2024 18:16
@stephprince stephprince merged commit e47cd5a into release-3.0.0 Dec 23, 2024
25 of 26 checks passed
@stephprince stephprince deleted the deprecation-errors branch December 23, 2024 18:19
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.

[Feature]: Update deprecations for pynwb 3.0
3 participants