rem stringlengths 0 322k | add stringlengths 0 2.05M | context stringlengths 8 228k |
|---|---|---|
resdata = serialize(filteredResources, combinedImages, resdata) | resdata = serialize(filteredResources, combinedImages, resdata) addResourcesToPackages(resdata, combinedImages, classToResourceMap) if resources_tree: resdata = resdata.getData() | def incorporateCombinedImages(filteredResources, combinedImages): for combId, combImg in combinedImages.items(): # combImg.embeds = {resId : ImgFmt} filteredResourceIds = filteredResources.keys() for embId in requiredEmbeds(combImg, filteredResourceIds): # patch simle image info lib = filteredResources[embId].lib ... |
lib = self._libs[namespace] self._locale.updateTranslations(namespace, os.path.join(lib['path'],lib['translation']), locales) | lib = [x for x in self._libraries if x.namespace == namespace][0] self._locale.updateTranslations(namespace, lib._translationPath, locales) | def runUpdateTranslation(self): namespaces = self._job.get("translate/namespaces") if not namespaces: return |
def lintCheckAll(self): for libraryName, library in self.libraries.iteritems(): for versionName, libraryVersion in library.children.iteritems(): console.info("Lint results for %s %s:" %(libraryName, versionName)) result = libraryVersion.getLintResult() logLintResult(result) | def buildAllTestrunners(self, job="test"): console.indent() for libraryName, library in self.libraries.iteritems(): for versionName, libraryVersion in library.children.iteritems(): libraryVersion.buildTestrunner(job) console.outdent() | |
"classname": libraryName, "tests": [] | "classname": libraryName, "children" : [] | def buildAllDemos(self, demoVersion="build", demoBrowser=None, copyDemos=False): if demoBrowser: demoBrowser = os.path.abspath(demoBrowser) console.info("Generating demos for all known libraries") demoData = [] console.indent() for libraryName in self.libraries: library = self.libraries[libraryName] libraryData = { "c... |
libraryData["tests"].append(self.getDemoData(libraryName, versionName, variant)) | versionData["tests"].append(self.getDemoData(libraryName, versionName, variant)) | def buildAllDemos(self, demoVersion="build", demoBrowser=None, copyDemos=False): if demoBrowser: demoBrowser = os.path.abspath(demoBrowser) console.info("Generating demos for all known libraries") demoData = [] console.indent() for libraryName in self.libraries: library = self.libraries[libraryName] libraryData = { "c... |
targetDir = os.path.join(demoBrowser, demoVersion, "demo", libraryName) | targetDir = os.path.join(demoBrowser, demoVersion, "demo", libraryName, versionName) | def copyHtmlFile(self, libraryName, versionName, variantName, demoVersion, demoBrowser, local=False): #get some needed info from the demobrowser's manifest dbManifest = getDataFromJsonFile(os.path.join(demoBrowser, "Manifest.json")) dbResourcePath = dbManifest["provides"]["resource"] dbNamespace = dbManifest["provides"... |
targetFilePath = os.path.join(targetDir, versionName + "-" + variantName + ".html") | targetFilePath = os.path.join(targetDir, variantName + ".html") | def copyHtmlFile(self, libraryName, versionName, variantName, demoVersion, demoBrowser, local=False): #get some needed info from the demobrowser's manifest dbManifest = getDataFromJsonFile(os.path.join(demoBrowser, "Manifest.json")) dbResourcePath = dbManifest["provides"]["resource"] dbNamespace = dbManifest["provides"... |
demoUrl = "/".join([versionName, variantName, demoVersion]) | demoUrl = "/".join([variantName, demoVersion]) | def copyHtmlFile(self, libraryName, versionName, variantName, demoVersion, demoBrowser, local=False): #get some needed info from the demobrowser's manifest dbManifest = getDataFromJsonFile(os.path.join(demoBrowser, "Manifest.json")) dbResourcePath = dbManifest["provides"]["resource"] dbNamespace = dbManifest["provides"... |
demoUrl = "../../../" + self.getDemoUrl(demoBrowser, demoPath) | demoUrl = "../../../../" + self.getDemoUrl(demoBrowser, demoPath) | def copyHtmlFile(self, libraryName, versionName, variantName, demoVersion, demoBrowser, local=False): #get some needed info from the demobrowser's manifest dbManifest = getDataFromJsonFile(os.path.join(demoBrowser, "Manifest.json")) dbResourcePath = dbManifest["provides"]["resource"] dbNamespace = dbManifest["provides"... |
"name": version + "-" + variant + ".html", | "name": variant + ".html", | def getDemoData(self, library, version, variant): demoDict = { "name": version + "-" + variant + ".html", "nr": variant.capitalize(), "tags": [library], "title": library + " " + version + " " + variant, "manifest" : self.libraries[library][version].getManifest() } qooxdooVersions = self.libraries[library][version].get... |
"title": library + " " + version + " " + variant, "manifest" : self.libraries[library][version].getManifest() | "title": library + " " + version + " " + variant | def getDemoData(self, library, version, variant): demoDict = { "name": version + "-" + variant + ".html", "nr": variant.capitalize(), "tags": [library], "title": library + " " + version + " " + variant, "manifest" : self.libraries[library][version].getManifest() } qooxdooVersions = self.libraries[library][version].get... |
return self.tokens[self.parsepos] | return self._curr | def curr (self): """Returns the current token.""" return self.tokens[self.parsepos] |
return self.curr()["type"] | return self._curr["type"] | def currType (self): return self.curr()["type"] |
return self.curr()["detail"] | return self._curr["detail"] | def currDetail (self): return self.curr()["detail"] |
return self.curr()["source"] | return self._curr["source"] | def currSource (self): return self.curr()["source"] |
return self.curr()["line"] | return self._curr["line"] | def currLine (self): return self.curr()["line"] |
return self.curr()["column"] | return self._curr["column"] | def currColumn (self): return self.curr()["column"] |
return self.curr()["multiline"] | return self._curr["multiline"] | def currMultiline (self): return self.curr()["multiline"] |
return self.curr()["connection"] | return self._curr["connection"] | def currConnection (self): return self.curr()["connection"] |
length = len(self.tokens) | def next (self, item=None, after=False): length = len(self.tokens) self.eolBefore = False self.breakBefore = False | |
while self.parsepos < length - 1: | while self.parsepos < self.length - 1: | def next (self, item=None, after=False): length = len(self.tokens) self.eolBefore = False self.breakBefore = False |
token = self.tokens[self.parsepos] | self._curr = self.tokens[self.parsepos] token = self._curr | def next (self, item=None, after=False): length = len(self.tokens) self.eolBefore = False self.breakBefore = False |
if not token.has_key("inserted") or not token["inserted"]: | if "inserted" not in token or not token["inserted"]: | def next (self, item=None, after=False): length = len(self.tokens) self.eolBefore = False self.breakBefore = False |
return self.tokens[length - 1] | return self.tokens[self.length - 1] | def next (self, item=None, after=False): length = len(self.tokens) self.eolBefore = False self.breakBefore = False |
length = len(self.tokens) | def comment (self, item, after=False): length = len(self.tokens) | |
while pos < length - 1: | while pos < self.length - 1: | def comment (self, item, after=False): length = len(self.tokens) |
if token["type"] == "comment" and token["connection"] == "after" and (not token.has_key("inserted") or not token["inserted"]): | if token["type"] == "comment" and token["connection"] == "after" and ("inserted" not in token or not token["inserted"]): | def comment (self, item, after=False): length = len(self.tokens) |
self._console.info("Cleaning compile cache, as tool chain is newer") | self._console.info("Cleaning compile cache, as tool chain has changed") | def _assureCacheIsValid(self, ): self._toolChainIsNewer = self._checkToolsNewer() if self._toolChainIsNewer: if self._context['jobconf'].get("cache/invalidate-on-tool-change", False): self._console.info("Cleaning compile cache, as tool chain is newer") self.cleanCompileCache() # will also remove checkFile else: self._... |
self._console.warn("! Detected newer tool chain; you might want to clear the cache.") | self._console.warn("! Detected changed tool chain; you might want to clear the cache.") | def _assureCacheIsValid(self, ): self._toolChainIsNewer = self._checkToolsNewer() if self._toolChainIsNewer: if self._context['jobconf'].get("cache/invalidate-on-tool-change", False): self._console.info("Cleaning compile cache, as tool chain is newer") self.cleanCompileCache() # will also remove checkFile else: self._... |
elif self._cache_revision > cacheRevision: return True | elif self._cache_revision != cacheRevision: return True | def _checkToolsNewer(self, ): cacheRevision = self.getCacheFileVersion() if not cacheRevision: return True elif self._cache_revision > cacheRevision: return True # current caches rev is lower than that of the Cache class else: return False |
excRegex = re.compile(".") | excRegex = re.compile("^$") | def getFilteredClassList(classes, includePatt_, excludePatt_): # Although lint-check doesn't work with dependencies, we allow # '=' in class pattern for convenience; stripp those now intelli, explicit = self._splitIncludeExcludeList(includePatt_) includePatt = intelli + explicit intelli, explicit = self._splitIncludeEx... |
def buildAllDemos(self, demoVersion="build", demoBrowser=None, copyDemos=False): | def buildAllDemos(self, buildTarget="build", demoBrowser=None, copyDemos=False): | def buildAllDemos(self, demoVersion="build", demoBrowser=None, copyDemos=False): if demoBrowser: demoBrowser = os.path.abspath(demoBrowser) console.info("Generating demos for all known libraries") repositoryData = [] console.indent() for libraryName in self.libraries: library = self.libraries[libraryName] libraryData ... |
"tags" : [libraryName], | def buildAllDemos(self, demoVersion="build", demoBrowser=None, copyDemos=False): if demoBrowser: demoBrowser = os.path.abspath(demoBrowser) console.info("Generating demos for all known libraries") repositoryData = [] console.indent() for libraryName in self.libraries: library = self.libraries[libraryName] libraryData ... | |
qooxdooVersions = version.getManifest()["info"]["qooxdoo-versions"] for ver in qooxdooVersions: versionData["tags"].append("qxVersion_" + ver) | qxVersions = version.getManifest()["info"]["qooxdoo-versions"] | def buildAllDemos(self, demoVersion="build", demoBrowser=None, copyDemos=False): if demoBrowser: demoBrowser = os.path.abspath(demoBrowser) console.info("Generating demos for all known libraries") repositoryData = [] console.indent() for libraryName in self.libraries: library = self.libraries[libraryName] libraryData ... |
demoVariants = version.getDemoVariants() if not demoVariants: continue for variant in demoVariants: if variant == "source" or variant == "build": continue status = version.buildDemo(variant, demoVersion) if demoBrowser and not status["buildError"]: | buildStatus = [] for variant in version.demos: if buildTarget == "build": for qxVersion in qxVersions: macro = { "BUILD_PATH" : "./" + qxVersion, "QOOXDOO_PATH" : "../../../../qooxdoo/" + qxVersion } status = variant.build("build", macro) status["qxVersion"] = qxVersion status["variant"] = variant.name buildStatus.ap... | def buildAllDemos(self, demoVersion="build", demoBrowser=None, copyDemos=False): if demoBrowser: demoBrowser = os.path.abspath(demoBrowser) console.info("Generating demos for all known libraries") repositoryData = [] console.indent() for libraryName in self.libraries: library = self.libraries[libraryName] libraryData ... |
sourceDir = os.path.join(version.path, "demo", variant, demoVersion) targetDir = os.path.join(demoBrowser, demoVersion, "demo", libraryName, versionName, variant) copier = CopyTool() copier.parse_args(["-u", sourceDir, targetDir]) copier.do_work() self.copyHtmlFile(libraryName, versionName, variant, demoVersion, demoB... | demoBrowserBase = os.path.split(demoBrowser)[0] for demoStatus in buildStatus: qxVersion = demoStatus["qxVersion"] if demoStatus["buildError"]: console.warn("%s %s demo %s %s generation against qooxdoo %s failed!" %(libraryName, versionName, variant.name, buildTarget, qxVersion)) console.warn(demoStatus["buildError"]) ... | def buildAllDemos(self, demoVersion="build", demoBrowser=None, copyDemos=False): if demoBrowser: demoBrowser = os.path.abspath(demoBrowser) console.info("Generating demos for all known libraries") repositoryData = [] console.indent() for libraryName in self.libraries: library = self.libraries[libraryName] libraryData ... |
self.copyHtmlFile(libraryName, versionName, variant, demoVersion, demoBrowser) | self.copyHtmlFile(libraryName, versionName, variant.name, buildTarget, demoBrowser) demoData = self.getDemoData(libraryName, versionName, variant.name) versionData["tests"].append(demoData) | def buildAllDemos(self, demoVersion="build", demoBrowser=None, copyDemos=False): if demoBrowser: demoBrowser = os.path.abspath(demoBrowser) console.info("Generating demos for all known libraries") repositoryData = [] console.indent() for libraryName in self.libraries: library = self.libraries[libraryName] libraryData ... |
demoData = self.getDemoData(libraryName, versionName, variant) demoData["manifest"] = version.getDemoManifest(variant) versionData["tests"].append(demoData) validDemo = True if validDemo: | def buildAllDemos(self, demoVersion="build", demoBrowser=None, copyDemos=False): if demoBrowser: demoBrowser = os.path.abspath(demoBrowser) console.info("Generating demos for all known libraries") repositoryData = [] console.indent() for libraryName in self.libraries: library = self.libraries[libraryName] libraryData ... | |
dbScriptDir = os.path.join(demoBrowser, demoVersion, "script") | dbTargetDir = os.path.join(demoBrowser) if not os.path.isdir(dbTargetDir): os.mkdir(dbTargetDir) dbScriptDir = os.path.join(dbTargetDir, "script") | def buildAllDemos(self, demoVersion="build", demoBrowser=None, copyDemos=False): if demoBrowser: demoBrowser = os.path.abspath(demoBrowser) console.info("Generating demos for all known libraries") repositoryData = [] console.indent() for libraryName in self.libraries: library = self.libraries[libraryName] libraryData ... |
def runGeneratorForAll(self, job, subPath=None, cwd=False): | def runGeneratorForAll(self, job, cwd=False): | def runGeneratorForAll(self, job, subPath=None, cwd=False): console.indent() for libraryName, library in self.libraries.iteritems(): for versionName, libraryVersion in library.iteritems(): console.info("Running job %s on %s %s..." %(job, libraryName, versionName)) ret, out, err = libraryVersion.runGenerator(job, subPat... |
ret, out, err = libraryVersion.runGenerator(job, subPath, cwd) | ret, out, err = libraryVersion.runGenerator(job, cwd) | def runGeneratorForAll(self, job, subPath=None, cwd=False): console.indent() for libraryName, library in self.libraries.iteritems(): for versionName, libraryVersion in library.iteritems(): console.info("Running job %s on %s %s..." %(job, libraryName, versionName)) ret, out, err = libraryVersion.runGenerator(job, subPat... |
def copyHtmlFile(self, libraryName, versionName, variantName, demoVersion, demoBrowser, local=False): | def copyHtmlFile(self, libraryName, versionName, variantName, demoVersion, demoBrowser, qxVersion, local=False): | def copyHtmlFile(self, libraryName, versionName, variantName, demoVersion, demoBrowser, local=False): #get some needed info from the demobrowser's manifest dbManifest = getDataFromJsonFile(os.path.join(demoBrowser, "Manifest.json")) dbResourcePath = dbManifest["provides"]["resource"] dbNamespace = dbManifest["provides"... |
targetDir = os.path.join(demoBrowser, demoVersion, "demo", libraryName, versionName) | targetDir = os.path.join(demoBrowser, demoVersion, "demo", libraryName, versionName, variantName, qxVersion) | def copyHtmlFile(self, libraryName, versionName, variantName, demoVersion, demoBrowser, local=False): #get some needed info from the demobrowser's manifest dbManifest = getDataFromJsonFile(os.path.join(demoBrowser, "Manifest.json")) dbResourcePath = dbManifest["provides"]["resource"] dbNamespace = dbManifest["provides"... |
targetFilePath = os.path.join(targetDir, variantName + ".html") | targetFilePath = os.path.join(targetDir, "index.html") | def copyHtmlFile(self, libraryName, versionName, variantName, demoVersion, demoBrowser, local=False): #get some needed info from the demobrowser's manifest dbManifest = getDataFromJsonFile(os.path.join(demoBrowser, "Manifest.json")) dbResourcePath = dbManifest["provides"]["resource"] dbNamespace = dbManifest["provides"... |
def getDemoData(self, library, version, variant): | def getDemoData(self, library, version, variant, qxVersion): | def getDemoData(self, library, version, variant): demoDict = { "name": variant + ".html", "nr": variant.capitalize(), "title": library + " " + version + " " + variant } |
"name": variant + ".html", | "name": variant + "." + qxVersion + ".html", | def getDemoData(self, library, version, variant): demoDict = { "name": variant + ".html", "nr": variant.capitalize(), "title": library + " " + version + " " + variant } |
"title": library + " " + version + " " + variant | "title": library + " " + version + " " + variant, "tags" : [ library, "qxVersion_" + qxVersion ] | def getDemoData(self, library, version, variant): demoDict = { "name": variant + ".html", "nr": variant.capitalize(), "title": library + " " + version + " " + variant } |
self.demoVariants = self.getDemoVariants() | if self.hasDemoDir: self.demos = self.getDemos() else: self.demos = [] | def __init__(self, versionName, libraryName, path): self.versionName = versionName self.libraryName = libraryName self.path = path self.checkStructure() self.demoVariants = self.getDemoVariants() self.demoBuildStatus = {} |
self.demoVariants = self.getDemoVariants() | def checkStructure(self): self.hasDemoDir = False self.demoVariants = [] if os.path.isdir(os.path.join(self.path, "demo")): self.hasDemoDir = True self.demoVariants = self.getDemoVariants() self.hasReadmeFile = False if os.path.isfile(os.path.join(self.path, "README")): self.hasReadmeFile = True self.hasGenerator = F... | |
def getDemoVariants(self): | def getDemos(self): | def getDemoVariants(self): if not self.hasDemoDir: return False demoVariants = [] demoPath = os.path.join(self.path, "demo") for root, dirs, files in filetool.walk(demoPath, topdown=True): for name in dirs: if root == demoPath and name[0] != ".": demoVariants.append(name) return demoVariants |
demoVariants = [] | demos = [] | def getDemoVariants(self): if not self.hasDemoDir: return False demoVariants = [] demoPath = os.path.join(self.path, "demo") for root, dirs, files in filetool.walk(demoPath, topdown=True): for name in dirs: if root == demoPath and name[0] != ".": demoVariants.append(name) return demoVariants |
if root == demoPath and name[0] != ".": demoVariants.append(name) return demoVariants def runGenerator(self, job, subPath=None): if not self.hasGenerator: raise Exception("%s %s has no generate.py script!" %(self.libraryName, self.versionName)) path = self.path if subPath: path = os.path.join(path, subPath) startPat... | if root == demoPath and name[0] != "." and name != "source" and name != "build": foundPath = os.path.join(demoPath, name) foundDemo = Demo(name, foundPath, self) demos.append(foundDemo) return demos class Demo: def __init__(self, name, path, libraryVersion): self.name = name self.path = path self.libraryVersion = li... | def getDemoVariants(self): if not self.hasDemoDir: return False demoVariants = [] demoPath = os.path.join(self.path, "demo") for root, dirs, files in filetool.walk(demoPath, topdown=True): for name in dirs: if root == demoPath and name[0] != ".": demoVariants.append(name) return demoVariants |
demoBuildStatus["svnRevision"] = self.getSvnRevision() except: pass if not self.hasDemoDir: msg = "Library %s version %s has no demo folder!" %(self.library.dir, self.dir) console.error(msg) demoBuildStatus["buildError"] = msg return demoBuildStatus console.info("Generating %s version of demo variant %s for library %... | rcode, output, errout = runGenerator(self.path, target, macro) | def buildDemo(self, demoVariant = "default", demoVersion = "build"): demoBuildStatus = {} try: demoBuildStatus["svnRevision"] = self.getSvnRevision() except: pass if not self.hasDemoDir: msg = "Library %s version %s has no demo folder!" %(self.library.dir, self.dir) console.error(msg) demoBuildStatus["buildError"] = m... |
demoScriptPath = os.path.join(self.path, "demo", demoVariant, demoVersion, "script") hasScriptDir = os.path.isdir(demoScriptPath) | def buildDemo(self, demoVariant = "default", demoVersion = "build"): demoBuildStatus = {} try: demoBuildStatus["svnRevision"] = self.getSvnRevision() except: pass if not self.hasDemoDir: msg = "Library %s version %s has no demo folder!" %(self.library.dir, self.dir) console.error(msg) demoBuildStatus["buildError"] = m... | |
elif not hasScriptDir: console.write("") console.warn("No script directory created!") demoBuildStatus["buildError"] = "No script directory created" | def buildDemo(self, demoVariant = "default", demoVersion = "build"): demoBuildStatus = {} try: demoBuildStatus["svnRevision"] = self.getSvnRevision() except: pass if not self.hasDemoDir: msg = "Library %s version %s has no demo folder!" %(self.library.dir, self.dir) console.error(msg) demoBuildStatus["buildError"] = m... | |
console.write("Done.", "info") | def buildDemo(self, demoVariant = "default", demoVersion = "build"): demoBuildStatus = {} try: demoBuildStatus["svnRevision"] = self.getSvnRevision() except: pass if not self.hasDemoDir: msg = "Library %s version %s has no demo folder!" %(self.library.dir, self.dir) console.error(msg) demoBuildStatus["buildError"] = m... | |
self.demoBuildStatus = demoBuildStatus | def buildDemo(self, demoVariant = "default", demoVersion = "build"): demoBuildStatus = {} try: demoBuildStatus["svnRevision"] = self.getSvnRevision() except: pass if not self.hasDemoDir: msg = "Library %s version %s has no demo folder!" %(self.library.dir, self.dir) console.error(msg) demoBuildStatus["buildError"] = m... | |
if fileId in ("qx.Theme", "qx.Interface", "qx.Mixin"): pass else: self._console.warn("%s: | self._console.warn("%s: | def buildShallowDeps(): # Notes: # load time = before class = require # runtime = after class = use |
if url.startswith(":") or url.startswith("documentation"): | if (url.startswith(":") or url.startswith("documentation") or url.startswith("about")): | def internalLink(url): # wiki links are all-lowercase url = url.lower() # manual url if url.find(ns12)>-1: url = url[url.find(ns12)+len(ns12):] if currentInput.endswith("index.txt"): url = "pages/" + url # wiki url else: if url.startswith(".:"): url = url[2:] if url.startswith("."): url = url[1:] if url.startswith(":")... |
def absolutizeUrl(url): | def absolutizeUrl(url, withext=False): | def absolutizeUrl(url): # generator_config_articles#packages_key -> pages/tool/generator_config_article#packages_key # force all-lowercase url = url.lower() if url.find('#'): # strip fragment id fragment = url[url.find('#'):] base = url[:url.find('#')] else: fragment = "" base = url for knownbase in fileset: if kn... |
if url.startswith("path/"): | url = absolutizeUrl(url, withext=True) if url.startswith("pages/"): | def convertToRst_I(s,l,t): import random # split text and url i = t[0].find("|") if i>-1: url = t[0][:i] text= t[0][i+1:] else: url = t[0] text= "" text = text.strip() # remove trailing artifacts url = re.sub(r'\?.*$', '', url) # Handle url if url.startswith("http://"): pass # handle document:1.2: elif url.find(ns12)>... |
if os.path.isfile(sys.argv[1]): currentInput = sys.argv[1] dirroot = os.path.dirname(sys.argv[1]) or '.' wikiInput = codecs.open(sys.argv[1], "rU", "utf-8").read() | if len(sys.argv)>2: if os.path.isfile(sys.argv[2]): currentInput = sys.argv[2] dirroot = os.path.dirname(sys.argv[1]) or '.' wikiInput = codecs.open(sys.argv[2], "rU", "utf-8").read() | def main(path): assert(os.path.isdir(path)) global dirroot dirroot = path for root,dirs,files in os.walk(path): for file in (f for f in files if f.endswith(".txt")): transform(os.path.join(root,file)) |
for res in allresources: | numResources = len(allresources) for num,res in enumerate(allresources): context.console.progress(num+1, numResources) | def copyResource(res, library): sourcepath = os.path.join(library._resourcePath, res) targetpath = approot + "/resource/" + res filetool.directory(os.path.dirname(targetpath)) shutil.copy(sourcepath, targetpath) return |
print("ERROR: Unable to import JSON module: " + repr(e)) | self.log("ERROR: Unable to import JSON module: " + repr(e)) | def reportResults(self, aut, start_date, log_file): from simulationLogParser import SimulationLogParser if (self.sim): self.log("SIMULATION: Getting report data for " + aut) return else: self.log("Getting report data for " + aut) try: import json except ImportError, e: try: import simplejson as json except ImportErro... |
print("ERROR: Unable to contact report server " + errMsg) return | self.log("ERROR: Unable to contact report server %s" %errMsg) return | def reportResults(self, aut, start_date, log_file): from simulationLogParser import SimulationLogParser if (self.sim): self.log("SIMULATION: Getting report data for " + aut) return else: self.log("Getting report data for " + aut) try: import json except ImportError, e: try: import simplejson as json except ImportErro... |
if (e.args): errMsg = repr(e.args) print("ERROR: Unable to send report data " + errMsg) | if (e.code): errMsg = repr(e.code) self.log("ERROR: Report server couldn't store report: %s" %errMsg) | def reportResults(self, aut, start_date, log_file): from simulationLogParser import SimulationLogParser if (self.sim): self.log("SIMULATION: Getting report data for " + aut) return else: self.log("Getting report data for " + aut) try: import json except ImportError, e: try: import simplejson as json except ImportErro... |
print("Writing new config to file: " + configFilePath) | self.log("Writing new config to file: " + configFilePath) | def editConfigJson(self, configFilePath=None, newConfig=None): import demjson if not configFilePath or not newConfig: raise Exception("Missing parameter for editJobConfig!") self.log("Editing config file " + configFilePath) configFile = codecs.open(configFilePath, 'r', 'utf-8') configJson = configFile.read() configFi... |
print(name) | def unzipToDir(self, file, dir): import zipfile try: if not os.path.isdir(dir): os.mkdir(dir) except Exception, e: self.logError(e, "Creating directory " + dir) zfobj = zipfile.ZipFile(file) # The first entry in the zip file's name list is the top qooxdoo directory topDirName = zfobj.namelist()[0] topDir = os.path.jo... | |
if not os.path.exists(os.path.dirname(combined)): os.makedirs(os.path.dirname(combined)) | filetool.directory(os.path.dirname(combined)) | def combine(self, combined, files, horizontal): self._console.indent() montage_cmd = "montage -geometry +0+0 -gravity NorthWest -tile %s -background None %s %s" if horizontal: orientation = "x1" else: orientation = "1x" |
def reduceAssembled(self, assembled, node): assembledId = '' if assembled in self._classesObj: assembledId = assembled elif "." in assembled: parts = assembled.split(".") p = gen_namespaces found = [] for part in parts: if part in p: found.append(part) p = p[part] else: break if found: assembledId = ".".join(found) r... | def reduceAssembled(self, assembled, node): # try to deduce a qooxdoo class from <assembled> assembledId = '' if assembled in self._classesObj: assembledId = assembled elif "." in assembled: parts = assembled.split(".") p = gen_namespaces found = [] for part in parts: if part in p: found.append(part) p = p[part] else: ... | |
assembledId = self.reduceAssembled(assembled, node) | def _analyzeClassDepsNode(self, node, loadtime, runtime, inFunction, variants): | |
cache = self.context["cache"] cacheId = "class-%s" % (self.path,) classinfo, _ = cache.readmulti(cacheId, self.path) | classinfo, _ = self._getClassCache() | def classVariants(self, generate=True): |
deps, cacheModTime = cache.readmulti(cacheId, self.path) | classInfo, cacheModTime = self._getClassCache() deps = classInfo[cacheId] if cacheId in classInfo else None | def transitiveDepsAreFresh(depsStruct, cacheModTime): if cacheModTime is None: # TODO: this can currently only occur with a Cache.memcache result return False for dep in depsStruct["load"]: if dep.requestor != self.id: # this was included through a recursive traversal if dep.name in self._classesObj: classObj = self._... |
cache.writemulti(cacheId, deps) | classInfo[cacheId] = deps self._writeClassCache(classInfo) | def transitiveDepsAreFresh(depsStruct, cacheModTime): if cacheModTime is None: # TODO: this can currently only occur with a Cache.memcache result return False for dep in depsStruct["load"]: if dep.requestor != self.id: # this was included through a recursive traversal if dep.name in self._classesObj: classObj = self._... |
elif key.isupper(): | elif not key[:2] == "$$": | def handleStatics(item, classNode): for key, value in mapNodeToMap(item).items(): keyvalue = value.parent value = value.getFirstChild() commentAttributes = comment.parseNode(keyvalue) # handle @signature if value.type != "function": for docItem in commentAttributes: if docItem["category"] == "signature": value = comp... |
transKeys = ["/translation/i18n-${lang} | transIds = set(x['id'] for x in classKeys) transKeys = ["/translation/i18n-${lang} | def depsToProviderFormat(classDepsIter, depsLogConf): data = {} # Class deps for (packageId, classId, depId, loadOrRun) in classDepsIter: if classId not in data: data[classId] = {} data[classId]["load"] = [] data[classId]["run"] = [] |
console.error(e.message) | console.error(str(e)) | def getLibraries(self, manifests): console.info("Checking manifests to find valid libraries...") libraries = {} console.indent() for manifestPath in manifests: try: manifest = getDataFromJsonFile(manifestPath) except Exception, e: console.error(e.message) if not "info" in manifest: console.warn("Manifest file %s has n... |
msg = "Error running generator: " + e.message | msg = "Error running generator: " + str(e) | def buildDemo(self, demoVariant = "default", demoVersion = "build"): demoBuildStatus = { "svnRevision" : self.getSvnRevision() } if not self.hasDemoDir: msg = "Library %s version %s has no demo folder!" %(self.library.dir, self.dir) console.error(msg) demoBuildStatus["buildError"] = msg return demoBuildStatus console... |
url = url[url.find(ns12)+len(ns12):] url = "pages/" + url | if url.find(ns12)>-1: url = url[url.find(ns12)+len(ns12):] else: if url.startswith("."): url = url[1:] url = "http://qooxdoo.org/" + url if currentInput.endswith("index.txt"): url = "pages/" + url | def internalLink(url): url = url[url.find(ns12)+len(ns12):] url = "pages/" + url url = url.replace(":", "/") return url |
elif url.find(ns12)>-1: | else: | def convertToRst_A(s,l,t): i = t[0].find("|") if i>-1: url = t[0][:i] text= t[0][i+1:] else: url = t[0] text= "" text = text.strip() # Handle url if url.startswith("http://"): return '`%s <%s>`_' % (text,url) # handle document:1.2: elif url.find(ns12)>-1: url = internalLink(url) # handle generator_config_articles#log_... |
else: pass | def convertToRst_A(s,l,t): i = t[0].find("|") if i>-1: url = t[0][:i] text= t[0][i+1:] else: url = t[0] text= "" text = text.strip() # Handle url if url.startswith("http://"): return '`%s <%s>`_' % (text,url) # handle document:1.2: elif url.find(ns12)>-1: url = internalLink(url) # handle generator_config_articles#log_... | |
if clazz.library['namespace'] not in libraries: libraries[clazz.library['namespace']] = clazz.library | if clazz.library.namespace not in libraries: libraries[clazz.library.namespace] = clazz.library | def _handleCode(script, generator): approot = context.jobconf.get("provider/app-root", "./provider") filetool.directory(approot + "/code") for clazz in script.classesObj: # register library (for _handleResources) if clazz.library['namespace'] not in libraries: libraries[clazz.library['namespace']] = clazz.library if... |
sourcepath = os.path.join(clazz.library['path'], clazz.library['class'], classAId) | sourcepath = os.path.join(clazz.library._classPath, classAId) | def _handleCode(script, generator): approot = context.jobconf.get("provider/app-root", "./provider") filetool.directory(approot + "/code") for clazz in script.classesObj: # register library (for _handleResources) if clazz.library['namespace'] not in libraries: libraries[clazz.library['namespace']] = clazz.library if... |
sourcepath = os.path.join(library['path'], library['resource'], res) | sourcepath = os.path.join(library._resourcePath, res) | def copyResource(res, library): sourcepath = os.path.join(library['path'], library['resource'], res) targetpath = approot + "/resource/" + res filetool.directory(os.path.dirname(targetpath)) shutil.copy(sourcepath, targetpath) return |
yield (packageId, dep.name, classId, 'load') | if dep.name not in ignored_names: yield (packageId, classId, dep.name, 'load') | def lookupUsedByDeps(packages): for packageId, package in enumerate(packages): for classId in sorted(package.classes): classObj = ClassIdToObject[classId] classDeps = classObj.dependencies(variants) for dep in classDeps["load"]: yield (packageId, dep.name, classId, 'load') # the packageId is somewhat bogus here for de... |
yield (packageId, dep.name, classId, 'run') | if dep.name not in ignored_names: yield (packageId, classId, dep.name, 'run') | def lookupUsedByDeps(packages): for packageId, package in enumerate(packages): for classId in sorted(package.classes): classObj = ClassIdToObject[classId] classDeps = classObj.dependencies(variants) for dep in classDeps["load"]: yield (packageId, dep.name, classId, 'load') # the packageId is somewhat bogus here for de... |
if classDeps["load"]: for dep in classDeps["load"]: | ignored_names = [x.name for x in classDeps["ignore"]] for dep in classDeps["load"]: if dep.name not in ignored_names: | def lookupUsingDeps(packages): for packageId, package in enumerate(packages): for classId in sorted(package.classes): classObj = ClassIdToObject[classId] classDeps = classObj.dependencies(variants) if classDeps["load"]: for dep in classDeps["load"]: yield (packageId, classId, dep.name, 'load') if classDeps["run"]: for ... |
if classDeps["run"]: for dep in classDeps["run"]: | for dep in classDeps["run"]: if dep.name not in ignored_names: | def lookupUsingDeps(packages): for packageId, package in enumerate(packages): for classId in sorted(package.classes): classObj = ClassIdToObject[classId] classDeps = classObj.dependencies(variants) if classDeps["load"]: for dep in classDeps["load"]: yield (packageId, classId, dep.name, 'load') if classDeps["run"]: for ... |
if dir == "Bugs": dirs.remove("Bugs") continue | def scanRepository(self): console.info("Scanning %s" %self.dir) console.indent() demoDir = "%sdemo%s" %(os.sep,os.sep) manifestPaths = [] for root, dirs, files in os.walk(self.dir, topdown=True): for dir in dirs: #if dir == "Bugs": # dirs.remove("Bugs") # continue path = os.path.join(root,dir) manifestPath = os.path... | |
def buildAllDemos(self, demoVersion="build", demoBrowser=None): | def buildAllDemos(self, demoVersion="build", demoBrowser=None, copyDemos=False): | def buildAllDemos(self, demoVersion="build", demoBrowser=None): if demoBrowser: demoBrowser = os.path.abspath(demoBrowser) console.info("Generating demos for all known libraries") demoData = [] console.indent() for libraryName in self.libraries: library = self.libraries[libraryName] libraryData = { "classname": librar... |
htmlfile = self.copyHtmlFile(libraryName, versionName, variant, demoVersion, demoBrowser) | if copyDemos: sourceDir = os.path.join(version.path, "demo", variant, demoVersion) targetDir = os.path.join(demoBrowser, demoVersion, "demo", libraryName, versionName, variant) copier = CopyTool(sourceDir, targetDir, update=True) copier.copy() self.copyHtmlFile(libraryName, versionName, variant, demoVersion, demoBrows... | def buildAllDemos(self, demoVersion="build", demoBrowser=None): if demoBrowser: demoBrowser = os.path.abspath(demoBrowser) console.info("Generating demos for all known libraries") demoData = [] console.indent() for libraryName in self.libraries: library = self.libraries[libraryName] libraryData = { "classname": librar... |
def copyHtmlFile(self, libraryName, versionName, variantName, demoVersion, demoBrowser): | def copyHtmlFile(self, libraryName, versionName, variantName, demoVersion, demoBrowser, local=False): | def copyHtmlFile(self, libraryName, versionName, variantName, demoVersion, demoBrowser): #get some needed info from the demobrowser's manifest dbManifest = getDataFromJsonFile(os.path.join(demoBrowser, "Manifest.json")) dbResourcePath = dbManifest["provides"]["resource"] dbNamespace = dbManifest["provides"]["namespace"... |
demoUrl = "../../../" + self.getDemoUrl(demoBrowser, demoPath) | if local: demoUrl = "/".join([versionName, variantName, demoVersion]) else: demoUrl = "../../../" + self.getDemoUrl(demoBrowser, demoPath) | def copyHtmlFile(self, libraryName, versionName, variantName, demoVersion, demoBrowser): #get some needed info from the demobrowser's manifest dbManifest = getDataFromJsonFile(os.path.join(demoBrowser, "Manifest.json")) dbResourcePath = dbManifest["provides"]["resource"] dbNamespace = dbManifest["provides"]["namespace"... |
return targetFilePath | def copyHtmlFile(self, libraryName, versionName, variantName, demoVersion, demoBrowser): #get some needed info from the demobrowser's manifest dbManifest = getDataFromJsonFile(os.path.join(demoBrowser, "Manifest.json")) dbResourcePath = dbManifest["provides"]["resource"] dbNamespace = dbManifest["provides"]["namespace"... | |
repository.buildAllDemos(job[6:], options.demobrowser) | repository.buildAllDemos(job[6:], options.demobrowser, options.copydemos) | def main(): (options,args) = getComputedConf() config = None if options.configfile: config = getDataFromJsonFile(options.configfile) repository = Repository(options.workdir, config) if options.joblist: jobs = options.joblist.split(",") for job in jobs: if job[:6] == "demos-": if options.demobrowser: if not os.path.i... |
console.warn("Warning: Unfullfilled | console.warn("! Warning: No resource matched | def checkPatts(res, hints): for hint in hints: if hint.regex.search(res.id): hint.seen = True # mark asset hint as fullfilled by a resource return True return False |
content = ref.read() ref.close() | try: content = ref.read() except UnicodeDecodeError, e: rowCol = getRowCol(e.object, e.start) e.reason = e.reason + "\nFile %s Line %s Column %s" %(str(filePath), str(rowCol[0]), str(rowCol[1]) ) raise e finally: ref.close() | def read(filePath, encoding="utf_8"): try: ref = codecs.open(filePath, encoding=encoding, mode="r") content = ref.read() ref.close() return textutil.any2Unix(unicode(content)) except IOError, (errno, strerror): #print " * I/O error(%s): %s (%s)" % (errno, strerror, filePath) raise except ValueError: #print " * Inv... |
return def runSource(self, script, ): def mapCompileConfig(oldConf): newConf = ExtMap({}) if 'file' in oldConf: newConf.set("paths/file", oldConf['file']) if 'root' in oldConf: newConf.set("paths/app-root", oldConf['root']) if 'locales' in oldConf: newConf.set("code/locales", oldConf['locales']) if 'gzip' in oldConf... | def mapCompileConfig(oldConf): newConf = ExtMap({}) if 'file' in oldConf: newConf.set("paths/file", oldConf['file']) if 'root' in oldConf: newConf.set("paths/app-root", oldConf['root']) if 'locales' in oldConf: newConf.set("code/locales", oldConf['locales']) if 'gzip' in oldConf: newConf.set("path/gzip", oldConf['gzip'... | |
copier = CopyTool() copier.parse_args(["-u", sourceDir, targetDir]) copier.do_work() | try: copier = CopyTool() copier.parse_args(["-u", sourceDir, targetDir]) copier.do_work() except IOError, e: console.error("Couldn't copy demo: " + str(e)) | def buildAllDemos(self, buildTarget="build", demoBrowser=None, copyDemos=False): if demoBrowser: demoBrowser = os.path.abspath(demoBrowser) console.info("Generating demos for all known libraries") repositoryData = [] console.indent() for libraryName in self.libraries: library = self.libraries[libraryName] libraryData ... |
demoManifest = version.getDemoManifest(variant.name) | def buildAllDemos(self, buildTarget="build", demoBrowser=None, copyDemos=False): if demoBrowser: demoBrowser = os.path.abspath(demoBrowser) console.info("Generating demos for all known libraries") repositoryData = [] console.indent() for libraryName in self.libraries: library = self.libraries[libraryName] libraryData ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.