[Checkins] SVN: zc.demostorage2/branches/dev/ Refined documentation
a little in preparation for release and added a
Jim Fulton
jim at zope.com
Tue Jan 22 19:10:30 EST 2008
Log message for revision 83098:
Refined documentation a little in preparation for release and added a
config test.
Changed:
U zc.demostorage2/branches/dev/README.txt
U zc.demostorage2/branches/dev/setup.py
U zc.demostorage2/branches/dev/src/zc/demostorage2/README.txt
-=-
Modified: zc.demostorage2/branches/dev/README.txt
===================================================================
--- zc.demostorage2/branches/dev/README.txt 2008-01-22 23:47:25 UTC (rev 83097)
+++ zc.demostorage2/branches/dev/README.txt 2008-01-23 00:10:30 UTC (rev 83098)
@@ -1,11 +1 @@
-***********************
-Title Here
-***********************
-
-Changes
-*******
-
-0.1 (yyyy-mm-dd)
-================
-
-Initial release
+See src/zc/demostorage2/README.txt.
Modified: zc.demostorage2/branches/dev/setup.py
===================================================================
--- zc.demostorage2/branches/dev/setup.py 2008-01-22 23:47:25 UTC (rev 83097)
+++ zc.demostorage2/branches/dev/setup.py 2008-01-23 00:10:30 UTC (rev 83098)
@@ -1,14 +1,40 @@
+##############################################################################
+#
+# Copyright (c) Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+import os
+
from setuptools import setup, find_packages
-entry_points = """
-"""
+def read(rname):
+ return open(os.path.join(os.path.dirname(__file__), *rname.split('/')
+ )).read()
+long_description = (
+ read('src/zc/demostorage2/README.txt')
+ + '\n' +
+ 'Download\n'
+ '--------\n'
+ )
+
+open('doc.txt', 'w').write(long_description)
+
setup(
name = 'zc.demostorage2',
version = '0.1',
author = 'Jim Fulton',
author_email = 'jim at zope.com',
- description = '',
+ description = 'ZODB storage that stores changes relative to a base storage',
+ long_description=long_description,
license = 'ZPL 2.1',
packages = find_packages('src'),
@@ -16,5 +42,9 @@
package_dir = {'': 'src'},
install_requires = ['ZODB3', 'setuptools'],
zip_safe = False,
- entry_points=entry_points,
+ classifiers = [
+ 'Intended Audience :: Developers',
+ 'License :: OSI Approved :: Zope Public License',
+ 'Framework :: ZODB',
+ ],
)
Modified: zc.demostorage2/branches/dev/src/zc/demostorage2/README.txt
===================================================================
--- zc.demostorage2/branches/dev/src/zc/demostorage2/README.txt 2008-01-22 23:47:25 UTC (rev 83097)
+++ zc.demostorage2/branches/dev/src/zc/demostorage2/README.txt 2008-01-23 00:10:30 UTC (rev 83098)
@@ -18,6 +18,55 @@
Note that DemoStorage also assumes that it's base storage uses 64-bit
unsigned integer object ids allocated sequentially.
+.. contents::
+
+Change History
+--------------
+
+0.1 (2008-01-22)
+****************
+
+Initial release.
+
+Configuration
+-------------
+
+The section below shows how to create zc.demostorage2 storages from
+Python. If you're using ZConfig, you need to:
+
+- import zc.demostroage2
+
+- include a demostroage2 section
+
+Here's an example that shows how to configure demo storage and how to
+use the configuration from python:
+
+ >>> import ZODB.config
+ >>> storage = ZODB.config.storageFromString("""
+ ...
+ ... %import zc.demostorage2
+ ...
+ ... <demostorage2>
+ ... <filestorage base>
+ ... path base.fs
+ ... </filestorage>
+ ... <filestorage changes>
+ ... path changes.fs
+ ... </filestorage>
+ ... </demostorage2>
+ ... """)
+
+This creates a demo storage that gets base data from a file storage
+named base.fs and stores changes in a file storage named changes.fs.
+
+ >>> storage
+ <DemoStorage2: DemoStorage2(base.fs, changes.fs)>
+
+ >>> storage.close()
+
+Demo (doctest)
+--------------
+
To see how this works, we'll start by creating a base storage and
puting an object (in addition to the root object) in it:
More information about the Checkins
mailing list