Exemple #1
0
    def __init__(self, repo, databases):
        Backend.__init__(self, repo, "checker", databases)

        self.checks = {}
        self.checks["unsupportedlicense"] = UnsupportedLicenseTable()
        self.checks["unknownfile"] = UnknownFileTable()
        self.checks[
            "nonconformingparametername"] = NonconformingParameternameTable()
        self.checks["nonconformingclassids"] = NonconformingClassIdTable()
        self.checks["missingbaseconnection"] = MissingBaseConnectionTable()
        self.checks[
            "missingparameterdescription"] = MissingParameterDescriptionTable(
            )
        self.checks["unknownconnectors"] = UnknownConnectorLocationTable()
        self.checks["pointlessgroup"] = PointlessGroupTable()
        self.checks["lowercasedescription"] = LowercaseDescriptionTable()
        self.checks["invalidlabeling"] = InvalidLabelingTable()

        self.tasks = {}
        self.tasks["missingcommonparameters"] = MissingCommonParametersTable()
        self.tasks["missingconnectors"] = MissingConnectorTable()
        self.tasks["missingbase"] = MissingBaseTable()
        self.tasks["missingdrawing"] = MissingDrawingTable()
        self.tasks["missingsvgsource"] = MissingSVGSourceTable()

        for check in self.checks.values():
            check.populate(repo, databases)

        for task in self.tasks.values():
            task.populate(repo, databases)
Exemple #2
0
	def __init__(self,repo,databases):
		Backend.__init__(self,repo,"checker",databases)

		self.checks = {}
		self.checks["unsupportedlicense"] = UnsupportedLicenseTable()
		self.checks["unknownfile"] = UnknownFileTable()
		self.checks["nonconformingparametername"] = NonconformingParameternameTable()
		self.checks["nonconformingclassids"] = NonconformingClassIdTable()
		self.checks["missingbaseconnection"] = MissingBaseConnectionTable()
		self.checks["missingparameterdescription"] = MissingParameterDescriptionTable()
		self.checks["defaultsmismatch"] = DefaultsMismatchTable()
		self.checks["unknownconnectors"] = UnknownConnectorLocationTable()
		self.checks["pointlessgroup"] = PointlessGroupTable()
		self.checks["lowercasedescription"] = LowercaseDescriptionTable()
		self.checks["invalidlabeling"] = InvalidLabelingTable()

		self.tasks = {}
		self.tasks["missingcommonparameters"] = MissingCommonParametersTable()
		self.tasks["missingconnectors"] = MissingConnectorTable()
		self.tasks["missingbase"] = MissingBaseTable()
		self.tasks["missingdrawing"] = MissingDrawingTable()
		self.tasks["missingsvgsource"] = MissingSVGSourceTable()

		for check in self.checks.values():
			check.populate(repo,databases)

		for task in self.tasks.values():
			task.populate(repo,databases)
Exemple #3
0
	def __init__(self,repo,databases):
		Backend.__init__(self,repo,"freecad",databases,["freecad"])
Exemple #4
0
 def __init__(self, repo, databases):
     Backend.__init__(self, repo, "connectordrawings", databases,
                      ["openscad", "drawings"])
Exemple #5
0
 def __init__(self,repo,databases):
     Backend.__init__(self,repo,'translations',databases,[])
Exemple #6
0
	def __init__(self,repo,databases):
		Backend.__init__(self,repo,'translations',databases,[])
Exemple #7
0
 def __init__(self, repo, databases):
     Backend.__init__(self, repo, "iges", databases, ["freecad"])
Exemple #8
0
    def __init__(self, repo, databases):
        Backend.__init__(self, repo, "openscad", databases, ["openscad"])

        # check for module name clashes
        modules = []
        # common.scad
        for mod in [
            "BOLTS_error",
            "BOLTS_warning",
            "BOLTS_check_dimension",
            "BOLTS_convert_to_default_unit",
            "get_dim",
            "type",
            "BOLTS_check_parameter_type",
            "BOLTS_thread_external",
            "BOLTS_hex_head",
            "BOLTS_hex_socket_neg",
        ]:
            modules.append(mod)
            # conf.scad
        for mod in ["BOLTS_MODE", "BOLTS_DEFAULT_UNIT", "BOLTS_THREAD_COLOR"]:
            modules.append(mod)
            # local.scad
        for mod in [
            "norm",
            "unit_vector",
            "clamp",
            "cross_product",
            "almost_equal",
            "_rotation_angle",
            "calculate_rotation_axis",
            "calculate_axis",
            "new_cs",
            "is_orthonromal",
            "unit_matrix",
            "tensor_product_matrix3",
            "cross_product_matrix3",
            "rotation_matrix3",
            "show_cs",
            "translate_local",
            "in_cs",
            "align",
        ]:
            modules.append(mod)
            # version.scad
        for mod in ["BOLTS_version", "BOLTS_date", "BOLTS_license"]:
            modules.append(mod)
            # base modules
        for (module,) in self.dbs["openscad"].itermodules():
            if module.name in modules:
                raise ModuleNameCollisionError(module.name)
            modules.append(module.name)
            # names
        for (name,) in self.dbs["openscad"].iternames():
            if name.get_id() in modules:
                raise ModuleNameCollisionError(name.get_id())
            modules.append(name.get_id())
            # standards
        for (std,) in self.dbs["openscad"].iterstandards():
            if std.get_id() in modules:
                raise ModuleNameCollisionError(std.get_id())
            modules.append(std.get_id())
            # classes
        for cl, module in self.dbs["openscad"].iterclasses(["class", "module"]):
            params = cl.parameters.union(module.parameters)
            # tables
            for table, i in zip(params.tables, range(len(params.tables))):
                tablename = "%s_table_%s" % (cl.id, i)
                if tablename in modules:
                    raise ModuleNameCollisionError(tablename)
                modules.append(tablename)
                # 2d tables
            for table, i in zip(params.tables2d, range(len(params.tables))):
                tablename = "%s_table2d_%s" % (cl.id, i)
                if tablename in modules:
                    raise ModuleNameCollisionError(tablename)
                modules.append(tablename)
                # stub module
            modulename = "%s_geo" % cl.id
            if modulename in modules:
                raise ModuleNameCollisionError(modulename)
            modules.append(modulename)
            # dim accessors
            accessorname = "%s_dims" % cl.id
            if accessorname in modules:
                raise ModuleNameCollisionError(accessorname)
            modules.append(accessorname)
            # conn accessors
            accessorname = "%s_conn" % cl.id
            if accessorname in modules:
                raise ModuleNameCollisionError(accessorname)
            modules.append(accessorname)
            # names
        for name, cl, module in self.dbs["openscad"].iternames(["name", "class", "module"]):
            params = cl.parameters.union(module.parameters)
            # tables
            for table, i in zip(params.tables, range(len(params.tables))):
                tablename = "%s_table_%s" % (name.get_id(), i)
                if tablename in modules:
                    raise ModuleNameCollisionError(tablename)
                modules.append(tablename)
                # 2d tables
            for table, i in zip(params.tables2d, range(len(params.tables))):
                tablename = "%s_table2d_%s" % (name.get_id(), i)
                if tablename in modules:
                    raise ModuleNameCollisionError(tablename)
                modules.append(tablename)
                # dim accessors
            accessorname = "%s_dims" % name.get_id()
            if accessorname in modules:
                raise ModuleNameCollisionError(accessorname)
            modules.append(accessorname)
            # conn accessors
            accessorname = "%s_conn" % name.get_id()
            if accessorname in modules:
                raise ModuleNameCollisionError(accessorname)
            modules.append(accessorname)
            # standards
        for std, cl, module in self.dbs["openscad"].iterstandards(["standard", "class", "module"]):
            params = cl.parameters.union(module.parameters)
            # tables
            for table, i in zip(params.tables, range(len(params.tables))):
                tablename = "%s_table_%s" % (std.get_id(), i)
                if tablename in modules:
                    raise ModuleNameCollisionError(tablename)
                modules.append(tablename)
                # 2d tables
            for table, i in zip(params.tables2d, range(len(params.tables))):
                tablename = "%s_table2d_%s" % (std.get_id(), i)
                if tablename in modules:
                    raise ModuleNameCollisionError(tablename)
                modules.append(tablename)
                # dim accessors
            accessorname = "%s_dims" % std.get_id()
            if accessorname in modules:
                raise ModuleNameCollisionError(accessorname)
            modules.append(accessorname)
            # conn accessors
            accessorname = "%s_conn" % std.get_id()
            if accessorname in modules:
                raise ModuleNameCollisionError(accessorname)
            modules.append(accessorname)
Exemple #9
0
	def __init__(self,repo,databases):
		Backend.__init__(self,repo,"openscad",databases,["openscad"])

		#check for module name clashes
		modules = []
		#common.scad
		for mod in ["BOLTS_error", "BOLTS_warning", "BOLTS_check_dimension",
			"BOLTS_convert_to_default_unit", "get_dim", "type", "BOLTS_check_parameter_type",
			"BOLTS_thread_external", "BOLTS_hex_head", "BOLTS_hex_socket_neg"]:
			modules.append(mod)
		#conf.scad
		for mod in ["BOLTS_MODE", "BOLTS_DEFAULT_UNIT", "BOLTS_THREAD_COLOR"]:
			modules.append(mod)
		#local.scad
		for mod in ["norm", "unit_vector", "clamp", "cross_product", "almost_equal",
			"_rotation_angle", "calculate_rotation_axis", "calculate_axis", "new_cs",
			"is_orthonromal", "unit_matrix", "tensor_product_matrix3", "cross_product_matrix3",
			"rotation_matrix3", "show_cs", "translate_local", "in_cs", "align"]:
			modules.append(mod)
		#version.scad
		for mod in ["BOLTS_version", "BOLTS_date", "BOLTS_license"]:
			modules.append(mod)
		#base modules
		for module, in self.dbs["openscad"].itermodules():
			if module.name in modules:
				raise ModuleNameCollisionError(module.name)
			modules.append(module.name)
		#names
		for name, in self.dbs["openscad"].iternames():
			if name.get_id() in modules:
				raise ModuleNameCollisionError(name.get_id())
			modules.append(name.get_id())
		#standards
		for std, in self.dbs["openscad"].iterstandards():
			if std.get_id() in modules:
				raise ModuleNameCollisionError(std.get_id())
			modules.append(std.get_id())
		#classes
		for cl,module in self.dbs["openscad"].iterclasses(["class","module"]):
			params = cl.parameters.union(module.parameters)
			#tables
			for table,i in zip(params.tables,range(len(params.tables))):
				tablename = "%s_table_%s" % (cl.id,i)
				if tablename in modules:
					raise ModuleNameCollisionError(tablename)
				modules.append(tablename)
			#2d tables
			for table,i in zip(params.tables2d,range(len(params.tables))):
				tablename = "%s_table2d_%s" % (cl.id,i)
				if tablename in modules:
					raise ModuleNameCollisionError(tablename)
				modules.append(tablename)
			#stub module
			modulename = "%s_geo" % cl.id
			if modulename in modules:
				raise ModuleNameCollisionError(modulename)
			modules.append(modulename)
			#dim accessors
			accessorname = "%s_dims" % cl.id
			if accessorname in modules:
				raise ModuleNameCollisionError(accessorname)
			modules.append(accessorname)
			#conn accessors
			accessorname = "%s_conn" % cl.id
			if accessorname in modules:
				raise ModuleNameCollisionError(accessorname)
			modules.append(accessorname)
		#names
		for name,cl,module in self.dbs["openscad"].iternames(["name","class","module"]):
			params = cl.parameters.union(module.parameters)
			#tables
			for table,i in zip(params.tables,range(len(params.tables))):
				tablename = "%s_table_%s" % (name.get_id(),i)
				if tablename in modules:
					raise ModuleNameCollisionError(tablename)
				modules.append(tablename)
			#2d tables
			for table,i in zip(params.tables2d,range(len(params.tables))):
				tablename = "%s_table2d_%s" % (name.get_id(),i)
				if tablename in modules:
					raise ModuleNameCollisionError(tablename)
				modules.append(tablename)
			#dim accessors
			accessorname = "%s_dims" % name.get_id()
			if accessorname in modules:
				raise ModuleNameCollisionError(accessorname)
			modules.append(accessorname)
			#conn accessors
			accessorname = "%s_conn" % name.get_id()
			if accessorname in modules:
				raise ModuleNameCollisionError(accessorname)
			modules.append(accessorname)
		#standards
		for std,cl,module in self.dbs["openscad"].iterstandards(["standard","class","module"]):
			params = cl.parameters.union(module.parameters)
			#tables
			for table,i in zip(params.tables,range(len(params.tables))):
				tablename = "%s_table_%s" % (std.get_id(),i)
				if tablename in modules:
					raise ModuleNameCollisionError(tablename)
				modules.append(tablename)
			#2d tables
			for table,i in zip(params.tables2d,range(len(params.tables))):
				tablename = "%s_table2d_%s" % (std.get_id(),i)
				if tablename in modules:
					raise ModuleNameCollisionError(tablename)
				modules.append(tablename)
			#dim accessors
			accessorname = "%s_dims" % std.get_id()
			if accessorname in modules:
				raise ModuleNameCollisionError(accessorname)
			modules.append(accessorname)
			#conn accessors
			accessorname = "%s_conn" % std.get_id()
			if accessorname in modules:
				raise ModuleNameCollisionError(accessorname)
			modules.append(accessorname)
Exemple #10
0
	def __init__(self,repo,databases):
		Backend.__init__(self,repo,"connectordrawings",databases,["openscad","drawings"])