[Zope-dev] Re: Proposal: Sanitize HelpSys API Reference, was Re: Reasons for the current API reference docs implementation?

2004-04-05 Thread Casey Duncan
On Sun, 4 Apr 2004 17:50:13 -0400
Paul Winkler [EMAIL PROTECTED] wrote:

 I've posted my proposal:
 http://dev.zope.org/Wikis/DevSite/Proposals/SanitizeHelpSysAndAPIReference

I am 100% for this proposal and I have been thinking on and off about
the same thing for years. I agree that we need to create interfaces
everywhere. With that I propose the following to prevent future help
skew:

- That all interfaces in the system be verified in unittests. 

- We eliminate the duplicate interfaces currently used by the help
system (Some of these are actually fairly up-to-date, so we should look
at them first).

- If we create examples that they be runnable doctests, which are
executed by test.py

The latter may mean we need a better integration test framework, I don't
know. I think we'd need to try out a few and see. I can certainly help
here.

IMO this is a task ripe for a divide and conquer strategy. Maybe we
should have a Help Day to kick this off?

-Casey


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: Proposal: Sanitize HelpSys API Reference, was Re: Reasons for the current API reference docs implementation?

2004-04-05 Thread Paul Winkler
On Mon, Apr 05, 2004 at 09:44:30AM -0400, Casey Duncan wrote:
 On Sun, 4 Apr 2004 17:50:13 -0400
 Paul Winkler [EMAIL PROTECTED] wrote:
 
  I've posted my proposal:
  http://dev.zope.org/Wikis/DevSite/Proposals/SanitizeHelpSysAndAPIReference
 
 I am 100% for this proposal and I have been thinking on and off about
 the same thing for years. I agree that we need to create interfaces
 everywhere. With that I propose the following to prevent future help
 skew:
 
 - That all interfaces in the system be verified in unittests. 

Pardon my ignorance, but what tests can you write for an interface?
 
 - We eliminate the duplicate interfaces currently used by the help
 system (Some of these are actually fairly up-to-date, so we should look
 at them first).

Yep. This was already in my proposal.

 - If we create examples that they be runnable doctests, which are
 executed by test.py
 
 The latter may mean we need a better integration test framework, I don't
 know. I think we'd need to try out a few and see. I can certainly help
 here.

That would be much appreciated. I don't have a clue how to get
the preconditions set up for doctests. 
 
 IMO this is a task ripe for a divide and conquer strategy. Maybe we
 should have a Help Day to kick this off?

good idea! But maybe we should let the proposal simmer at least
a few more days?

-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's COMMODORE FROM OUTER SPACE!
(random hero from isometric.spaceninja.com)

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Proposal: Sanitize HelpSys API Reference, was Re: Reasons for the current API reference docs implementation?

2004-04-05 Thread Casey Duncan
On Mon, 5 Apr 2004 11:00:59 -0400
Paul Winkler [EMAIL PROTECTED] wrote:

 On Mon, Apr 05, 2004 at 09:44:30AM -0400, Casey Duncan wrote:
  On Sun, 4 Apr 2004 17:50:13 -0400
  Paul Winkler [EMAIL PROTECTED] wrote:
  
   I've posted my proposal:
   http://dev.zope.org/Wikis/DevSite/Proposals/SanitizeHelpSysAndAPIReference
  
  I am 100% for this proposal and I have been thinking on and off
  about the same thing for years. I agree that we need to create
  interfaces everywhere. With that I propose the following to prevent
  future help skew:
  
  - That all interfaces in the system be verified in unittests. 
 
 Pardon my ignorance, but what tests can you write for an interface?

You can verify that a class or object implements an interface using the
Verify module of the Interface package. It give you at least some
protection against interface changes. It doesn't protect against all
skew (the object can implement a superset of the interface and still
verify), but it at least performs a sanity check.

Whenever I write tests, the first one is generally an interface check.

It might be nice to think about ways to make this check more rigorous.
For example, methods protected by permissions or marked public should
*always* be part of an interface. We could write a check to make sure
that the interfaces implemented by an object cover all of the published
API of that object. The deep inheritance in Zope2 might make that
tricky, but it's food for thought.

A *very nice* side-affect of all this will be that we will have
interface coverage throughout Zope2 (and at least minimal test coverage
to check the interface). This will obviously help integrating with Zope3
down the line.

-Casey


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: Proposal: Sanitize HelpSys API Reference, was Re: Reasons for the current API reference docs implementation?

2004-04-05 Thread Stephan Richter
On Monday 05 April 2004 11:00, Paul Winkler wrote:
  - If we create examples that they be runnable doctests, which are
  executed by test.py
 
  The latter may mean we need a better integration test framework, I don't
  know. I think we'd need to try out a few and see. I can certainly help
  here.

 That would be much appreciated. I don't have a clue how to get
 the preconditions set up for doctests.

See  zope.testing.docunit (Zope 3). Jim has already written TestSuite class 
for doc tests to which you can pass a setUp and tearDown function.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )