ajack       2003/12/14 09:57:39

  Modified:    template/forrest/src/documentation/content/xdocs site.xml
               python/gump/syndication rss.py
               python/gump/output xref.py
               python/gump/model property.py
               src/documentation/content/xdocs/metadata practices.xml
               python/gump/document forrest.py
  Log:
  1) Reduce verbosity on module RSS
  2) Documentation tweaks
  3) Fix for if bad id on depend.
  
  Revision  Changes    Path
  1.14      +0 -1      
jakarta-gump/template/forrest/src/documentation/content/xdocs/site.xml
  
  Index: site.xml
  ===================================================================
  RCS file: 
/home/cvs/jakarta-gump/template/forrest/src/documentation/content/xdocs/site.xml,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- site.xml  12 Dec 2003 16:49:42 -0000      1.13
  +++ site.xml  14 Dec 2003 17:57:39 -0000      1.14
  @@ -42,7 +42,6 @@
     <stats label="Projects" tab="statistics">
       <index label="by FOG Factor" href="gump_stats/project_fogfactor.html"/>
       <index label="by Elapsed" href="gump_stats/project_elapsed.html"/>
  -    <index label="by Project #" href="gump_stats/project_projects.html"/>
       <index label="by Depends #" href="gump_stats/project_dependencies.html"/>
       <index label="by Dependees #" href="gump_stats/project_dependees.html"/>
     </stats>
  
  
  
  1.10      +11 -9     jakarta-gump/python/gump/syndication/rss.py
  
  Index: rss.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/syndication/rss.py,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- rss.py    9 Dec 2003 00:48:36 -0000       1.9
  +++ rss.py    14 Dec 2003 17:57:39 -0000      1.10
  @@ -318,10 +318,11 @@
                     module.getName(), \
                     ('%sT%s%s') % (datestr,timestr,TZ))
           
  -        # Generate changes
  -        if not s.currentState == STATE_NONE and      \
  -            not s.currentState == STATE_UNSET:   
  -            moduleRSS.addItem(item)  
  +        # Generate changes, only if the module had changed
  +        if module.isUpdated():
  +            if not s.currentState == STATE_NONE and  \
  +                not s.currentState == STATE_UNSET:   
  +                moduleRSS.addItem(item)  
               
           # State changes that are newsworthy...
           if   s.sequenceInState == 1  \
  @@ -366,11 +367,12 @@
                     project.getModule().getName() + ":" + project.getName(), \
                     ('%sT%s%s') % (datestr,timestr,TZ))
   
  -        # Generate changes
  -        if not s.currentState == STATE_NONE and      \
  -            not s.currentState == STATE_UNSET:           
  -            projectRSS.addItem(item)
  -            moduleRSS.addItem(item)  
  +        # Generate changes, only if the module changed
  +        if project.getModule().isUpdated():
  +            if not s.currentState == STATE_NONE and  \
  +                not s.currentState == STATE_UNSET:           
  +                projectRSS.addItem(item)
  +                moduleRSS.addItem(item)  
   
           # State changes that are newsworthy...
           if   s.sequenceInState == 1  \
  
  
  
  1.4       +10 -0     jakarta-gump/python/gump/output/xref.py
  
  Index: xref.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/output/xref.py,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- xref.py   3 Dec 2003 18:36:13 -0000       1.3
  +++ xref.py   14 Dec 2003 17:57:39 -0000      1.4
  @@ -80,6 +80,7 @@
       
           self.repositoryToModule={}
           self.packageToModule={}
  +        self.packageToProject={}
           
           # Build Information Maps
           self.mapRepositories()
  @@ -105,15 +106,24 @@
               
                           if not self.packageToModule.has_key(packageName):
                                   self.packageToModule[packageName]=[]
  +            
  +                        if not self.packageToProject.has_key(packageName):
  +                                self.packageToProject[packageName]=[]
                   
                           # Store
                           if not module in self.packageToModule[packageName]:
                               self.packageToModule[packageName].append(module)
       
  +                        if not project in self.packageToProject[packageName]:
  +                            self.packageToProject[packageName].append(project)
  +    
       def getRepositoryToModuleMap(self):
           return self.repositoryToModule
                   
       def getPackageToModuleMap(self):
           return self.packageToModule
  +        
  +    def getPackageToProjectMap(self):
  +        return self.packageToProject
           
           
  
  
  
  1.8       +6 -7      jakarta-gump/python/gump/model/property.py
  
  Index: property.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/model/property.py,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- property.py       11 Dec 2003 18:56:27 -0000      1.7
  +++ property.py       14 Dec 2003 17:57:39 -0000      1.8
  @@ -114,20 +114,19 @@
                               break
                       else:
                           responsibleParty.addError(   \
  -                            "jar with id %s was not found in project %s " +
  -                                  "referenced by %s") % \
  -                            (self.xml.id, targetProject.getName(), 
project.getName())
  +                            "jar with id %s was not found in project %s ") % \
  +                            (self.xml.id, targetProject.getName())
                   elif targetProject.getJarCount()==1:
                       self.setValue(targetProject.getJars()[0].getPath())
                   elif  targetProject.getJarCount()>1:
                       responsibleParty.addError(       \
  -                        "Multiple jars defined by project %s referenced by %s; " + \
  +                        "Multiple jars defined by project %s; " + \
                           "an id attribute is required to select the one you want") % 
\
  -                          (targetProject.getName(), project.getName())
  +                          (targetProject.getName())
                   else:
                       responsibleParty.addError(       \
  -                        'Project %s referenced by %s defines no jars as output') % \
  -                        (targetProject.getName(), project.getName())      
  +                        'Project %s defines no jars as output') % \
  +                        (targetProject.getName())      
                                   
           elif self.xml.path:
               #
  
  
  
  1.2       +40 -20    
jakarta-gump/src/documentation/content/xdocs/metadata/practices.xml
  
  Index: practices.xml
  ===================================================================
  RCS file: 
/home/cvs/jakarta-gump/src/documentation/content/xdocs/metadata/practices.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- practices.xml     8 Dec 2003 16:34:14 -0000       1.1
  +++ practices.xml     14 Dec 2003 17:57:39 -0000      1.2
  @@ -10,25 +10,54 @@
          </authors>
        </header>
   
  -<body>
  +<body>       
  +     
  +     <section><title>Why good practiceis?</title>
  +             <p>There are a number of reasons why an optimal Gump Descriptor ought 
be
  +                     a goal. Some are to be nice to Gump, and it's resources. Some 
are so
  +                     Gump can be nice to your project.
  +             </p>
  +             <p>In short, don't ask Gump to do more than it needs, and don't put
  +                     barriers in the way of the frequent Gumping of your project. 
  +             </p>
  +     </section>
        
  -     <section><title>Let Gump set your final jar name</title>
  -             <p>Gump runs set @@DATE@@, which ought be set into the
  -             jar name. Use a <link href="ant.html#property">property</link> for 
this.
  -             </p>
  +     <section><title>Ant</title>     
  +             <section><title>Selecting a minimal target</title> 
  +                     <p>Select an ant target (from your build) that minimally 
compiles the code, and creates output jars.
  +                             Try to avoid targets the do full distributions (in 
numerous formats), or does uneccessary work like
  +                             javadoc generation. 
  +                     </p>
  +                     <p>For your *-test project (see 'Separate Test Project') do 
unit tests only.</p>
  +             </section>      
  +             <section><title>Let Gump set your final jar name</title>
  +                     <p>Gump runs set @@DATE@@, which ought be set into the
  +                     jar name. Use a <link href="ant.html#property">property</link> 
for this.
  +                     </p>
  +             </section>
        </section>
        
        <section><title>Dependencies</title>
                <section><title>Use optional dependencies</title>
  -             <p>Use a <link href="project.html#option">property</link> instead of
  -             <link href="project.html#depend">property</link> when at all 
possible.</p>
  -             <p>The less mandatory dependencies a project has the more often it will
  -                     be Gumped, and the better <em>Fried Of Gump</em> it'll be, and
  +             <p>Use a <link href="project.html#option">option</link> instead of
  +             <link href="project.html#depend">depend</link> when at all 
possible.</p>
  +             <p>The fewer mandatory dependencies a project has the more often it 
will
  +                     be Gumped, the better <em>Friend Of Gump</em> it'll be, and
                        will make a much better dependency for downstream projects.</p>
  +             <p>Project often set dependencies on <em>junit</em> or 
<em>checkstyle</em>
  +                     and then fail to even get Gumped to <b>compile</b> when those 
fail.
  +                     Setting those two to optional, and then making the buildfile 
check
  +                     if they are available before attempting the task is a nice way
  +                     to go.</p>              
  +             </section>
  +             <section><title>Depend upon ant with inherit="runtime"</title>  
  +                     <p>This way, you only pick up the jars it needs to run, you 
don't
  +                             need more cluttering the classpath.</p>
                </section>
        </section>
        
  -     <section><title>Separate Test Project</title>
  +     <section><title>Projects</title>
  +             <section><title>Use a separate Test Project</title>
                <p>If at all possible, split your project into (at least) two -- one 
(named <em>your-project</em>) being the main
                        compilation/archive &amp; the other (named 
<em>your-project</em><strong>-test</strong>) that
                        just runs unit tests.
  @@ -39,16 +68,7 @@
                <p>This allows downstream dependees to select which of your projects 
they wish to depend upon. If they depend upon 
                        <em>your-project</em> (and <strong>perhaps optionally</strong> 
on <em>your-project-test</em>) then
                        if some obscure unit test fails still get Gumped &amp; don't 
mis a run.</p>
  -     </section>
  -     
  -     <section><title>Ant</title>     
  -             <section><title>Selecting a minimal target</title> 
  -                     <p>Select an ant target (from your build) that minimally 
compiles the code, and creates output jars.
  -                             Try to avoid targets the do full distributions (in 
numerous formats), or does uneccessary work like
  -                             javadoc generation. 
  -                     </p>
  -                     <p>For your *-test project (see 'Separate Test Project') do 
unit tests only.</p>
  -             </section>
  +             </section>
        </section>
        
   </body>
  
  
  
  1.37      +32 -1     jakarta-gump/python/gump/document/forrest.py
  
  Index: forrest.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/document/forrest.py,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- forrest.py        12 Dec 2003 16:32:51 -0000      1.36
  +++ forrest.py        14 Dec 2003 17:57:39 -0000      1.37
  @@ -1590,7 +1590,7 @@
           document=XDocDocument('Cross Reference',self.resolver.getFile(xref))
       
           document.createParagraph("""
  -        Relationships are what Gump is about, this section shows relationship. 
  +        Gump is about relationships, and this section shows relationship. 
           See side menu for choices.
           """)
       
  @@ -1600,6 +1600,8 @@
           self.documentModulesByRepository(xref, run, workspace, gumpSet)
           self.documentModulesByPackage(xref, run, workspace, gumpSet)
           
  +        self.documentProjectsByPackage(xref, run, workspace, gumpSet)
  +        
           
       def documentModulesByRepository(self,xref,run,workspace,gumpSet):
           document=XDocDocument('Modules By Repository',       \
  @@ -1647,5 +1649,34 @@
                       moduleData.createText(' ')
             
           document.serialize()
  +        
  +    def documentProjectsByPackage(self,xref,run,workspace,gumpSet):
  +        document=XDocDocument('Projects By Package', \
  +            self.resolver.getFile(xref,'package_project.xml'))
  +        
  +        packageTable=document.createTable(['Projects By Package'])
  +        
  +        packageMap=xref.getPackageToProjectMap()
  +        for package in createOrderedList(packageMap.keys()):
  +                            
  +            projectList=createOrderedList(packageMap.get(package)) 
  +            
  +            hasSome=0
  +            for project in projectList:        
  +                if not gumpSet.inSequence(project): continue
  +                hasSome=1
  +                
  +            if hasSome:
  +                packageRow=packageTable.createRow()
  +                packageRow.createData(package)
  +            
  +                projectData=packageRow.createData()
  +                for project in projectList:        
  +                    if not gumpSet.inSequence(project): continue                
  +                    self.insertLink(project, xref, projectData)
  +                    projectData.createText(' ')
  +          
  +        document.serialize()
    
           
  +        
  \ No newline at end of file
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to