Ignore:
Timestamp:
13 Nov 2014, 14:40:27 (10 years ago)
Author:
Henrik Bettermann
Message:

Change of name.

Location:
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba
Files:
20 edited
1 moved

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/utils/api.txt

    r7811 r11949  
    1 :mod:`waeup.kofa.utils` -- misc. helpers
     1:mod:`waeup.ikoba.utils` -- misc. helpers
    22****************************************
    33
    4 .. module:: waeup.kofa.utils
     4.. module:: waeup.ikoba.utils
    55
    66Components and other stuff of general interest.
     
    99==========
    1010
    11 The :mod:`waeup.kofa.utils` module provides the following submodules:
     11The :mod:`waeup.ikoba.utils` module provides the following submodules:
    1212
    1313.. toctree::
  • main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/utils/batching.py

    r11947 r11949  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
    18 """Kofa components for batch processing.
     18"""Ikoba components for batch processing.
    1919
    2020Batch processors eat CSV files to add, update or remove large numbers
     
    3737from zope.schema.interfaces import ConstraintNotSatisfied
    3838from zope.event import notify
    39 from waeup.kofa.async import AsyncJob
    40 from waeup.kofa.interfaces import (
     39from waeup.ikoba.async import AsyncJob
     40from waeup.ikoba.interfaces import (
    4141    IBatchProcessor, FatalCSVError, IObjectConverter, IJobManager,
    4242    ICSVExporter, IGNORE_MARKER, DuplicationError, JOB_STATUS_MAP,
     
    563563
    564564    The real work is done when an instance of this class is put into a
    565     queue. See :mod:`waeup.kofa.async` to learn more about
     565    queue. See :mod:`waeup.ikoba.async` to learn more about
    566566    asynchronous jobs.
    567567
  • main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/utils/batching.txt

    r9739 r11949  
    1 :mod:`waeup.kofa.utils.batching` -- Batch processing
     1:mod:`waeup.ikoba.utils.batching` -- Batch processing
    22****************************************************
    33
     
    188188All we need, is a batch processor now.
    189189
    190     >>> from waeup.kofa.utils.batching import BatchProcessor
    191     >>> from waeup.kofa.interfaces import IGNORE_MARKER
     190    >>> from waeup.ikoba.utils.batching import BatchProcessor
     191    >>> from waeup.ikoba.interfaces import IGNORE_MARKER
    192192    >>> class CaveProcessor(BatchProcessor):
    193193    ...   util_name = 'caveprocessor'
  • main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/utils/browser.py

    r11947 r11949  
    2222from zope.catalog.interfaces import ICatalog
    2323from zope.component import queryUtility, getUtility, createObject
    24 from waeup.kofa.browser.layout import UtilityView
    25 from waeup.kofa.interfaces import IObjectHistory
     24from waeup.ikoba.browser.layout import UtilityView
     25from waeup.ikoba.interfaces import IObjectHistory
    2626
    27 from waeup.kofa.interfaces import IUniversity
     27from waeup.ikoba.interfaces import IUniversity
    2828
    2929class ReindexPage(UtilityView, grok.View):
  • main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/utils/converters.py

    r9932 r11949  
    2828from zope.publisher.browser import TestRequest
    2929from zope.schema.interfaces import IList
    30 from waeup.kofa.interfaces import (
     30from waeup.ikoba.interfaces import (
    3131    IObjectConverter, IResultEntryField, IFieldConverter, SubjectSource,
    3232    GradeSource, DELETION_MARKER, IGNORE_MARKER)
    33 from waeup.kofa.schema.interfaces import IPhoneNumber
    34 from waeup.kofa.schoolgrades import ResultEntry
     33from waeup.ikoba.schema.interfaces import IPhoneNumber
     34from waeup.ikoba.schoolgrades import ResultEntry
    3535
    3636class ExtendedCheckBoxWidget(CheckBoxWidget):
  • main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/utils/converters.txt

    r7819 r11949  
    1 :mod:`waeup.kofa.utils.converters` -- Converters
     1:mod:`waeup.ikoba.utils.converters` -- Converters
    22************************************************
    33
    4 .. module:: waeup.kofa.utils.converters
     4.. module:: waeup.ikoba.utils.converters
    55
    66Converters for :mod:`zope.schema` based data.
     
    1010
    1111.. :NOdoctest:
    12 .. :NOlayer: waeup.kofa.testing.KofaUnitTestLayer
     12.. :NOlayer: waeup.ikoba.testing.IkobaUnitTestLayer
    1313
    1414
     
    2121   'non-values'. Current setting is:
    2222
    23       >>> from waeup.kofa.utils.converters import NONE_STRING_VALUE
     23      >>> from waeup.ikoba.utils.converters import NONE_STRING_VALUE
    2424      >>> NONE_STRING_VALUE
    2525      ''
     
    3232========
    3333
    34 The :mod:`waeup.kofa.utils.converters` module is basically a collection of
     34The :mod:`waeup.ikoba.utils.converters` module is basically a collection of
    3535adapters for field types of :mod:`zope.schema`.
    3636
     
    4848   `zope.schema.Choice` or similar.
    4949
    50    .. method:: provides(waeup.kofa.interfaces.ISchemaTypeConverter)
     50   .. method:: provides(waeup.ikoba.interfaces.ISchemaTypeConverter)
    5151
    5252   .. method:: _convertValueFromString(string)
     
    111111   .. method:: adapts(zope.schema.IText)
    112112
    113    .. method:: provides(waeup.kofa.interfaces.ISchemaTypeConverter)
     113   .. method:: provides(waeup.ikoba.interfaces.ISchemaTypeConverter)
    114114
    115115   .. method:: fromString(string[, strict=True])
     
    150150   .. method:: adapts(zope.schema.IBool)
    151151
    152    .. method:: provides(waeup.kofa.interfaces.ISchemaTypeConverter)
     152   .. method:: provides(waeup.ikoba.interfaces.ISchemaTypeConverter)
    153153
    154154   .. method:: fromString(string[, strict=True])
     
    191191   .. method:: adapts(zope.schema.IInt)
    192192
    193    .. method:: provides(waeup.kofa.interfaces.ISchemaTypeConverter)
     193   .. method:: provides(waeup.ikoba.interfaces.ISchemaTypeConverter)
    194194
    195195   .. method:: fromString(string[, strict=True])
     
    232232   .. method:: adapts(zope.schema.IChoice)
    233233
    234    .. method:: provides(waeup.kofa.interfaces.ISchemaTypeConverter)
     234   .. method:: provides(waeup.ikoba.interfaces.ISchemaTypeConverter)
    235235
    236236   .. method:: fromString(string[, strict=False])
     
    272272----------------------
    273273
    274 .. autoclass:: waeup.kofa.utils.converters.DateConverter
     274.. autoclass:: waeup.ikoba.utils.converters.DateConverter
    275275   :members:
    276276   :inherited-members:
     
    294294:class:`TextConverter` instance:
    295295
    296     >>> from waeup.kofa.utils.converters import TextConverter
     296    >>> from waeup.ikoba.utils.converters import TextConverter
    297297    >>> converter = TextConverter(field)
    298298
    299299Or we can just grab a registered adapter:
    300300
    301     >>> from waeup.kofa.interfaces import ISchemaTypeConverter
     301    >>> from waeup.ikoba.interfaces import ISchemaTypeConverter
    302302    >>> converter = ISchemaTypeConverter(field)
    303303
     
    305305
    306306    >>> converter
    307     <waeup.kofa.utils.converters.TextConverter object at 0x...>
     307    <waeup.ikoba.utils.converters.TextConverter object at 0x...>
    308308
    309309Now we can convert strings to this type:
     
    382382:class:`BoolConverter` instance:
    383383
    384     >>> from waeup.kofa.utils.converters import BoolConverter
     384    >>> from waeup.ikoba.utils.converters import BoolConverter
    385385    >>> converter = BoolConverter(field)
    386386
    387387Or we can just grab a registered adapter:
    388388
    389     >>> from waeup.kofa.interfaces import ISchemaTypeConverter
     389    >>> from waeup.ikoba.interfaces import ISchemaTypeConverter
    390390    >>> converter = ISchemaTypeConverter(field)
    391391
     
    393393
    394394    >>> converter
    395     <waeup.kofa.utils.converters.BoolConverter object at 0x...>
     395    <waeup.ikoba.utils.converters.BoolConverter object at 0x...>
    396396
    397397Now we can convert strings to this type:
     
    494494:class:`IntConverter` instance:
    495495
    496     >>> from waeup.kofa.utils.converters import IntConverter
     496    >>> from waeup.ikoba.utils.converters import IntConverter
    497497    >>> converter = IntConverter(field)
    498498
    499499Or we can just grab a registered adapter:
    500500
    501     >>> from waeup.kofa.interfaces import ISchemaTypeConverter
     501    >>> from waeup.ikoba.interfaces import ISchemaTypeConverter
    502502    >>> converter = ISchemaTypeConverter(field)
    503503
     
    505505
    506506    >>> converter
    507     <waeup.kofa.utils.converters.IntConverter object at 0x...>
     507    <waeup.ikoba.utils.converters.IntConverter object at 0x...>
    508508
    509509Now we can convert strings to this type:
     
    597597:class:`ChoiceConverter` instance:
    598598
    599     >>> from waeup.kofa.utils.converters import ChoiceConverter
     599    >>> from waeup.ikoba.utils.converters import ChoiceConverter
    600600    >>> converter = ChoiceConverter(field)
    601601
    602602Or we can just grab a registered adapter:
    603603
    604     >>> from waeup.kofa.interfaces import ISchemaTypeConverter
     604    >>> from waeup.ikoba.interfaces import ISchemaTypeConverter
    605605    >>> converter = ISchemaTypeConverter(field)
    606606
     
    608608
    609609    >>> converter
    610     <waeup.kofa.utils.converters.ChoiceConverter object at 0x...>
     610    <waeup.ikoba.utils.converters.ChoiceConverter object at 0x...>
    611611
    612612Now we can convert strings to this type:
     
    672672    '1'
    673673
    674     >>> from waeup.kofa.interfaces import SimpleKofaVocabulary
     674    >>> from waeup.ikoba.interfaces import SimpleIkobaVocabulary
    675675    >>> field = Choice(
    676676    ...   title = u'Favourite Dish',
    677677    ...   default = 0,
    678     ...   vocabulary = SimpleKofaVocabulary(
     678    ...   vocabulary = SimpleIkobaVocabulary(
    679679    ...        ('N/A', 0), ('Pizza', 1),
    680680    ...        ('Cake', 2), ('Muffins', 3)),
     
    730730
    731731We get a converter for this field in the usual way. The
    732 :meth:`waeup.kofa.utils.converters.fromString()` method will return one of
     732:meth:`waeup.ikoba.utils.converters.fromString()` method will return one of
    733733the objects if we feed it with ``'Wilma'`` or ``'Fred'``:
    734734
     
    763763:class:`IntConverter` instance:
    764764
    765     >>> from waeup.kofa.utils.converters import DateConverter
     765    >>> from waeup.ikoba.utils.converters import DateConverter
    766766    >>> converter = DateConverter(field)
    767767
    768768Or we can just grab a registered adapter:
    769769
    770     >>> from waeup.kofa.interfaces import ISchemaTypeConverter
     770    >>> from waeup.ikoba.interfaces import ISchemaTypeConverter
    771771    >>> converter = ISchemaTypeConverter(field)
    772772
     
    774774
    775775    >>> converter
    776     <waeup.kofa.utils.converters.DateConverter object at 0x...>
     776    <waeup.ikoba.utils.converters.DateConverter object at 0x...>
    777777
    778778Now we can convert strings to this type:
  • main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/utils/countries.py

    r8057 r11949  
    33# This file was automatically generated. Please do not edit
    44#
    5 from waeup.kofa.interfaces import MessageFactory as _
     5from waeup.ikoba.interfaces import MessageFactory as _
    66
    77COUNTRIES = (
  • main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/utils/country_helpers.py

    r8057 r11949  
    1010them like this::
    1111
    12   $ ./bin/kofactl debug
    13   >>> from waeup.kofa.utils.country_helpers import update_list
    14   >>> from waeup.kofa.utils.country_helpers import update_module
     12  $ ./bin/ikobactl debug
     13  >>> from waeup.ikoba.utils.country_helpers import update_list
     14  >>> from waeup.ikoba.utils.country_helpers import update_module
    1515  >>> update_list()
    1616  >>> update_module()
     
    3434# This file was automatically generated. Please do not edit
    3535#
    36 from waeup.kofa.interfaces import MessageFactory as _
     36from waeup.ikoba.interfaces import MessageFactory as _
    3737
    3838COUNTRIES = ${COUNTRY_LIST}
  • main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/utils/helpers.py

    r11947 r11949  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
    18 """General helper functions for Kofa.
     18"""General helper functions for Ikoba.
    1919"""
    2020import unicodecsv as csv  # XXX: csv ops should move to dedicated module.
     
    160160    instances of certain classes when called.
    161161
    162     In :mod:`waeup.kofa` we use factories extensively for
     162    In :mod:`waeup.ikoba` we use factories extensively for
    163163    batching. While processing a batch some processors looks up a
    164164    factory to create real-world instances that then get filled with
     
    172172
    173173       >>> import grok
    174        >>> from waeup.kofa.utils.helpers import FactoryBase
     174       >>> from waeup.ikoba.utils.helpers import FactoryBase
    175175       >>> class MyObject(object):
    176176       ...   # Some class we want to get instances of.
     
    178178       >>> class MyObjectFactory(FactoryBase):
    179179       ...   # This is the factory for MyObject instances
    180        ...   grok.name(u'waeup.kofa.factory.MyObject')
     180       ...   grok.name(u'waeup.ikoba.factory.MyObject')
    181181       ...   factory = MyObject
    182182
     
    185185    called. The given name must even be unique amongst all utilities
    186186    registered during runtime. While you can pick any name you like
    187     you might want to prepend ``waeup.kofa.factory.`` to the name
     187    you might want to prepend ``waeup.ikoba.factory.`` to the name
    188188    string to make sure it does not clash with names of other
    189189    utilities one day.
     
    192192    freshly defined factory. This executes all the component
    193193    registration stuff we don't want to do ourselves. In daily use
    194     this is done automatically on startup of a :mod:`waeup.kofa`
     194    this is done automatically on startup of a :mod:`waeup.ikoba`
    195195    system.
    196196
    197        >>> grok.testing.grok('waeup.kofa.utils.helpers')
     197       >>> grok.testing.grok('waeup.ikoba.utils.helpers')
    198198       >>> grok.testing.grok_component(
    199199       ...    'MyObjectFactory', MyObjectFactory
     
    206206
    207207       >>> from zope.component import createObject
    208        >>> obj = createObject('waeup.kofa.factory.MyObject')
     208       >>> obj = createObject('waeup.ikoba.factory.MyObject')
    209209       >>> isinstance(obj, MyObject)
    210210       True
     
    216216       >>> from zope.component.interfaces import IFactory
    217217       >>> factory = getUtility(
    218        ...   IFactory, name='waeup.kofa.factory.MyObject'
     218       ...   IFactory, name='waeup.ikoba.factory.MyObject'
    219219       ...   )
    220220       >>> isinstance(factory, MyObjectFactory)
     
    261261    HTML code:
    262262
    263         >>> from waeup.kofa.utils.helpers import ReST2HTML
     263        >>> from waeup.ikoba.utils.helpers import ReST2HTML
    264264        >>> source = '''
    265265        ... Headline
     
    649649    `pdf`.
    650650
    651     More filetypes (though untested in waeup.kofa) are automatically
     651    More filetypes (though untested in waeup.ikoba) are automatically
    652652    recognized because we deploy the stdlib `imghdr` library. See this
    653653    module's docs for a complete list of filetypes recognized.
  • main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/utils/helpers.txt

    r7819 r11949  
    1 :mod:`waeup.kofa.utils.helpers` -- Helpers for Kofa
     1:mod:`waeup.ikoba.utils.helpers` -- Helpers for Ikoba
    22***************************************************
    33
    4 .. module:: waeup.kofa.utils.helpers
    5 
    6 Helper functions for Kofa.
     4.. module:: waeup.ikoba.utils.helpers
     5
     6Helper functions for Ikoba.
    77
    88.. :doctest:
     
    2121     >>> os.chdir(new_location)
    2222
    23      >>> from waeup.kofa.utils.helpers import remove_file_or_directory
     23     >>> from waeup.ikoba.utils.helpers import remove_file_or_directory
    2424     >>> open('blah', 'wb').write('nonsense')
    2525     >>> 'blah' in os.listdir('.')
     
    7272     >>> open(os.path.join('src', 'blah'), 'wb').write('nonsense')
    7373
    74      >>> from waeup.kofa.utils.helpers import copy_filesystem_tree
     74     >>> from waeup.ikoba.utils.helpers import copy_filesystem_tree
    7575     >>> result = copy_filesystem_tree('src', 'dst')
    7676
     
    179179   returned with all preceeding/following stuff stripped:
    180180
    181      >>> from waeup.kofa.utils.helpers import get_inner_HTML_part
     181     >>> from waeup.ikoba.utils.helpers import get_inner_HTML_part
    182182     >>> print get_inner_HTML_part("""<html>
    183183     ... <head>
  • main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/utils/importexport.py

    r10028 r11949  
    2222from cStringIO import StringIO
    2323from zope.interface import Interface
    24 from waeup.kofa.interfaces import (IKofaObject, IKofaExporter,
    25                                    IKofaXMLExporter, IKofaXMLImporter)
     24from waeup.ikoba.interfaces import (IIkobaObject, IIkobaExporter,
     25                                   IIkobaXMLExporter, IIkobaXMLImporter)
    2626
    2727def readFile(f):
     
    4040
    4141class Exporter(grok.Adapter):
    42     """Export a Kofa object as pickle.
     42    """Export a Ikoba object as pickle.
    4343
    4444    This all-purpose exporter exports attributes defined in schemata
    4545    and contained objects (if the exported thing is a container).
    4646    """
    47     grok.context(IKofaObject)
    48     grok.provides(IKofaExporter)
     47    grok.context(IIkobaObject)
     48    grok.provides(IIkobaExporter)
    4949
    5050    def __init__(self, context):
     
    6161
    6262class XMLExporter(grok.Adapter):
    63     """Export a Kofa object as XML.
     63    """Export a Ikoba object as XML.
    6464
    6565    This all-purpose exporter exports XML representations of pickable
     
    6767    """
    6868    grok.context(Interface)
    69     grok.provides(IKofaXMLExporter)
     69    grok.provides(IIkobaXMLExporter)
    7070
    7171    def __init__(self, context):
     
    8484
    8585class XMLImporter(grok.Adapter):
    86     """Import a Kofa object from XML.
     86    """Import a Ikoba object from XML.
    8787    """
    8888    grok.context(Interface)
    89     grok.provides(IKofaXMLImporter)
     89    grok.provides(IIkobaXMLImporter)
    9090
    9191    def __init__(self, context):
  • main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/utils/importexport.txt

    r7819 r11949  
    66
    77.. :doctest:
    8 .. :layer: waeup.kofa.testing.KofaUnitTestLayer
     8.. :layer: waeup.ikoba.testing.IkobaUnitTestLayer
    99
    1010As imports and exports of data are a cruical point when doing updates
     
    6060an exporter::
    6161
    62     >>> from waeup.kofa.interfaces import IKofaXMLExporter
    63     >>> exporter = IKofaXMLExporter(mycave)
     62    >>> from waeup.ikoba.interfaces import IIkobaXMLExporter
     63    >>> exporter = IIkobaXMLExporter(mycave)
    6464    >>> exporter
    65     <waeup.kofa.utils.importexport.XMLExporter object at 0x...>
     65    <waeup.ikoba.utils.importexport.XMLExporter object at 0x...>
    6666
    6767All exporters provide an ``export(<obj>)`` method::
     
    101101Now we create an importer for that object:
    102102
    103     >>> from waeup.kofa.interfaces import IKofaXMLImporter
    104     >>> importer = IKofaXMLImporter(mycave)
     103    >>> from waeup.ikoba.interfaces import IIkobaXMLImporter
     104    >>> importer = IIkobaXMLImporter(mycave)
    105105
    106106Importing from filenames
  • main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/utils/logger.py

    r9988 r11949  
    1919Convenience stuff for logging.
    2020
    21 Main component of :mod:`waeup.kofa.utils.logging` is a mix-in class
    22 :class:`waeup.kofa.utils.logging.Logger`. Classes derived (also) from
     21Main component of :mod:`waeup.ikoba.utils.logging` is a mix-in class
     22:class:`waeup.ikoba.utils.logging.Logger`. Classes derived (also) from
    2323that mix-in provide a `logger` attribute that returns a regular Python
    2424logger logging to a rotating log file stored in the datacenter storage
     
    3030The `logger_name` tells under which name the logger should be
    3131registered Python-wise. This is usually a dotted name string like
    32 ``waeup.kofa.${sitename}.mycomponent`` which should be unique. If you
     32``waeup.ikoba.${sitename}.mycomponent`` which should be unique. If you
    3333pick a name already used by another component, trouble is ahead. The
    3434``${sitename}`` chunk of the name can be set literally like this. The
     
    4646your `logger_name` and `logger_filename` attribute and off you go::
    4747
    48   from waeup.kofa.utils.logger import Logger
     48  from waeup.ikoba.utils.logger import Logger
    4949
    5050  class MyComponent(object, Logger):
    5151      # Yes that's a complete working class
    52       logger_name = 'waeup.kofa.${sitename}.mycomponent
     52      logger_name = 'waeup.ikoba.${sitename}.mycomponent
    5353      logger_filename = 'mycomponent.log'
    5454
     
    6767
    6868The datacenter and its storage are created automatically when you
    69 create a :class:`waeup.kofa.app.University`. This also means that
     69create a :class:`waeup.ikoba.app.University`. This also means that
    7070logging with the `Logger` mix-in will work only inside so-called sites
    7171(`University` instances put into ZODB are such `sites`).
     
    8282from zope.component import queryUtility
    8383from zope.interface import Interface, Attribute, implements
    84 from waeup.kofa.interfaces import (
     84from waeup.ikoba.interfaces import (
    8585    IDataCenter, IDataCenterStorageMovedEvent, ILoggerCollector)
    86 from waeup.kofa.utils.helpers import get_current_principal
     86from waeup.ikoba.utils.helpers import get_current_principal
    8787
    8888#: Default logfile size (5 KB, not relevant for DatedRotatingFileHandlers)
     
    154154
    155155    #: The Python logger name used when
    156     #: logging. ``'waeup.kofa.${sitename}'`` by default. You can use the
     156    #: logging. ``'waeup.ikoba.${sitename}'`` by default. You can use the
    157157    #: ``${sitename}`` placeholder in that string, which will be
    158158    #: replaced by the actual used site name.
    159     logger_name = 'waeup.kofa.${sitename}'
     159    logger_name = 'waeup.ikoba.${sitename}'
    160160
    161161    #: The format to use when logging.
     
    386386    return
    387387
    388 from waeup.kofa.interfaces import IUniversity
     388from waeup.ikoba.interfaces import IUniversity
    389389@grok.subscribe(IUniversity, grok.IObjectRemovedEvent)
    390390def handle_site_removed(obj, event):
  • main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/utils/tests/test_batching.py

    r11737 r11949  
    3030from zope.component.interfaces import IFactory
    3131from zope.interface import Interface, implements, verify
    32 from waeup.kofa.app import University
    33 from waeup.kofa.interfaces import (
     32from waeup.ikoba.app import University
     33from waeup.ikoba.interfaces import (
    3434    ICSVExporter, IBatchProcessor, IExportJobContainer, IJobManager,
    3535    IExportJob, IExportContainerFinder)
    36 from waeup.kofa.testing import (
     36from waeup.ikoba.testing import (
    3737    FunctionalLayer, FunctionalTestCase, FakeJob, FakeJobManager)
    38 from waeup.kofa.utils.batching import (
     38from waeup.ikoba.utils.batching import (
    3939    ExporterBase, BatchProcessor, export_job, AsyncExportJob,
    4040    ExportJobContainer, VirtualExportJobContainer, ExportContainerFinder)
  • main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/utils/tests/test_converters.py

    r11947 r11949  
    3232    Interface, implements, invariant, Invalid, implementedBy, verify)
    3333
    34 from waeup.kofa.app import University
    35 from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase
    36 from waeup.kofa.interfaces import (
    37     SimpleKofaVocabulary, SubjectSource, GradeSource, IFieldConverter,
     34from waeup.ikoba.app import University
     35from waeup.ikoba.testing import FunctionalLayer, FunctionalTestCase
     36from waeup.ikoba.interfaces import (
     37    SimpleIkobaVocabulary, SubjectSource, GradeSource, IFieldConverter,
    3838    DELETION_MARKER, IGNORE_MARKER)
    39 from waeup.kofa.schoolgrades import ResultEntryField
    40 from waeup.kofa.utils.converters import (
     39from waeup.ikoba.schoolgrades import ResultEntryField
     40from waeup.ikoba.utils.converters import (
    4141    IObjectConverter, IFieldConverter, DefaultFieldConverter,
    4242    ListFieldConverter, PhoneNumberFieldConverter, ResultEntryConverter,
    4343    DefaultObjectConverter)
    44 from waeup.kofa.utils.helpers import attrs_to_fields
    45 
    46 colors = SimpleKofaVocabulary(
     44from waeup.ikoba.utils.helpers import attrs_to_fields
     45
     46colors = SimpleIkobaVocabulary(
    4747    ('Red', u'red'),
    4848    ('Green', u'green'),
    4949    ('Blue', u'blue'),
    5050    )
    51 car_nums = SimpleKofaVocabulary(
     51car_nums = SimpleIkobaVocabulary(
    5252    ('None', 0),
    5353    ('One', 1),
  • main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/utils/tests/test_doctests.py

    r7811 r11949  
    1818"""Register doctests from utils subpackage.
    1919"""
    20 from waeup.kofa.testing import get_doctest_suite
     20from waeup.ikoba.testing import get_doctest_suite
    2121
    2222def test_suite():
  • main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/utils/tests/test_helpers.py

    r11824 r11949  
    3131from zope.security.testing import Principal, Participation
    3232from zope.security.management import newInteraction, endInteraction
    33 from waeup.kofa.utils import helpers
     33from waeup.ikoba.utils import helpers
    3434
    3535class IFakeObject(Interface):
  • main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/utils/tests/test_logger.py

    r9988 r11949  
    1717##
    1818
    19 # Tests for waeup.kofa.utils.logger
     19# Tests for waeup.ikoba.utils.logger
    2020import logging
    2121import os
     
    2525from zope.component.hooks import setSite, clearSite
    2626from zope.interface.verify import verifyClass, verifyObject
    27 from waeup.kofa.app import University
    28 from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase
    29 
    30 from waeup.kofa.utils.logger import (
     27from waeup.ikoba.app import University
     28from waeup.ikoba.testing import FunctionalLayer, FunctionalTestCase
     29
     30from waeup.ikoba.utils.logger import (
    3131    Logger, MAX_BYTES, BACKUP_COUNT, ILoggerCollector, LoggerCollector,
    3232    ILogger)
  • main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/utils/tests/test_utils.py

    r11821 r11949  
    2121import sys
    2222import unittest
    23 from waeup.kofa.interfaces import IKofaUtils
    24 from waeup.kofa.utils.utils import KofaUtils
     23from waeup.ikoba.interfaces import IIkobaUtils
     24from waeup.ikoba.utils.utils import IkobaUtils
    2525from zope.interface import verify
    2626
    2727
    28 class KofaUtilsTestCase(unittest.TestCase):
     28class IkobaUtilsTestCase(unittest.TestCase):
    2929
    3030    def setUp(self):
     
    3636        # Helper: get a `KofUtil` instance with all values of
    3737        # SYSTEM_MAX_LOAD dict set to ``None``
    38         util = KofaUtils()
     38        util = IkobaUtils()
    3939        for key, val in util.SYSTEM_MAX_LOAD.items():
    4040            util.SYSTEM_MAX_LOAD[key] = None
     
    4242
    4343    def test_iface(self):
    44         # KofaUtils fullfill IKofaUtils expectations
    45         utils = KofaUtils()
    46         verify.verifyClass(IKofaUtils, KofaUtils)
    47         verify.verifyObject(IKofaUtils, utils)
     44        # IkobaUtils fullfill IIkobaUtils expectations
     45        utils = IkobaUtils()
     46        verify.verifyClass(IIkobaUtils, IkobaUtils)
     47        verify.verifyObject(IIkobaUtils, utils)
    4848
    4949    def test_expensive_actions_allowed_swap_none(self):
  • main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/utils/utils.py

    r11947 r11949  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
    18 """General helper utilities for Kofa.
     18"""General helper utilities for Ikoba.
    1919"""
    2020import grok
     
    2525from random import SystemRandom as r
    2626from zope.i18n import translate
    27 from waeup.kofa.interfaces import IKofaUtils
    28 from waeup.kofa.interfaces import MessageFactory as _
    29 from waeup.kofa.smtp import send_mail as send_mail_internally
    30 from waeup.kofa.utils.helpers import get_sorted_preferred
     27from waeup.ikoba.interfaces import IIkobaUtils
     28from waeup.ikoba.interfaces import MessageFactory as _
     29from waeup.ikoba.smtp import send_mail as send_mail_internally
     30from waeup.ikoba.utils.helpers import get_sorted_preferred
    3131
    3232
     
    3434              rcpt_name, rcpt_addr,
    3535              subject, body, config):
    36     """Wrapper for the real SMTP functionality in :mod:`waeup.kofa.smtp`.
     36    """Wrapper for the real SMTP functionality in :mod:`waeup.ikoba.smtp`.
    3737
    3838    Merely here to stay compatible with lots of calls to this place.
     
    7878
    7979
    80 class KofaUtils(grok.GlobalUtility):
     80class IkobaUtils(grok.GlobalUtility):
    8181    """A collection of parameters and methods subject to customization.
    8282
    8383    """
    84     grok.implements(IKofaUtils)
     84    grok.implements(IIkobaUtils)
    8585    # This the only place where we define the portal language
    8686    # which is used for the translation of system messages
     
    225225            'd': portal,
    226226            'e': body})
    227         body = translate(text, 'waeup.kofa',
     227        body = translate(text, 'waeup.ikoba',
    228228            target_language=self.PORTAL_LANGUAGE)
    229229        if not (from_addr and rcpt_addr):
     
    263263        Returns True or False to indicate successful operation.
    264264        """
    265         subject = 'Your Kofa credentials'
     265        subject = 'Your Ikoba credentials'
    266266        text = _(u"""Dear ${a},
    267267
     
    294294            'f': url_info})
    295295
    296         body = translate(text, 'waeup.kofa',
     296        body = translate(text, 'waeup.ikoba',
    297297            target_language=self.PORTAL_LANGUAGE)
    298298        return send_mail(
Note: See TracChangeset for help on using the changeset viewer.