wwpdb-dictionaries / mmcif_pdbx

wwPDB PDBx/mmCIF Dictionary
Creative Commons Zero v1.0 Universal
9 stars 9 forks source link

Namespace consolidation #48

Closed Ryan-Pye closed 2 years ago

epeisach commented 2 years ago

First pass through passes all tests. I will review more carefully

epeisach commented 2 years ago

I will likely merge this Monday - but I would like point out a factual error.

You have been changing the description of things like em_buffer.id to say "PRIMARY KEY" --- but it is not the sole key. em_buffer.specimen_id is also a key for the category.

Ryan-Pye commented 2 years ago

em_buffer.specimen_id is a foreign key, unless I'm misunderstanding the category em_buffer.id should always be unique and uniquely identify the category row as a primary key.

epeisach commented 2 years ago

One issue discovered. Need to revert back one of your changes.

Also - be aware that dictionary tools will only recognize positive_int as a string (regular expression). item_ranges are not supported here. depui will not check - as it does not have support either

`diff --git a/base/mmcif_pdbx-base.dic b/base/mmcif_pdbx-base.dic index 4ff89ff..1638503 100644 --- a/base/mmcif_pdbx-base.dic +++ b/base/mmcif_pdbx-base.dic @@ -100466,7 +100466,7 @@ save__em_entity_assembly_molwt.experimental_flag _item.name '_em_entity_assembly_molwt.experimental_flag' _item.category_id em_entity_assembly_molwt _item.mandatory_code no

Ryan-Pye commented 2 years ago

Good catch, looks like I got a little careless with that change.

Why doesn't/can't positive_int inherit the same checking as int/float? I'm wondering whether this is something we could look into fixing in the future?

epeisach commented 2 years ago

We can add support for positive_ints - but it was something Eduardo added without discussion - and we tried to limit to the EMD namespace.

Essentially, DepUI and dictionary tools were developed to support primative types. Positive integers are integers with ranges.