hdmf-dev / hdmf-common-schema

Specifications for pre-defined data structures provided by HDMF.
Other
3 stars 7 forks source link

Rename some resources fields for consistency #50

Closed rly closed 3 years ago

rly commented 3 years ago

In https://github.com/hdmf-dev/hdmf-common-schema/blob/master/common/resources.yaml:

First:

I think the prefixes for these key names (except for "resources" > "name") is redundant and can be removed for readability and consistency with "resources" > "name". This would result in:

Would this be too confusing? If so, then for consistency, the resources table "name" field should be renamed "resource_name".

Second:

Either they should all have an underscore before "table" or none of them should. I personally prefer that they have an underscore before "table".

oruebel commented 3 years ago

I think the prefixes for these key names (except for "resources" > "name") is redundant

If I remember correctly (at least in part) the reason was that these were columns in a single table, and as such we could not have multiple columns called name and so the prefixes were needed. From a storage perspective that is probably no longer necessart, since those columns now appear in different tables. However, in the API the user I believe interacts with these via the ExternalResources type as if they were stored in one table, i.e., at least if/when these columns appear together the prefixes will be needed. My feeling is that it may be simplest to just update resource_table.name to resource_table.resource_name but if the name conflict thing is indeed not an issue then removing the prefixes seems fine too.

Either they should all have an underscore before "table" or none of them should. I personally prefer that they have an underscore before "table".

Having the "_table" is fine or we could just drop the "table" part alltogether and just use the names of the tables, e.g., "keys_idx"

rly commented 3 years ago

This was resolved in https://github.com/hdmf-dev/hdmf-common-schema/commit/61613818193ec2b1f3fa8db8d9f0661d71083dec