aiidateam / aiida-core

The official repository for the AiiDA code
https://aiida-core.readthedocs.io
Other
431 stars 187 forks source link

AiiDA extras #2231

Open giovannipizzi opened 5 years ago

giovannipizzi commented 5 years ago

Currently all extras are accessible to users. If AiiDA has to store custom data, that we don't necessarily want the user to change without noticing, we don't currently have a namespacing scheme to allow this. Two current occurrences of this are for instance the hidden flag of a code and the hash of a Node (currently stored in extras but the user might inadvertently replace everything).

Proposed solution

List of known internal extras

giovannipizzi commented 5 years ago

Todo: discuss also what happens on export

szoupanos commented 5 years ago

This is not urgent but there should be a discussion on what should happen when extras are exported (and what is the behaviour of private extras). Issue #1761

yakutovicha commented 5 years ago

After today's discussion we agreed:

  1. Instead of private extras call them aiida extras as it reflects better the idea of keeping them internally managed by aiida.
  2. Create a separate api for the aiida extras and keep it hidden. 2.1. get_aiida_extra() / get_aiida_extras() 2.2. set_aiida_extra() / set_aiida_extra() 2.3. reset_aiida_extras() This will allow to avoid sometimes confusing interface due to the simultaneous managing of both types of extras.
  3. For the moment keep both types of extras in the same table but later move the aiida extras to a separate one (maybe).
  4. Implement a separate functionality to export the aiida extras.
giovannipizzi commented 5 years ago

I'm also not sure at this point if we should really call them aiida_extra. maybe metadata, or some other name (and document the difference between attributes, extras, metadata)