hdmf icon indicating copy to clipboard operation
hdmf copied to clipboard

[Feature]: Remove or enchance the warning about ignoring cached name spaces

Open h-mayorquin opened this issue 1 year ago • 3 comments

What would you like to see added to HDMF?

I get this warning to standard error sometimes and I don't know what to make out of it:

/home/heberto/miniconda3/envs/neuroconv_env/lib/python3.10/site-packages/hdmf/spec/namespace.py:531: UserWarning: Ignoring cached namespace 'hdmf-common' version 1.5.0 because version 1.8.0 is already loaded.
  warn("Ignoring cached namespace '%s' version %s because version %s is already loaded."
/home/heberto/miniconda3/envs/neuroconv_env/lib/python3.10/site-packages/hdmf/spec/namespace.py:531: UserWarning: Ignoring cached namespace 'core' version 2.4.0 because version 2.6.0-alpha is already loaded.
  warn("Ignoring cached namespace '%s' version %s because version %s is already loaded."
/home/heberto/miniconda3/envs/neuroconv_env/lib/python3.10/site-packages/hdmf/spec/namespace.py:531: UserWarning: Ignoring cached namespace 'hdmf-experimental' version 0.1.0 because version 0.5.0 is already loaded.
  warn("Ignoring cached namespace '%s' version %s because version %s is already loaded."

It comes from here: https://github.com/hdmf-dev/hdmf/blob/41fabd4eea4dc1e2a2c55af5b81358d1de86f3b1/src/hdmf/spec/namespace.py#L527-L532

I have the feeling that warnings should be actionable by the person that receives them. I feel that displaying this to end users is obscure (as I assume most users are not familiar with the concept of namespaces in the context of hdmf) and non-actionable. It is not clear what (and if) there is something wrong and what should be done about it.

What solution would you like?

If this is something that the end users should be concerned about, maybe enchance the warning to add instructions of what should be done or try.

If this is something that end users should not be concerned about maybe we could eliminate or restrict the warning so only the people that should be concerned get it.

Can this be done?

Do you have any interest in helping implement the feature?

Yes.

h-mayorquin avatar Dec 13 '23 09:12 h-mayorquin