removed 'from base import Loops' from __init__.py
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@1892 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
913054b697
commit
81d2092e0a
14 changed files with 20 additions and 21 deletions
|
@ -30,7 +30,7 @@ Concepts and Relations
|
||||||
Let's start with creating a few example concepts, putting them in a
|
Let's start with creating a few example concepts, putting them in a
|
||||||
top-level loops container and a concept manager:
|
top-level loops container and a concept manager:
|
||||||
|
|
||||||
>>> from loops import Loops
|
>>> from loops.base import Loops
|
||||||
>>> from loops.tests.setup import TestSite
|
>>> from loops.tests.setup import TestSite
|
||||||
>>> t = TestSite(site)
|
>>> t = TestSite(site)
|
||||||
>>> concepts, resources, views = t.setup()
|
>>> concepts, resources, views = t.setup()
|
||||||
|
|
|
@ -23,4 +23,4 @@
|
||||||
$Id$
|
$Id$
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from loops.base import Loops
|
#from loops.base import Loops
|
||||||
|
|
|
@ -26,7 +26,7 @@ from zope.app import zapi
|
||||||
from zope.lifecycleevent import ObjectCreatedEvent, ObjectModifiedEvent
|
from zope.lifecycleevent import ObjectCreatedEvent, ObjectModifiedEvent
|
||||||
from zope.event import notify
|
from zope.event import notify
|
||||||
from zope.formlib.form import FormFields
|
from zope.formlib.form import FormFields
|
||||||
from loops import Loops
|
from loops.base import Loops
|
||||||
from loops.interfaces import ILoops
|
from loops.interfaces import ILoops
|
||||||
from loops.browser.common import AddForm, EditForm, BaseView
|
from loops.browser.common import AddForm, EditForm, BaseView
|
||||||
from loops.setup import ISetupManager
|
from loops.setup import ISetupManager
|
||||||
|
|
|
@ -16,7 +16,7 @@ from cybertools.relation.interfaces import IRelationRegistry
|
||||||
from cybertools.relation.registry import IndexableRelationAdapter
|
from cybertools.relation.registry import IndexableRelationAdapter
|
||||||
from cybertools.typology.interfaces import IType
|
from cybertools.typology.interfaces import IType
|
||||||
|
|
||||||
from loops import Loops
|
from loops.base import Loops
|
||||||
from loops import util
|
from loops import util
|
||||||
from loops.interfaces import IIndexAttributes
|
from loops.interfaces import IIndexAttributes
|
||||||
from loops.concept import Concept
|
from loops.concept import Concept
|
||||||
|
|
|
@ -34,7 +34,7 @@ and care for some type adapter machinery:
|
||||||
Now we can setup a simple loops site with its manager objects, using a
|
Now we can setup a simple loops site with its manager objects, using a
|
||||||
loops setup manager:
|
loops setup manager:
|
||||||
|
|
||||||
>>> from loops import Loops
|
>>> from loops.base import Loops
|
||||||
>>> loopsRoot = site['loops'] = Loops()
|
>>> loopsRoot = site['loops'] = Loops()
|
||||||
|
|
||||||
>>> from loops.setup import SetupManager
|
>>> from loops.setup import SetupManager
|
||||||
|
|
|
@ -10,14 +10,14 @@ Let's do some basic set up
|
||||||
|
|
||||||
>>> from zope.app.testing.setup import placefulSetUp, placefulTearDown
|
>>> from zope.app.testing.setup import placefulSetUp, placefulTearDown
|
||||||
>>> site = placefulSetUp(True)
|
>>> site = placefulSetUp(True)
|
||||||
|
|
||||||
>>> from zope import component, interface
|
>>> from zope import component, interface
|
||||||
>>> from zope.app import zapi
|
>>> from zope.app import zapi
|
||||||
|
|
||||||
and setup a simple loops site with a concept manager and some concepts
|
and setup a simple loops site with a concept manager and some concepts
|
||||||
(with all the type machinery, what in real life is done via standard
|
(with all the type machinery, what in real life is done via standard
|
||||||
ZCML setup):
|
ZCML setup):
|
||||||
|
|
||||||
>>> from cybertools.relation.interfaces import IRelationRegistry
|
>>> from cybertools.relation.interfaces import IRelationRegistry
|
||||||
>>> from cybertools.relation.registry import DummyRelationRegistry
|
>>> from cybertools.relation.registry import DummyRelationRegistry
|
||||||
>>> relations = DummyRelationRegistry()
|
>>> relations = DummyRelationRegistry()
|
||||||
|
@ -34,14 +34,14 @@ ZCML setup):
|
||||||
>>> from loops.knowledge.setup import SetupManager
|
>>> from loops.knowledge.setup import SetupManager
|
||||||
>>> component.provideAdapter(SetupManager, (ILoops,), ISetupManager,
|
>>> component.provideAdapter(SetupManager, (ILoops,), ISetupManager,
|
||||||
... name='knowledge')
|
... name='knowledge')
|
||||||
|
|
||||||
>>> from loops import Loops
|
>>> from loops.base import Loops
|
||||||
>>> loopsRoot = site['loops'] = Loops()
|
>>> loopsRoot = site['loops'] = Loops()
|
||||||
|
|
||||||
>>> from loops.setup import SetupManager
|
>>> from loops.setup import SetupManager
|
||||||
>>> setup = SetupManager(loopsRoot)
|
>>> setup = SetupManager(loopsRoot)
|
||||||
>>> concepts, resources, views = setup.setup()
|
>>> concepts, resources, views = setup.setup()
|
||||||
|
|
||||||
We need some type concepts for controlling the meaning of the concepts objects,
|
We need some type concepts for controlling the meaning of the concepts objects,
|
||||||
these have already been created during setup:
|
these have already been created during setup:
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ the variables:
|
||||||
>>> pySpecialsC = concepts['pySpecials'] = Concept(u'Python Specials')
|
>>> pySpecialsC = concepts['pySpecials'] = Concept(u'Python Specials')
|
||||||
|
|
||||||
>>> topicConcepts = (progLangC, ooProgC, pythonC, pyBasicsC, pyOoC, pySpecialsC)
|
>>> topicConcepts = (progLangC, ooProgC, pythonC, pyBasicsC, pyOoC, pySpecialsC)
|
||||||
|
|
||||||
>>> for c in topicConcepts: c.conceptType = topic
|
>>> for c in topicConcepts: c.conceptType = topic
|
||||||
|
|
||||||
>>> progLang, ooProg, python, pyBasics, pyOo, pySpecials = (IKnowledgeElement(c)
|
>>> progLang, ooProg, python, pyBasics, pyOo, pySpecials = (IKnowledgeElement(c)
|
||||||
|
@ -160,7 +160,7 @@ For testing, we first have to provide the needed utilities and settings
|
||||||
>>> from zope.app.security.principalregistry import PrincipalRegistry
|
>>> from zope.app.security.principalregistry import PrincipalRegistry
|
||||||
>>> auth = PrincipalRegistry()
|
>>> auth = PrincipalRegistry()
|
||||||
>>> component.provideUtility(auth, IAuthentication)
|
>>> component.provideUtility(auth, IAuthentication)
|
||||||
|
|
||||||
>>> from zope.app.principalannotation.interfaces import IPrincipalAnnotationUtility
|
>>> from zope.app.principalannotation.interfaces import IPrincipalAnnotationUtility
|
||||||
>>> from zope.app.principalannotation import PrincipalAnnotationUtility
|
>>> from zope.app.principalannotation import PrincipalAnnotationUtility
|
||||||
>>> principalAnnotations = PrincipalAnnotationUtility()
|
>>> principalAnnotations = PrincipalAnnotationUtility()
|
||||||
|
|
|
@ -35,7 +35,7 @@ ZCML setup):
|
||||||
>>> component.provideAdapter(SetupManager, (ILoops,), ISetupManager,
|
>>> component.provideAdapter(SetupManager, (ILoops,), ISetupManager,
|
||||||
... name='organize')
|
... name='organize')
|
||||||
|
|
||||||
>>> from loops import Loops
|
>>> from loops.base import Loops
|
||||||
>>> loopsRoot = site['loops'] = Loops()
|
>>> loopsRoot = site['loops'] = Loops()
|
||||||
>>> loopsId = relations.getUniqueIdForObject(loopsRoot)
|
>>> loopsId = relations.getUniqueIdForObject(loopsRoot)
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ ZCML setup):
|
||||||
>>> component.provideAdapter(SetupManager, (ILoops,), ISetupManager,
|
>>> component.provideAdapter(SetupManager, (ILoops,), ISetupManager,
|
||||||
... name='process')
|
... name='process')
|
||||||
|
|
||||||
>>> from loops import Loops
|
>>> from loops.base import Loops
|
||||||
>>> loopsRoot = site['loops'] = Loops()
|
>>> loopsRoot = site['loops'] = Loops()
|
||||||
|
|
||||||
>>> from loops.setup import SetupManager
|
>>> from loops.setup import SetupManager
|
||||||
|
|
|
@ -25,7 +25,7 @@ ZCML setup):
|
||||||
>>> component.provideAdapter(ConceptType)
|
>>> component.provideAdapter(ConceptType)
|
||||||
>>> component.provideAdapter(TypeConcept)
|
>>> component.provideAdapter(TypeConcept)
|
||||||
|
|
||||||
>>> from loops import Loops
|
>>> from loops.base import Loops
|
||||||
>>> loopsRoot = site['loops'] = Loops()
|
>>> loopsRoot = site['loops'] = Loops()
|
||||||
|
|
||||||
>>> from loops.setup import SetupManager
|
>>> from loops.setup import SetupManager
|
||||||
|
|
|
@ -28,7 +28,7 @@ ZCML setup):
|
||||||
>>> component.provideAdapter(ConceptType)
|
>>> component.provideAdapter(ConceptType)
|
||||||
>>> component.provideAdapter(TypeConcept)
|
>>> component.provideAdapter(TypeConcept)
|
||||||
|
|
||||||
>>> from loops import Loops
|
>>> from loops.base import Loops
|
||||||
>>> loopsRoot = site['loops'] = Loops()
|
>>> loopsRoot = site['loops'] = Loops()
|
||||||
|
|
||||||
>>> from loops.setup import SetupManager
|
>>> from loops.setup import SetupManager
|
||||||
|
|
|
@ -24,7 +24,7 @@ from cybertools.relation.registry import IndexableRelationAdapter
|
||||||
from cybertools.relation.registry import invalidateRelations, removeRelation
|
from cybertools.relation.registry import invalidateRelations, removeRelation
|
||||||
from cybertools.typology.interfaces import IType
|
from cybertools.typology.interfaces import IType
|
||||||
|
|
||||||
from loops import Loops
|
from loops.base import Loops
|
||||||
from loops import util
|
from loops import util
|
||||||
from loops.common import NameChooser
|
from loops.common import NameChooser
|
||||||
from loops.interfaces import ILoopsObject, IIndexAttributes, IDocument, IFile
|
from loops.interfaces import ILoopsObject, IIndexAttributes, IDocument, IFile
|
||||||
|
|
|
@ -2,14 +2,13 @@
|
||||||
|
|
||||||
import unittest, doctest
|
import unittest, doctest
|
||||||
from zope.testing.doctestunit import DocFileSuite
|
from zope.testing.doctestunit import DocFileSuite
|
||||||
from zope.app.testing import ztapi
|
|
||||||
from zope.interface.verify import verifyClass
|
from zope.interface.verify import verifyClass
|
||||||
from zope.interface import implements
|
from zope.interface import implements
|
||||||
from zope.app import zapi
|
from zope.app import zapi
|
||||||
from zope.app.intid.interfaces import IIntIds
|
from zope.app.intid.interfaces import IIntIds
|
||||||
|
|
||||||
from loops.interfaces import ILoops
|
from loops.interfaces import ILoops
|
||||||
from loops import Loops
|
from loops.base import Loops
|
||||||
from loops.interfaces import IConcept, IConceptManager
|
from loops.interfaces import IConcept, IConceptManager
|
||||||
from loops.interfaces import IDocument, IMediaAsset, IResourceManager
|
from loops.interfaces import IDocument, IMediaAsset, IResourceManager
|
||||||
from loops.interfaces import INode, IViewManager
|
from loops.interfaces import INode, IViewManager
|
||||||
|
|
|
@ -17,7 +17,7 @@ from cybertools.relation.interfaces import IRelationRegistry
|
||||||
from cybertools.relation.registry import IndexableRelationAdapter
|
from cybertools.relation.registry import IndexableRelationAdapter
|
||||||
from cybertools.typology.interfaces import IType
|
from cybertools.typology.interfaces import IType
|
||||||
|
|
||||||
from loops import Loops
|
from loops.base import Loops
|
||||||
from loops import util
|
from loops import util
|
||||||
from loops.interfaces import IResource, IIndexAttributes
|
from loops.interfaces import IResource, IIndexAttributes
|
||||||
from loops.concept import Concept
|
from loops.concept import Concept
|
||||||
|
|
|
@ -31,7 +31,7 @@ ZCML setup):
|
||||||
>>> from loops.common import NameChooser
|
>>> from loops.common import NameChooser
|
||||||
>>> component.provideAdapter(NameChooser)
|
>>> component.provideAdapter(NameChooser)
|
||||||
|
|
||||||
>>> from loops import Loops
|
>>> from loops.base import Loops
|
||||||
>>> loopsRoot = site['loops'] = Loops()
|
>>> loopsRoot = site['loops'] = Loops()
|
||||||
|
|
||||||
>>> from loops.setup import SetupManager
|
>>> from loops.setup import SetupManager
|
||||||
|
|
Loading…
Add table
Reference in a new issue