You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by se...@apache.org on 2019/10/17 22:11:13 UTC

svn commit: r1868568 - in /comdev/projects.apache.org/trunk: data/committees.xml data/committees/_template.rdf data/committees/singa.rdf data/committees/submarine.rdf scripts/newtlp.py

Author: sebb
Date: Thu Oct 17 22:11:13 2019
New Revision: 1868568

URL: http://svn.apache.org/viewvc?rev=1868568&view=rev
Log:
Script to automate creation of new TLPs; += singa, submarine

Added:
    comdev/projects.apache.org/trunk/data/committees/singa.rdf   (with props)
    comdev/projects.apache.org/trunk/data/committees/submarine.rdf   (with props)
    comdev/projects.apache.org/trunk/scripts/newtlp.py   (with props)
Modified:
    comdev/projects.apache.org/trunk/data/committees.xml
    comdev/projects.apache.org/trunk/data/committees/_template.rdf

Modified: comdev/projects.apache.org/trunk/data/committees.xml
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/trunk/data/committees.xml?rev=1868568&r1=1868567&r2=1868568&view=diff
==============================================================================
--- comdev/projects.apache.org/trunk/data/committees.xml (original)
+++ comdev/projects.apache.org/trunk/data/committees.xml Thu Oct 17 22:11:13 2019
@@ -196,6 +196,7 @@
   <!-- Retired <location>committees-retired/shale.rdf</location> -->
   <!-- Retired <location>committees-retired/shindig.rdf</location> -->
   <location>committees/shiro.rdf</location>
+  <location>committees/singa.rdf</location>
   <location>committees/sis.rdf</location>
   <location>committees/skywalking.rdf</location>
   <location>committees/sling.rdf</location>
@@ -208,6 +209,7 @@
   <!-- Retired <location>committees/stratos.rdf</location> -->
   <location>committees/streams.rdf</location>
   <location>committees/struts.rdf</location>
+  <location>committees/submarine.rdf</location>
   <location>committees/subversion.rdf</location>
   <location>committees/synapse.rdf</location>
   <location>committees/syncope.rdf</location>

Modified: comdev/projects.apache.org/trunk/data/committees/_template.rdf
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/trunk/data/committees/_template.rdf?rev=1868568&r1=1868567&r2=1868568&view=diff
==============================================================================
--- comdev/projects.apache.org/trunk/data/committees/_template.rdf (original)
+++ comdev/projects.apache.org/trunk/data/committees/_template.rdf Thu Oct 17 22:11:13 2019
@@ -20,13 +20,12 @@
          xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
          xmlns:asfext="http://projects.apache.org/ns/asfext#"
          xmlns:foaf="http://xmlns.com/foaf/0.1/">
-  <!-- Replace Xxx with name and xxx with id; yyy comes from board minutes; then delete this line -->
-  <asfext:pmc rdf:about="xxx">
-    <asfext:name>Apache Xxx</asfext:name>
+  <asfext:pmc rdf:about="${id}">
+    <asfext:name>${fullname}</asfext:name>
     <asfext:charter>
-    The mission of Apache Xxx is the creation and maintenance of software
-    related to yyy
+    The mission of ${fullname} is the creation and maintenance of software
+    related to ${description}
     </asfext:charter>
-    <foaf:homepage rdf:resource="http://xxx.apache.org/"/>
+    <foaf:homepage rdf:resource="${site}"/>
   </asfext:pmc>
 </rdf:RDF>

Added: comdev/projects.apache.org/trunk/data/committees/singa.rdf
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/trunk/data/committees/singa.rdf?rev=1868568&view=auto
==============================================================================
--- comdev/projects.apache.org/trunk/data/committees/singa.rdf (added)
+++ comdev/projects.apache.org/trunk/data/committees/singa.rdf Thu Oct 17 22:11:13 2019
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+ 
+       http://www.apache.org/licenses/LICENSE-2.0
+ 
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<rdf:RDF xml:lang="en"
+         xmlns="http://usefulinc.com/ns/doap#" 
+         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
+         xmlns:asfext="http://projects.apache.org/ns/asfext#"
+         xmlns:foaf="http://xmlns.com/foaf/0.1/">
+  <asfext:pmc rdf:about="singa">
+    <asfext:name>Apache SINGA</asfext:name>
+    <asfext:charter>
+    The mission of Apache SINGA is the creation and maintenance of software
+    related to a distributed deep learning platform
+    </asfext:charter>
+    <foaf:homepage rdf:resource="http://singa.apache.org/"/>
+  </asfext:pmc>
+</rdf:RDF>

Propchange: comdev/projects.apache.org/trunk/data/committees/singa.rdf
------------------------------------------------------------------------------
    svn:eol-style = native

Added: comdev/projects.apache.org/trunk/data/committees/submarine.rdf
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/trunk/data/committees/submarine.rdf?rev=1868568&view=auto
==============================================================================
--- comdev/projects.apache.org/trunk/data/committees/submarine.rdf (added)
+++ comdev/projects.apache.org/trunk/data/committees/submarine.rdf Thu Oct 17 22:11:13 2019
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+ 
+       http://www.apache.org/licenses/LICENSE-2.0
+ 
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<rdf:RDF xml:lang="en"
+         xmlns="http://usefulinc.com/ns/doap#" 
+         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
+         xmlns:asfext="http://projects.apache.org/ns/asfext#"
+         xmlns:foaf="http://xmlns.com/foaf/0.1/">
+  <asfext:pmc rdf:about="submarine">
+    <asfext:name>Apache Submarine</asfext:name>
+    <asfext:charter>
+    The mission of Apache Submarine is the creation and maintenance of software
+    related to allowing infrastructure engineers and data scientists to build deep learning applications (TensorFlow, PyTorch, etc.) end to end on cluster management platforms (like YARN/K8s)
+    </asfext:charter>
+    <foaf:homepage rdf:resource="http://submarine.apache.org/"/>
+  </asfext:pmc>
+</rdf:RDF>

Propchange: comdev/projects.apache.org/trunk/data/committees/submarine.rdf
------------------------------------------------------------------------------
    svn:eol-style = native

Added: comdev/projects.apache.org/trunk/scripts/newtlp.py
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/trunk/scripts/newtlp.py?rev=1868568&view=auto
==============================================================================
--- comdev/projects.apache.org/trunk/scripts/newtlp.py (added)
+++ comdev/projects.apache.org/trunk/scripts/newtlp.py Thu Oct 17 22:11:13 2019
@@ -0,0 +1,78 @@
+#!/usr/bin/env python3
+
+"""
+
+Reads:
+data/committees/_template.rdf
+committee-info.txt from Whimsy
+
+Updates:
+data/committees.xml
+
+Creates:
+data/committees/<pmc>.rdf
+
+"""
+
+import sys
+import os.path
+from string import Template
+import re
+import committee_info
+
+# extract committees composition
+print("Reading committee-info")
+committees = committee_info.committees()
+
+datadir = os.path.join(committee_info.COMDEV_HOME,'data')
+rdfdir = os.path.join(datadir,'committees')
+
+
+print("Reading _template.rdf")
+tmpfile = os.path.join(rdfdir,'_template.rdf')
+with open(tmpfile,'r') as t:
+    template = Template(t.read())
+
+
+def update_xml(pid):
+    xmlfile = os.path.join(datadir,'committees.xml')
+    xmlfilet = os.path.join(datadir,'committees.xml.t')
+    print("Updating committees.xml")
+    notYetFound = True
+    with open(xmlfile,'r') as r, open(xmlfilet,'w') as w:
+        for l in r:
+            if notYetFound:
+                m = re.search("^(\s+)<location>committees/(.+)\.rdf<",l)
+                if m:
+                    indent = m.group(1)
+                    mid = m.group(2)
+                    if mid > pid: # found insertion point
+                        w.write("%s<location>committees/%s.rdf</location>\n" % (indent, pid))
+                        notYetFound = False
+                    elif mid == pid:
+                        print("ERROR: File already contains %s" % pid)
+                else:
+                    if l.startswith("</list"): # EOF
+                        w.write("%s<location>committees/%s.rdf</location>\n" % (indent, pid))
+                        notYetFound = False
+            w.write(l) # write the original line
+    os.rename(xmlfilet,xmlfile)
+
+for arg in sys.argv[1:]:
+    print("Processing "+arg)
+    try:
+        cttee = committees[arg]
+        data = {
+            "id": arg,
+            "site": cttee['site'],
+            "fullname": cttee['fullname'],
+            "description": cttee['description'],
+        }
+        out = template.substitute(data)
+        outfile = os.path.join(rdfdir,"%s.%s"%(arg,'rdf'))
+        print("Creating "+outfile)
+        with open(outfile,'w') as o:
+            o.write(out)
+        update_xml(arg)
+    except KeyError:
+        print("Cannot find "+arg)
\ No newline at end of file

Propchange: comdev/projects.apache.org/trunk/scripts/newtlp.py
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: comdev/projects.apache.org/trunk/scripts/newtlp.py
------------------------------------------------------------------------------
    svn:executable = *