Skip to content

[Documentation] Remove deprecated arguments from setters, change deprecated to read-only for class attributes #2103

@h-mayorquin

Description

@h-mayorquin

There are deprecated arguments in the API documentation for attributes that can no longer be written to. For example, see sweep_table in the main NWBFile attribute:

https://pynwb.readthedocs.io/en/stable/pynwb.file.html#pynwb.file.NWBFile.sweep_table

From today's discussion, the idea is that these are still valid fields, even if they can't be added or written to, and they should be documented as fields. I think this makes sense for attributes, and we should update the documentation to mark them as "read-only" instead of "deprecated."

More critically, there are removed arguments still appearing in setters and constructors. I think these should be removed entirely. Examples include manifold in create_imaging_plane, ic_electrodes in the main NWBFile constructor, and notes in add_scratch:

https://pynwb.readthedocs.io/en/stable/pynwb.file.html#pynwb.file.NWBFile.create_imaging_plane
https://pynwb.readthedocs.io/en/stable/pynwb.file.html#pynwb.file.NWBFile.add_scratch

In these cases, I believe the arguments should be removed from the docstring once we deprecate them, as they no longer provide useful information and just add noise.

Does that capture what you thought @oruebel @rly or did I misunderstand?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions