Changeset 12951


Ignore:
Timestamp:
15 May 2015, 08:56:17 (9 years ago)
Author:
Henrik Bettermann
Message:

Simplify headlines in doctests. Remove some API documentation.

Location:
main/waeup.kofa/trunk
Files:
1 added
15 edited
2 moved

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/docs/source/userdocs/security.rst

    r12922 r12951  
    66.. seealso::
    77
    8    :ref:`Security Doctests <permissions_txt>`
     8   :ref:`Security Doctests <security_txt>`
    99
    1010Kofa has a very efficient security machinery. The machinery does not
  • main/waeup.kofa/trunk/docs/source/userdocs/testing.rst

    r12947 r12951  
    130130   testing/userscontainer
    131131
     132University
     133----------
     134
     135.. toctree::
     136   :maxdepth: 2
     137
     138   testing/app
     139
    132140Academic Section
    133141----------------
     
    136144   :maxdepth: 2
    137145
    138    testing/certificate
     146   testing/certcourse
    139147
    140148Batch Processing
  • main/waeup.kofa/trunk/docs/source/userdocs/testing/certcourse.rst

    r12950 r12951  
    1 .. _certificate_txt:
     1.. _certcourse_txt:
    22
    3 .. include:: ../../../../src/waeup/kofa/doctests/certificate.txt
    4 
    5 .. include:: ../../../../src/waeup/kofa/doctests/certcourses.txt
     3.. include:: ../../../../src/waeup/kofa/doctests/certcourse.txt
  • main/waeup.kofa/trunk/docs/source/userdocs/testing/permissions.rst

    r12950 r12951  
    1 .. _permissions_txt:
     1.. _security_txt:
    22
    33.. include:: ../../../../src/waeup/kofa/doctests/permissions.txt
     4
     5.. include:: ../../../../src/waeup/kofa/doctests/authentication.txt
  • main/waeup.kofa/trunk/src/waeup/kofa/catalog.py

    r11483 r12951  
    3232@implementer(IQuery)
    3333class KofaQuery(Query):
    34     """A hurry.query-like query that supports also ``apply``.
     34    """A `hurry.query.query.Query` compatible query that also supports
     35    retrival of plain ``Bree`` result sets as used inside a catalog.
     36
     37    Like `hurry.query.query.Query` objects, `KofaQuery` is some kind
     38    of a meta query or 'compound query' that can give the cataloged
     39    objects (or their int ids) matching one or more 'subqueries'.
     40
     41    This way you can search for objects (or their int ids) that match
     42    several criteria at the same time. See ``examples`` section below.
     43
     44    A singleton instance of this class is also available as global
     45    utility.
     46
     47    A hurry.query-like query that supports also ``apply``.
    3548    """
    3649    def apply(self, query):
    37         """Get a catalog's BTree set of intids conforming to a query.
     50        """Get the list of int ids (a `BTree` result set) for objects
     51        determined by ``query``.
     52
     53        The list of int ids is less expensive to compute than the
     54        complete search results and sufficient, for instance, when you
     55        only need the number of objects that match a query and not the
     56        objects themselves.
    3857        """
    3958        return query.apply()
  • main/waeup.kofa/trunk/src/waeup/kofa/doctests/app.txt

    r12948 r12951  
    1 :mod:`waeup.kofa.app` -- central components for Kofa
    2 ****************************************************
     1Central Components
     2******************
    33
    44.. :doctest:
     
    66
    77.. module:: waeup.kofa.app
    8 
    9 .. class:: University
    10 
    11   The main Kofa application object is given with
    12   :class:`University`. It provides the main containers as faculties,
    13   hostels, etc.
    14 
    15   .. attribute:: name
    16 
    17      A string. The name of a university.
    18 
    19   .. attribute:: faculties
    20 
    21      An arbitrary object containing "faculties". In the case of
    22      `University` it is a container of type
    23      `waeup.kofa.interfaces.IFacultiesContainer`.
    248
    259
     
    3721instance:
    3822
    39     >>> from waeup.kofa.app import University
    40     >>> myuniversity = University()
    41     >>> myuniversity
    42     <waeup.kofa.app.University object at 0x...>
     23  >>> from waeup.kofa.app import University
     24  >>> myuniversity = University()
     25  >>> myuniversity
     26  <waeup.kofa.app.University object at 0x...>
    4327
    4428Instances of `University` comply with the interface
    4529`waeup.kofa.interfaces.IUniversity`:
    4630
    47     >>> from zope.interface.verify import verifyClass
    48     >>> from waeup.kofa.interfaces import IUniversity
    49     >>> verifyClass(IUniversity, University)
    50     True
     31  >>> from zope.interface.verify import verifyClass
     32  >>> from waeup.kofa.interfaces import IUniversity
     33  >>> verifyClass(IUniversity, University)
     34  True
    5135
    5236A freshly created instance provides the attributes promised by the
    5337interface:
    5438
    55     >>> from waeup.kofa.app import University
    56     >>> myuniversity = University()
    57     >>> myuniversity['configuration'].name
    58     u'Sample University'
     39  >>> from waeup.kofa.app import University
     40  >>> myuniversity = University()
     41  >>> myuniversity['configuration'].name
     42  u'Sample University'
    5943
    60     >>> myuniversity['faculties']
    61     <waeup.kofa.university.facultiescontainer.FacultiesContainer object at 0x...>
     44  >>> myuniversity['faculties']
     45  <waeup.kofa.university.facultiescontainer.FacultiesContainer object at 0x...>
    6246
    6347  >>> myuniversity['students']
  • main/waeup.kofa/trunk/src/waeup/kofa/doctests/authentication.txt

    r12948 r12951  
    1 Kofa authentication
    2 *******************
     1Authentication
     2**************
    33
    44We need to protect most pieces of our portals from unauthenticated
     
    2424  >>> browser.handleErrors = False
    2525
    26 Creating users (principals)
    27 ===========================
     26Creating officers
     27=================
    2828
    2929Before we can login, we have to provide a user (``principal`` in Zope
     
    4242See ``userscontainer.txt`` for details about the UsersContainer we use here.
    4343
    44 Users and local roles
    45 =====================
     44Officers and local roles
     45========================
    4646
    4747Accounts also hold infos about local roles assigned to a user. In the
  • main/waeup.kofa/trunk/src/waeup/kofa/doctests/catalog.txt

    r12948 r12951  
    1010.. :layer: waeup.kofa.testing.KofaUnitTestLayer
    1111
    12 The KofaQuery Class
    13 ===================
    14 
    15 .. class:: KofaQuery()
    16 
    17    .. attribute:: grok.implements(hurry.query.interfaces.IQuery)
    18 
    19    A `hurry.query.query.Query` compatible query that also supports
    20    retrival of plain ``Bree`` result sets as used inside a catalog.
    21 
    22    Like `hurry.query.query.Query` objects, `KofaQuery` is some kind
    23    of a meta query or 'compound query' that can give the cataloged
    24    objects (or their int ids) matching one or more 'subqueries'.
    25 
    26    This way you can search for objects (or their int ids) that match
    27    several criteria at the same time. See ``examples`` section below.
    28 
    29    A singleton instance of this class is also available as global
    30    utility.
    31 
    32    .. method:: searchResults(query)
    33 
    34      Get the cataloged objects determined by ``query``.
    35 
    36    .. method:: apply(query)
    37 
    38      Get the list of int ids (a `BTree` result set) for objects
    39      determined by ``query``.
    40 
    41      The list of int ids is less expensive to compute than the
    42      complete search results and sufficient, for instance, when you
    43      only need the number of objects that match a query and not the
    44      objects themselves.
    45 
    46 Examples
    47 ========
    48 
    4912Getting a general query object
    50 ------------------------------
     13==============================
    5114
    5215We can get a KofaQuery object by asking for an unnamed global utility
     
    6427
    6528Setting up a catalog and feeding it
    66 -----------------------------------
     29===================================
    6730
    6831    >>> from zope.catalog.interfaces import ICatalog
     
    143106
    144107Searching for result sets
    145 -------------------------
     108=========================
    146109
    147110Finally we can perform queries:
     
    193156
    194157Searching for objects
    195 ---------------------
     158=====================
    196159
    197160Very often we don't want to know the catalog-internal 'ids' of
  • main/waeup.kofa/trunk/src/waeup/kofa/doctests/certificatescontainer.txt

    r12949 r12951  
    1 :mod:`waeup.kofa.university.certificatescontainer` -- Certificate containers
    2 ****************************************************************************
     1Certificate Containers
     2**********************
    33
    44.. module:: waeup.kofa.university.certificatescontainer
  • main/waeup.kofa/trunk/src/waeup/kofa/doctests/course.txt

    r12949 r12951  
    1 :mod:`waeup.kofa.university.course` -- Courses
    2 **********************************************
     1Courses
     2*******
    33
    44.. module:: waeup.kofa.university.course
  • main/waeup.kofa/trunk/src/waeup/kofa/doctests/coursescontainer.txt

    r12949 r12951  
    1 :mod:`waeup.kofa.university.coursescontainer` -- Course containers
    2 ******************************************************************
     1Course Containers
     2*****************
    33
    44.. module:: waeup.kofa.university.coursescontainer
  • main/waeup.kofa/trunk/src/waeup/kofa/doctests/department.txt

    r12949 r12951  
    1 :mod:`waeup.kofa.university.department` -- Departments
    2 ******************************************************
     1Departments
     2***********
    33
    44.. module:: waeup.kofa.university.department
  • main/waeup.kofa/trunk/src/waeup/kofa/doctests/facultiescontainer.txt

    r12949 r12951  
    1 :mod:`waeup.kofa.university.facultiescontainer` -- Faculty Containers
    2 *********************************************************************
     1Faculty Containers
     2******************
    33
    44.. module:: waeup.kofa.university.facultiescontainer
  • main/waeup.kofa/trunk/src/waeup/kofa/doctests/faculty.txt

    r12949 r12951  
    1 :mod:`waeup.kofa.university.faculty` -- Faculties
    2 *************************************************
     1Faculties
     2*********
    33
    44.. module:: waeup.kofa.university.faculty
  • main/waeup.kofa/trunk/src/waeup/kofa/doctests/helpers.txt

    r12939 r12951  
    1 :mod:`waeup.kofa.utils.helpers` -- Helpers for Kofa
    2 ***************************************************
     1Helpers for Kofa
     2****************
    33
    44.. module:: waeup.kofa.utils.helpers
  • main/waeup.kofa/trunk/src/waeup/kofa/university/tests/test_university.py

    r12950 r12951  
    3333def test_suite():
    3434    # collect doctests for university subpackage
    35     suite = get_doctest_suite(['doctests/certcourses.txt',])
     35    suite = get_doctest_suite(['doctests/certcourse.txt',])
    3636    # add local unittests (actually only one)
    3737    for testcase in [UniversitySubpackageTests,]:
Note: See TracChangeset for help on using the changeset viewer.