Commit b4a0df5c authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

Generalize usage of relative import instead of importing from cubes.seda

parent 70cccf02d910
# copyright 2016 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# copyright 2016-2017 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr -- mailto:contact@logilab.fr
#
# This program is free software: you can redistribute it and/or modify it under
......@@ -21,9 +21,9 @@ from logilab.common.registry import objectify_predicate
from cubes.compound.entities import IContainer, IContained, IClonableAdapter
from cubes.seda import seda_profile_container_def
from cubes.seda.xsd import XSDMMapping
from cubes.seda.xsd2yams import RULE_TYPES
from .. import seda_profile_container_def
from ..xsd import XSDMMapping
from ..xsd2yams import RULE_TYPES
XSDM_MAPPING = XSDMMapping('ArchiveTransfer')
......
......@@ -14,7 +14,7 @@
# You should have received a copy of the GNU Lesser General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
from cubes.seda.entities import generated
from . import generated
def _extract_title(annotation):
......
......@@ -19,8 +19,8 @@ from six import string_types
from cubicweb import _
from cubes.seda.entities.profile_generation import SEDA2ExportAdapter, content_types
from cubes.seda.entities.profile_generation import xselement_scheme_attribute, _concept_value
from .profile_generation import SEDA2ExportAdapter, content_types
from .profile_generation import xselement_scheme_attribute, _concept_value
def element_uml_cardinality(occ, card_entity):
......
# copyright 2016 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# copyright 2016-2017 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr -- mailto:contact@logilab.fr
#
# This program is free software: you can redistribute it and/or modify it under
......@@ -18,7 +18,7 @@
from cubicweb.predicates import is_instance
from cubicweb.view import EntityAdapter
from cubes.seda.entities import simplified_profile
from . import simplified_profile
def parent_archive_unit(entity):
......
......@@ -30,9 +30,9 @@ from yams import BASE_TYPES
from cubicweb.predicates import is_instance
from cubicweb.view import EntityAdapter
from cubes.seda.xsd import XSDM_MAPPING, JUMP_ELEMENTS
from cubes.seda.xsd2yams import SKIP_ATTRS
from cubes.seda.entities import simplified_profile
from ..xsd import XSDM_MAPPING, JUMP_ELEMENTS
from ..xsd2yams import SKIP_ATTRS
from . import simplified_profile
JUMPED_OPTIONAL_ELEMENTS = set(('DataObjectPackage', 'FileInfo', 'PhysicalDimensions', 'Coverage'))
......
......@@ -25,8 +25,8 @@ from cubicweb import _
from cubicweb.predicates import is_instance, score_entity
from cubicweb.server import hook
from cubes.seda.entities import rule_type_from_etype, diag
from cubes.seda.entities.generated import CHOICE_RTYPE
from .entities import rule_type_from_etype, diag
from .entities.generated import CHOICE_RTYPE
SEDA_PARENT_RTYPES = {}
......
......@@ -24,9 +24,9 @@ from cubicweb.web import formfields as ff
# XXX alias to avoid side effect: uicfg will become our uicfg submodule. Not necessary with 3.23?
from cubicweb.web.views import uicfg as cwuicfg
from cubes.seda.xsd import XSDM_MAPPING
from cubes.seda.xsd2uicfg import FIRST_LEVEL_ETYPES
from cubes.seda.views.widgets import SEDAMetaField
from ..xsd import XSDM_MAPPING
from ..xsd2uicfg import FIRST_LEVEL_ETYPES
from .widgets import SEDAMetaField
pvs = cwuicfg.primaryview_section
......
......@@ -25,11 +25,11 @@ from cubicweb.web.views import tabs, uicfg, reledit
from cubes.relationwidget import views as rwdg
from cubes.seda.xsd2yams import RULE_TYPES
from cubes.seda.entities import full_seda2_profile, simplified_profile, parent_and_container
from cubes.seda.views import rtags_from_xsd_element, rtags_from_rtype_role_targets, copy_rtag
from cubes.seda.views import clone, viewlib
from cubes.seda.views import uicfg as sedauicfg # noqa - ensure those rules are defined first
from ..xsd2yams import RULE_TYPES
from ..entities import full_seda2_profile, simplified_profile, parent_and_container
from . import rtags_from_xsd_element, rtags_from_rtype_role_targets, copy_rtag
from . import clone, viewlib
from . import uicfg as sedauicfg # noqa - ensure those rules are defined first
at_ordered_fields = [
('seda_archival_agency', 'subject'),
......
......@@ -27,12 +27,12 @@ from cubicweb.web.views import uicfg, baseviews, tabs
from cubes.compound import views as compound
from cubes.relationwidget import views as rwdg
from cubes.seda.entities import simplified_profile, parent_and_container
from cubes.seda.entities.itree import parent_archive_unit
from cubes.seda.views import (add_subobject_link, add_subobjects_button, dropdown_button,
rtags_from_rtype_role_targets, copy_rtag, has_rel_perm)
from cubes.seda.views import clone, viewlib, widgets, content
from cubes.seda.views import uicfg as sedauicfg # noqa - ensure those rules are defined first
from ..entities import simplified_profile, parent_and_container
from ..entities.itree import parent_archive_unit
from . import (add_subobject_link, add_subobjects_button, dropdown_button,
rtags_from_rtype_role_targets, copy_rtag, has_rel_perm)
from . import clone, viewlib, widgets, content
from . import uicfg as sedauicfg # noqa - ensure those rules are defined first
afs = uicfg.autoform_section
......
# copyright 2015-2016 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# copyright 2015-2017 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr -- mailto:contact@logilab.fr
#
# This program is free software: you can redistribute it and/or modify it under
......@@ -23,7 +23,7 @@ from cubicweb.web.views import actions, uicfg
from cubes.compound.entities import copy_entity
from cubes.relationwidget import views as rwdg
from cubes.seda.views.widgets import configure_relation_widget
from .widgets import configure_relation_widget
# Hide copy action for SEDA profiles
......
......@@ -24,10 +24,10 @@ from cubicweb.web.views import tabs, uicfg
from cubes.relationwidget.views import RelationFacetWidget
from cubes.seda.xsd import un_camel_case
from cubes.seda.views import rtags_from_rtype_role_targets, rtags_from_xsd_element, copy_rtag
from cubes.seda.views import viewlib, widgets
from cubes.seda.views import uicfg as sedauicfg # noqa - ensure those rules are defined first
from ..xsd import un_camel_case
from . import rtags_from_rtype_role_targets, rtags_from_xsd_element, copy_rtag
from . import viewlib, widgets
from . import uicfg as sedauicfg # noqa - ensure those rules are defined first
pvs = uicfg.primaryview_section
......
......@@ -28,11 +28,11 @@ from cubicweb.web.views import uicfg, tabs, ibreadcrumbs
from cubes.relationwidget import views as rwdg
from cubes.skos.views import widgets as skos
from cubes.seda.xsd2yams import SCHEME_FROM_CONTAINER
from cubes.seda.entities import parent_and_container, simplified_profile, full_seda2_profile
from cubes.seda.views import rtags_from_xsd_element, add_subobject_link
from cubes.seda.views import viewlib
from cubes.seda.views import uicfg as sedauicfg # noqa - ensure those rules are defined first
from ..xsd2yams import SCHEME_FROM_CONTAINER
from ..entities import parent_and_container, simplified_profile, full_seda2_profile
from . import rtags_from_xsd_element, add_subobject_link
from . import viewlib
from . import uicfg as sedauicfg # noqa - ensure those rules are defined first
pvs = uicfg.primaryview_section
......
......@@ -25,9 +25,9 @@ from cubicweb.predicates import is_instance
from cubicweb.web import INTERNAL_FIELD_VALUE
from cubicweb.web.views import uicfg
from cubes.seda.entities import parent_and_container, rule_type_from_etype
from cubes.seda.views import viewlib
from cubes.seda.views import uicfg as sedauicfg # noqa - ensure those rules are defined first
from ..entities import parent_and_container, rule_type_from_etype
from . import viewlib
from . import uicfg as sedauicfg # noqa - ensure those rules are defined first
affk = uicfg.autoform_field_kwargs
......
......@@ -19,8 +19,8 @@ from cubicweb import _
from cubicweb.predicates import adaptable, is_instance
from cubicweb.web import component
from cubes.seda.entities import simplified_profile, component_unit
from cubes.seda.views import jqtree
from ..entities import simplified_profile, component_unit
from . import jqtree
class ProfileTreeComponent(component.EntityCtxComponent):
......
# copyright 2016 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# copyright 2016-2017 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr -- mailto:contact@logilab.fr
#
# This program is free software: you can redistribute it and/or modify it under
......@@ -20,10 +20,10 @@ from logilab.common.registry import objectify_predicate
from cubicweb.predicates import is_instance
from cubicweb.web.views import uicfg, autoform, formrenderers
from cubes.seda.entities import simplified_profile
from cubes.seda.views import copy_rtag
from ..entities import simplified_profile
from . import copy_rtag
# ensure those are registered first
from cubes.seda.views import mgmt_rules, archivetransfer, dataobject, archiveunit, content # noqa
from . import mgmt_rules, archivetransfer, dataobject, archiveunit, content # noqa
# Add arbitrary score using `yes` to overtake e.g. afs for DataObjectReference defined in content
......
......@@ -20,9 +20,9 @@ from cubicweb.predicates import match_kwargs, is_instance, score_entity
from cubicweb.view import EntityView
from cubicweb.web.views import baseviews, tabs
from cubes.seda.xsd import un_camel_case
from cubes.seda.xsd2uicfg import FIRST_LEVEL_ETYPES
from cubes.seda.views import add_subobjects_button
from ..xsd import un_camel_case
from ..xsd2uicfg import FIRST_LEVEL_ETYPES
from . import add_subobjects_button
class XSDMetaEntityView(EntityView):
......
# copyright 2016 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# copyright 2016-2017 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr -- mailto:contact@logilab.fr
#
# This program is free software: you can redistribute it and/or modify it under
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment