← Back to team overview

schooltool-developers team mailing list archive

Cando and current schooltool

 

Hey all,

In response to a customer request to have cando use the current
schooltool, I set about branching lp:cando and making the following
changes:

1) I replaced buildout cfg with the new-style base.cfg and tiny
buildout.cfg file, setting eggs=cando
2) I updated the versions in setup.py to be schooltool>=1.3.0 and
schooltool.gradebook>=0.6.0
3) I updated dependency_links to be
dependency_links=['http://ftp.schooltool.org/schooltool/1.4/'], the
newer version
4) For some reason, the make file's make-instance section needed
cando.cando2007 changed to be just cando2007, meaning that before it
didn't matter that it didn't match the left-hand side of the
entry_points section of setup.py.

At that point I was able to successfully run make.  The next step was
make run.  The first error I got there was probably because of the new
version of zope we are using in schooltool now, but I was able to fix
it easily by replacing imports of zope.app.keyreference.interfaces
with zope.keyreference.interfaces.

That brought me to the following error:

zope.configuration.config.ConfigurationConflictError: Conflicting
configuration actions
  For: ('adapter', (<InterfaceClass
cando.virginia.interfaces.ICompetencies>, <InterfaceClass
zope.publisher.interfaces.browser.IDefaultBrowserLayer>),
<InterfaceClass zope.app.menus.zmi_views>, u'View')
    File "/home/aelkner/temp/newcando/src/cando/virginia/browser/configure.zcml",
line 91.2-99.8
        <page
            name="treeindex.html"
            for="..interfaces.ICompetencies"
            class=".virginia.CompetenciesView"
            template="templates/competencies.pt"
            permission="zope.View"
            menu="zmi_views"
            title="View"
            />
    File "/home/aelkner/temp/newcando/src/cando/virginia/browser/configure.zcml",
line 101.2-109.8
        <page
            name="index.html"
            for="..interfaces.ICompetencies"
            class=".virginia.CompetenciesClassicView"
            template="templates/competencieseditor.pt"
            permission="zope.View"
            menu="zmi_views"
            title="View"
            />
  For: ('adapter', (<InterfaceClass
cando.virginia.interfaces.ICompetencyReference>, <InterfaceClass
zope.publisher.interfaces.browser.IDefaultBrowserLayer>),
<InterfaceClass zope.app.menus.zmi_views>, u'View')
    File "/home/aelkner/temp/newcando/src/cando/virginia/browser/configure.zcml",
line 111.2-119.8
        <page
            name="index.html"
            for="cando.virginia.interfaces.ICompetencyReference"
            class=".virginia.VirginiaCompetencyView"
            template="templates/virginiacompetency.pt"
            permission="zope.View"
            menu="zmi_views"
            title="View"
            />
    File "/home/aelkner/temp/newcando/src/cando/virginia/browser/configure.zcml",
line 123.2-130.8
        <page
            name="treeindex.html"
            for="cando.virginia.interfaces.ICompetencyReference"
            template="templates/virginiacompetency.pt"
            permission="zope.View"
            menu="zmi_views"
            title="View"
            />

This is probably a result of the newer version of zope, perhaps
something to do with zmi_menus and how they now work?

I attached my diff.  Please advise.
=== modified file 'Makefile'
--- Makefile	2010-03-15 15:01:31 +0000
+++ Makefile	2010-05-07 07:14:42 +0000
@@ -36,7 +36,7 @@
 
 .PHONY: make-instance
 make-instance:
-	bin/make-schooltool-instance instance instance_type=cando.cando2007
+	bin/make-schooltool-instance instance instance_type=cando2007
 
 .PHONY: test
 test: build

=== added file 'base.cfg'
--- base.cfg	1970-01-01 00:00:00 +0000
+++ base.cfg	2010-05-07 05:36:47 +0000
@@ -0,0 +1,35 @@
+[buildout]
+extends = http://ftp.schooltool.org/schooltool/1.4/versions.cfg
+versions = versions
+newest = false
+find-links = http://ftp.schooltool.org/schooltool/1.4/
+             http://ftp.schooltool.org/schooltool/1.4/dev/
+parts = package test scripts tags omelette
+
+[package]
+recipe = zc.recipe.egg:eggs
+unzip = true
+# set eggs to package name in buildout.cfg
+eggs =
+
+[scripts]
+recipe = zc.recipe.egg:scripts
+unzip = true
+eggs = ${package:eggs}
+       schooltool
+       schooltool.devtools
+       z3c.coverage
+       z3c.dependencychecker
+
+[test]
+recipe = zc.recipe.testrunner
+eggs = ${package:eggs}
+defaults = ['--tests-pattern', '^f?tests$', '-v', '--auto-color']
+
+[tags]
+recipe = z3c.recipe.tag:tags
+eggs = ${package:eggs}
+
+[omelette]
+recipe = collective.recipe.omelette
+eggs = ${package:eggs}

=== modified file 'buildout.cfg'
--- buildout.cfg	2009-11-23 16:49:30 +0000
+++ buildout.cfg	2010-05-07 05:52:31 +0000
@@ -1,30 +1,7 @@
 [buildout]
-extends = http://ftp.schooltool.org/schooltool/1.0/versions.cfg
-versions = versions
-find-links = http://ftp.schooltool.org/schooltool/1.0
-use-dependency-links = false
-newest = false
+extends = base.cfg
 develop = .
-parts = cando test scripts tags
-
-[cando]
-recipe = zc.recipe.egg
-unzip = true
-eggs = cando
-
-[scripts]
-recipe = zc.recipe.egg
-unzip = true
-eggs = cando
-       schooltool
-       schooltool.devtools
-       z3c.coverage
-
-[test]
-recipe = zc.recipe.testrunner
-eggs = cando
-defaults = ['--exit-with-status', '--tests-pattern', '^f?tests$', '-v']
-
-[tags]
-recipe = z3c.recipe.tag:tags
-eggs = cando
+
+[package]
+eggs = cando
+

=== modified file 'setup.py'
--- setup.py	2010-03-10 16:43:23 +0000
+++ setup.py	2010-05-07 07:11:41 +0000
@@ -79,12 +79,12 @@
                       'z3c.formjs >= 0.4.1',
                       'zope.app.generations',
                       'zope.app.zcmlfiles',
-                      'schooltool >= 1.0.5',
-                      'schooltool.gradebook',
+                      'schooltool >= 1.3.0',
+                      'schooltool.gradebook>=0.6.0',
                       'PasteDeploy',
                       'PasteScript',
                       'rwproperty'],
-    dependency_links=['http://ftp.schooltool.org/schooltool/1.0'],
+    dependency_links=['http://ftp.schooltool.org/schooltool/1.4/'],
     entry_points = """
     [schooltool.instance_type]
     cando2007 = cando.cando2007

=== modified file 'src/cando/gradebook/browser/student.py'
--- src/cando/gradebook/browser/student.py	2010-03-10 16:43:23 +0000
+++ src/cando/gradebook/browser/student.py	2010-05-07 07:24:19 +0000
@@ -20,7 +20,7 @@
 #
 
 from datetime import datetime
-from zope.app.keyreference.interfaces import IKeyReference
+from zope.keyreference.interfaces import IKeyReference
 from zope.interface import Interface
 import zope.schema
 from zope.publisher.browser import BrowserView

=== modified file 'src/cando/message/message.py'
--- src/cando/message/message.py	2009-08-06 18:50:24 +0000
+++ src/cando/message/message.py	2010-05-07 07:24:54 +0000
@@ -29,7 +29,7 @@
 from zope.publisher.interfaces import NotFound, IPublishTraverse
 from zope.location import location
 from zope.security import proxy
-from zope.app.keyreference.interfaces import IKeyReference
+from zope.keyreference.interfaces import IKeyReference
 
 from schooltool.course.interfaces import ISectionContainer
 from schooltool.person.interfaces import IPerson

=== modified file 'src/cando/message/tests.py'
--- src/cando/message/tests.py	2009-08-13 07:47:35 +0000
+++ src/cando/message/tests.py	2010-05-07 07:24:38 +0000
@@ -27,7 +27,7 @@
 import unittest
 import zope.component
 from zope.testing import doctest
-from zope.app.keyreference.interfaces import IKeyReference
+from zope.keyreference.interfaces import IKeyReference
 from schooltool.relationship import tests as rel_tests
 
 class KeyReferenceStub(object):


Follow ups