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

default_name unused #50

Closed
rly opened this issue May 7, 2019 · 4 comments
Closed

default_name unused #50

rly opened this issue May 7, 2019 · 4 comments
Labels
category: bug errors in the code or code behavior

Comments

@rly
Copy link
Contributor

rly commented May 7, 2019

  1. Bug

I searched through the hdmf and pynwb source code and could not see any place where default_name of a spec is actually used besides when it is stored. In fact, I can change the default_name on a data type like Position in nwb.behavior.yaml and there is no effect:

- neurodata_type_def: Position
  ...
  default_name: Positionsdfsdfds
from pynwb import NWBFile
from pynwb.behavior import Position
from datetime import datetime

module = nwbfile.create_processing_module(name='a module name 2', description="a module description 2")
pos = Position()
module.add_data_interface(pos)
print(module)
a module name 2 <class 'pynwb.base.ProcessingModule'>
Fields:
  data_interfaces: { Position <class 'pynwb.behavior.Position'> }
  description: a module description 2

The default name is set as the class name when no name argument is specified.

Environment

Please describe your environment according to the following bullet points.

Python Executable: Conda
Python Version: Python 3.7
Operating System: Windows
HDMF Version: latest
@rly rly added the category: bug errors in the code or code behavior label May 7, 2019
@rly
Copy link
Contributor Author

rly commented May 7, 2019

This has likely been masked by the fact that most data types require a name argument, in which case default_name has no use.

@rly
Copy link
Contributor Author

rly commented Jun 28, 2019

Fixed by #91

@rly rly closed this as completed Jun 28, 2019
@bendichter
Copy link
Contributor

@rly The PR goes some way to address this issue, but the fix we just merged is just for classes that are constructed dynamically by get_class in pynwb, and does not apply to other classes like Position.

@rly rly reopened this Jun 28, 2019
@rly
Copy link
Contributor Author

rly commented Jan 5, 2023

This issue requires changing Container and docval to work with "default_name". This is not high priority. Please reopen if it is a priority.

@rly rly closed this as completed Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: bug errors in the code or code behavior
Projects
None yet
Development

No branches or pull requests

2 participants