cubicweb-container #3564655 provide a mechanism to simplify setup [resolved]

Currently, container configuration is probably the main difficulty on the road to using the cube's functionalities.

  • One has to declare the configuration in several different places (schema, entities, hooks).
  • Apart from these declarations, the setup consists of either adding callbacks (e.g. in schema.py), defining entity classes, adapters, setting adapters/hooks selectors.
  • When security comes into play, it adds an extra layer of complexity.

So this ticket is an effort to improve the current situation.

The main idea is add a unique configuration entry point, namely a class which methods would be called in schema/entities/hooks callbacks.

prioritynormal
typetask
done in2.4.0
load3.000
load left0.000
closed by#2f19eb9bb9ae [doc] Update container setup documentation w.r.t. the new configuration API, #ebc853c740de Finalize new configuration API by backporting code from utils to __init__
patchEntities, Hooks: install an automatic on-registry-reload callback that automates entirely the registration of container's automatic appobjects [applied]Config: provide the `.setup_rdefs_security` helper [applied][doc] Update container setup documentation w.r.t. the new configuration API [applied]Finalize new configuration API by backporting code from utils to __init__ [applied]Add migration notes and helpers in ContainerConfiguration [applied]Provide several way to iterate over the schema according to the container [applied]Add ContainerConfig.structure and ContainerConfig.inner_rtypes methods [applied]Add a ContainerConfiguration class to ease setup [applied][config,entities] Deprecate parent_rschema, use parent_rdefs instead. [applied][utils] deprecate immediately what can be deprecated [applied][config] Reimplement _container_parent_rdefs using only rdefs. [applied][config] provide a `.container_hook` class method to build the global container relation hook [applied][config] config.container_adapter becomes a class method, handles ALL containers [applied][config] Introduce container rdefs computation [applied][config] Introduce container_parent rdefs computation [applied][config] provide `.container_adapter` method to the configuration object [applied][config] Introduce new api elements [applied]Add is_clone_of to the configuration [applied][config] introduce a base Container configuration object [applied][config] move `.setup_rtypes_security` to the config object [rejected]Add migration notes and helpers in ContainerConfiguration [rejected]Provide several way to iterate over the schema according to the container [rejected]