[PATCH 5 of 5 saem] [seda] Simplify uicfg rules settings

Denis Laxalde denis.laxalde at logilab.fr
Mon Oct 9 11:29:01 CEST 2017


Sylvain Thenault a écrit :
> # HG changeset patch
> # User Sylvain Thénault <sylvain.thenault at logilab.fr>
> # Date 1507298138 -7200
> #      Fri Oct 06 15:55:38 2017 +0200
> # Node ID d453196e3152988325f45ec51ea06729092e2434
> # Parent  97e53987e50182b1b669d6e6cf8789f9393946f4
> # Available At http://hg.logilab.org/review/cubes/saem_ref
> #              hg pull http://hg.logilab.org/review/cubes/saem_ref -r d453196e3152
> [seda] Simplify uicfg rules settings
> 
> allowed since seda uses 3.25's derived rtags feature.

Series looks good to me but tests fail apparently 
https://jenkins.logilab.org/job/cubicweb-saem_ref/272/.
What should we do?

> diff --git a/cubicweb_saem_ref/views/seda.py b/cubicweb_saem_ref/views/seda.py
> --- a/cubicweb_saem_ref/views/seda.py
> +++ b/cubicweb_saem_ref/views/seda.py
> @@ -16,39 +16,27 @@
>   """cubicweb-saem-ref views related to SEDA"""
>   
>   from cubicweb.web.views import uicfg
>   
>   from cubicweb_seda.views import archivetransfer
> -from cubicweb_seda.views.simplified import simplified_afs, simplified_pvs
> -from cubicweb_seda.views.archiveunit import copy_afs
>   
>   
> -# primary view configuration #######################################################################
> -
>   afs = uicfg.autoform_section
> -afs.tag_attribute(('SEDAArchiveTransfer', 'simplified_profile'), 'main', 'hidden')
> -copy_afs.tag_attribute(('SEDAArchiveTransfer', 'simplified_profile'), 'main', 'hidden')
> +pvs = uicfg.primaryview_section
>   
> -simplified_pvs.tag_attribute(('SEDAArchiveTransfer', 'ark'), 'attributes')
> +afs.tag_attribute(('SEDAArchiveTransfer', 'simplified_profile'), 'main', 'hidden')
> +
>   # we want only simplified_profile, so its default is set to true and it only has to be hidden
> -simplified_afs.tag_attribute(('SEDAArchiveTransfer', 'simplified_profile'), 'main', 'hidden')
> +afs.tag_attribute(('SEDAArchiveTransfer', 'simplified_profile'), 'main', 'hidden')
>   # also hide transferring and archival agency
>   for rtype in ('seda_transferring_agency', 'seda_archival_agency'):
> -    # needed on afs as well as simplified_afs because it's selected during transfer creation
>       afs.tag_subject_of(('SEDAArchiveTransfer', rtype, '*'), 'main', 'hidden')
> -    simplified_afs.tag_subject_of(('SEDAArchiveTransfer', rtype, '*'), 'main', 'hidden')
> -    simplified_pvs.tag_subject_of(('SEDAArchiveTransfer', rtype, '*'), 'hidden')
> +    pvs.tag_subject_of(('SEDAArchiveTransfer', rtype, '*'), 'hidden')
>   
> -# copy rules from __init__ but not considered by this copy of pvs/afs
> -simplified_pvs.tag_subject_of(('*', 'ark_naa', '*'), 'attributes')
> -simplified_afs.tag_subject_of(('*', 'ark_naa', '*'), 'main', 'attributes')
> -simplified_afs.tag_subject_of(('*', 'custom_workflow', '*'), 'main', 'hidden')
> +pvs.tag_object_of(('*', 'use_profile', '*'), 'hidden')
> +afs.tag_object_of(('*', 'use_profile', '*'), 'main', 'hidden')
>   
> -simplified_pvs.tag_object_of(('*', 'use_profile', '*'), 'hidden')
> -simplified_afs.tag_object_of(('*', 'use_profile', '*'), 'main', 'hidden')
> -
> -simplified_pvs.tag_attribute(('SEDABinaryDataObject', 'filename'), 'hidden')
> -simplified_afs.tag_attribute(('SEDABinaryDataObject', 'filename'), 'main', 'hidden')
> +pvs.tag_attribute(('SEDABinaryDataObject', 'filename'), 'hidden')
>   afs.tag_attribute(('SEDABinaryDataObject', 'filename'), 'main', 'hidden')
>   
>   
>   archivetransfer.ArchiveTransferTabbedPrimaryView.tabs.append('saem.lifecycle_tab')
> 



More information about the saem-devel mailing list