As I mentioned during our last meeting, I have created a prototype to automatically create blueprints from the roadmap cards. to run the prototype download the attached files and run roadmaptoBp-v2.py -f linaroRoadmap.csv or roadmaptoBp-v2.py -f linaroRoadmapShort .csv for a quick check.
In order to run the program you have to modify the cookies inside the program with yours. to do so, from firefox menu edit->preferences-> privacy -> 'remove individual cookies" -> search for qastaging -> cut an past your cookie into the program. Cheers, Mounir -- Mounir Bsaibes Project Manager Follow Linaro.org: facebook.com/pages/Linaro/155974581091106 http://twitter.com/#!/linaroorg http://www.linaro.org/linaro-blog <http://www.linaro.org/linaro-blog>
#!/usr/bin/python # Create Launchpad blueprints base on a csv file exported from Liaro Roadmap Kanban board # Author: Mounir Bsaibes <[email protected]> # Credit: Michael Hope <[email protected]> import optparse import os import sys import csv from launchpadlib.launchpad import Launchpad import requests def createBp(card, lp): numberOfFields = len(card) # if number of fields is less than 16, it means the csv line has a problem if numberOfFields < 16: print "error number of fields in the card is less than 16 skipping the card" return else: # field 3 = card type = group so set project accrodingly # if card[3] == "KWG": url = "https://blueprints.qastaging.launchpad.net/linux-linaro/+addspec" project = lp.projects["linux-linaro"] elif card[3] == "TCWG": url = "https://blueprints.qastaging.launchpad.net/gcc-linaro/+addspec" project = lp.projects["gcc-linaro"] elif card[3] == "PMWG": url = "https://blueprints.qastaging.launchpad.net/linaro-power-kernel/+addspec" project = lp.projects["linaro-power-kernel"] else: print "Card type (project) not supported" return print url print project data = { 'field.name': "mbTest-"+card[1], 'field.title': card[4], 'field.summary': card[4], 'field.assignee': "", 'field.drafter': "", 'field.approver': "", 'field.definition_status': "DISCUSSION", 'field.actions.register': 'Register Blueprint' } print "data field" , data print "url is: " print url headers = { 'Referer': url } cookies = { 'qastaging': 'IQqfbYRIA5y-1oigcX8B1e7ic0oqKbw7leZQ9LjYqBZ.YqzqSdyqcg' } # for staging #cookies = {'staging': 'klP2lW08Xqtw1IjEJ5BFxHes98wapOhve-NnBYrUJaAIbJ.gPEqEfs'} n = requests.post(url, headers=headers, data=data, cookies=cookies) #print n.content n.raise_for_status() def parse_csv(file,lp): cardReader = csv.reader(open(file, 'rb'), delimiter=',', quotechar='|') for card in cardReader: NewBp = createBp(card,lp) def main(): optparser = optparse.OptionParser() optparser.add_option('-f', '--file', help='Path to csv file', dest='file', metavar='PATH') (opts, args) = optparser.parse_args() if not opts.file: optparser.error('No csv file is given. usage: program -f csvfilename') else: fileToParse=opts.file print fileToParse lp = Launchpad.login_with(os.path.basename(sys.argv[0]), 'https://api.qastaging.launchpad.net/', version='devel') print "got lp" print lp me = lp.me print me parseResults = parse_csv(fileToParse, lp) if __name__ == "__main__": main()
Column,ID,Title,Card type,Card color,Priority,Assigned to,External,Description,Size Estimate,Tags,Sponsor,Progress [%],Created at,Archived at New / Draft,317751,Thermal management on ARM platforms,KWG,yellow,0,"","",https://linaro-public.papyrs.com/public/4136/,0.0,"","","","September 17, 2011 16:26",""
Column,ID,Title,Card type,Card color,Priority,Assigned to,External,Description,Size Estimate,Tags,Sponsor,Progress [%],Created at,Archived at Legend,295385,Kernel,KWG,blue,0,"","","",0.0,"","","","August 25, 2011 14:40","" Legend,295371,Toolchain,TCWG,orange,0,"","","",0.0,"","","","August 25, 2011 14:37","" Legend,295373,Graphics,GWG,green,0,"","","",0.0,"","","","August 25, 2011 14:37","" Legend,295375,Multimedia,MMWG,light_blue,0,"","","",0.0,"","","","August 25, 2011 14:37","" Legend,295377,Power Management,PMWG,yellow,0,"","","",0.0,"","","","August 25, 2011 14:37","" Legend,295367,Android,Android,red,0,"","","",0.0,"","","","August 25, 2011 14:36","" Legend,295369,Linux & Ubuntu,Linux & Ubuntu,fuchsia,0,"","","",0.0,"","","","August 25, 2011 14:37","" Legend,295365,LAVA,LAVA,strong_red,0,"","","",0.0,"","","","August 25, 2011 14:36","" Legend,295383,OCTO,OCTO,white,0,"","","",0.0,"","","","August 25, 2011 14:40","" Legend,295381,Events & Summits,Summits,turquoise,0,"","","",0.0,"","","","August 25, 2011 14:40","" New / Draft,295921,Fragment-based Kernel Configuration,KWG,blue,0,"","",Research already started in 2011Q3; see https://blueprints.launchpad.net/linux-linaro/+spec/linaro-kernel-o-arm-config-managment,0.0,"","","","August 26, 2011 06:45","" New / Draft,317753,EMMC 4.5 Kernel Support,KWG,blue,0,"","",https://linaro-public.papyrs.com/public/4086/,0.0,"","","","September 17, 2011 16:28","" New / Draft,317705,Initial Cortex-A15 QEMU Support,TCWG,orange,0,"","",https://linaro-public.papyrs.com/public/4105/,0.0,"","Michael Hope, Linaro","","September 17, 2011 09:51","" New / Draft,317707,First Class PGO Support,TCWG,orange,0,"","",https://linaro-public.papyrs.com/public/4106/,0.0,"","Michael Hope, Linaro","","September 17, 2011 09:52","" New / Draft,317709,Initial LLVM Engagement,TCWG,orange,0,"","",https://linaro-public.papyrs.com/public/4107/,0.0,QEMU,"Michael Hope, Linaro","","September 17, 2011 09:53","" New / Draft,317711,End to End STM-based Tracking,TCWG,orange,0,"","",https://linaro-public.papyrs.com/public/4108/,0.0,QEMU,"Michael Hope, Linaro","","September 17, 2011 09:54","" New / Draft,317759,Graphics benchmark dashboard,GWG,green,0,"","",https://linaro-public.papyrs.com/public/4143/,0.0,"","","","September 17, 2011 16:30","" New / Draft,317743,UMM-Enabled Camera demo,MMWG,light_blue,0,"","",https://linaro-public.papyrs.com/public/4156/,0.0,"","","","September 17, 2011 16:22","" New / Draft,317745,UCM for Android,MMWG,light_blue,0,"","",https://linaro-public.papyrs.com/public/4157/,0.0,"","","","September 17, 2011 16:23","" New / Draft,317747,Struct clock consolidation,PMWG,yellow,0,"","",https://linaro-public.papyrs.com/public/4111/,0.0,"","","","September 17, 2011 16:24","" New / Draft,317749,Saving power using multi-core scheduling,PMWG,yellow,0,"","",https://linaro-public.papyrs.com/public/4131/,0.0,"","","","September 17, 2011 16:25","" New / Draft,317751,Thermal management on ARM platforms,PMWG,yellow,0,"","",https://linaro-public.papyrs.com/public/4136/,0.0,"","","","September 17, 2011 16:26","" New / Draft,317719,Device Tree for Android LEB,Android,red,0,"","",https://linaro-public.papyrs.com/public/4112/,0.0,"","","","September 17, 2011 15:43","" New / Draft,317721,sched_mc full idle support for Android,Android,red,0,"","",https://linaro-public.papyrs.com/public/4113/,0.0,"","","","September 17, 2011 15:45","" New / Draft,317723,LEB Acceleration with proprietary binary overlays,Android,red,0,"","",https://linaro-public.papyrs.com/public/4114/,0.0,"","","","September 17, 2011 15:47","" New / Draft,317725,Linux Developer Tools for Android 1,Android,red,0,"","",https://linaro-public.papyrs.com/public/4115/,0.0,"","","","September 17, 2011 16:07","" New / Draft,317729,Linux Middleware layer tests,Linux & Ubuntu,fuchsia,0,"","",https://linaro-public.papyrs.com/public/4119/,0.0,"","","","September 17, 2011 16:14","" New / Draft,317737,Continuous Integration: Images and toolchain packages,Linux & Ubuntu,fuchsia,0,"","",https://linaro-public.papyrs.com/public/4120/,0.0,"","","","September 17, 2011 16:18","" New / Draft,317739,Multi-touch Linux User Experience,Linux & Ubuntu,fuchsia,0,"","",https://linaro-public.papyrs.com/public/4121/,0.0,"","","","September 17, 2011 16:20","" New / Draft,317741,Debug and developer friendly Ubuntu images,Linux & Ubuntu,fuchsia,0,"","",https://linaro-public.papyrs.com/public/4122/,0.0,"","","","September 17, 2011 16:21","" New / Draft,317727,Continuous Kernel Testing in LAVA,LAVA,strong_red,0,"","",https://linaro-public.papyrs.com/public/4116/,0.0,"","","","September 17, 2011 16:07","" New / Draft,317731,Linaro Dashboard User Experience,LAVA,strong_red,0,"","",https://linaro-public.papyrs.com/public/4117/,0.0,"","","","September 17, 2011 16:14","" New / Draft,317733,Toolchain testing in LAVA Lab,LAVA,strong_red,0,"","",https://linaro-public.papyrs.com/public/4124/,0.0,"","","","September 17, 2011 16:15","" New / Draft,317735,LAVA lab hardware test instruments (Part 1),LAVA,strong_red,0,"","",https://linaro-public.papyrs.com/public/4137/,0.0,"","","","September 17, 2011 16:17","" New / Draft,317755,Hard float ABI benchmarks,OCTO,white,0,"","",https://linaro-public.papyrs.com/public/4109/,0.0,"","","","September 17, 2011 16:29","" New / Draft,317757,UEFI Kernel compatibility testing,OCTO,white,0,"","",https://linaro-public.papyrs.com/public/4110/,0.0,"","","","September 17, 2011 16:30","" 2011Q3 / Ready,295907,Kernel Consolidation: Phase I,KWG,blue,0,"","","DT, gpio, pinmux, irq_domain, struct clk",0.0,"","","","August 26, 2011 06:39","" 2011Q3 / Ready,295915,Storage Performance: Phase I,KWG,blue,0,"","","",0.0,"","","","August 26, 2011 06:42","" 2011Q3 / Ready,295923,Complete Thumb2 Kernel Support,KWG,blue,0,"","","",0.0,"","","","August 26, 2011 06:49","" 2011Q3 / Delivered,296521,"Linaro Connect - Cambourne, UK 1st - 5th Aug",Summits,turquoise,0,"","","",0.0,"","","","August 26, 2011 13:04","" 2011Q4 / Ready,296517,"Linaro Connect - Orlando, USA 31st Oct - 4th Nov",Summits,turquoise,0,"","","",0.0,"","","","August 26, 2011 12:58","" 2012Q1 / Planned,296523,"Linaro Connect - San Francisco, USA 6th - 10th Feb",Summits,turquoise,0,"","","",0.0,"","","","August 26, 2011 13:08","" 2012Q2 / Planned,296525,"Linaro Connect - TBA, USA",Summits,turquoise,0,"","","",0.0,"","","","August 26, 2011 13:09",""
_______________________________________________ Mailing list: https://launchpad.net/~linaro-project-management Post to : [email protected] Unsubscribe : https://launchpad.net/~linaro-project-management More help : https://help.launchpad.net/ListHelp

