lbkit 0.9.0__tar.gz → 0.9.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. {lbkit-0.9.0/lbkit.egg-info → lbkit-0.9.2}/PKG-INFO +1 -1
  2. lbkit-0.9.2/lbkit/__init__.py +2 -0
  3. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/codegen/idf_interface.py +4 -4
  4. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/codegen/template/public.h.mako +1 -1
  5. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/ukr/build.py +98 -30
  6. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/utils/images/emmc.py +4 -4
  7. {lbkit-0.9.0 → lbkit-0.9.2/lbkit.egg-info}/PKG-INFO +1 -1
  8. {lbkit-0.9.0 → lbkit-0.9.2}/test/test_codegen.py +16 -16
  9. lbkit-0.9.0/lbkit/__init__.py +0 -2
  10. {lbkit-0.9.0 → lbkit-0.9.2}/AUTHORS +0 -0
  11. {lbkit-0.9.0 → lbkit-0.9.2}/LICENSE +0 -0
  12. {lbkit-0.9.0 → lbkit-0.9.2}/MANIFEST.in +0 -0
  13. {lbkit-0.9.0 → lbkit-0.9.2}/README.md +0 -0
  14. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/build_conan_parallel.py +0 -0
  15. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/ci_robot/__init__.py +0 -0
  16. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/ci_robot/gitee.py +0 -0
  17. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/cli.py +0 -0
  18. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/codegen/__init__.py +0 -0
  19. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/codegen/codegen.py +0 -0
  20. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/codegen/ctype_defination.py +0 -0
  21. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/codegen/renderer.py +0 -0
  22. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/codegen/template/client.c.mako +0 -0
  23. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/codegen/template/client.h.mako +0 -0
  24. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/codegen/template/interface.c.mako +0 -0
  25. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/codegen/template/interface.introspect.xml.mako +0 -0
  26. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/codegen/template/public.c.mako +0 -0
  27. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/codegen/template/server.c.mako +0 -0
  28. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/codegen/template/server.h.mako +0 -0
  29. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/component/__init__.py +0 -0
  30. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/component/arg_parser.py +0 -0
  31. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/component/build.py +0 -0
  32. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/component/template/conanbase.mako +0 -0
  33. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/component/template/deploy.mako +0 -0
  34. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/component/test.py +0 -0
  35. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/errors.py +0 -0
  36. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/helper.py +0 -0
  37. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/lbkit.py +0 -0
  38. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/log.py +0 -0
  39. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/misc.py +0 -0
  40. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/tasks/__init__.py +0 -0
  41. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/tasks/config.py +0 -0
  42. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/tasks/executor.py +0 -0
  43. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/tasks/image_maker/__init__.py +0 -0
  44. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/tasks/image_maker/make_image.py +0 -0
  45. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/tasks/image_maker/make_qemu_image.py +0 -0
  46. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/tasks/image_maker/make_rockchip_image.py +0 -0
  47. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/tasks/task.py +0 -0
  48. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/tasks/task_build_image.py +0 -0
  49. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/tasks/task_build_manifest.py +0 -0
  50. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/tasks/task_build_prepare.py +0 -0
  51. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/tasks/task_build_rootfs.py +0 -0
  52. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/tasks/task_download.py +0 -0
  53. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/tasks/template/conanfile.py.mako +0 -0
  54. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/tasks/template/rootfs.py.mako +0 -0
  55. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/tools.py +0 -0
  56. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/ukr/__init__.py +0 -0
  57. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/utils/__init__.py +0 -0
  58. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/utils/env_detector.py +0 -0
  59. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit/utils/images/__init__.py +0 -0
  60. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit.egg-info/SOURCES.txt +0 -0
  61. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit.egg-info/dependency_links.txt +0 -0
  62. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit.egg-info/entry_points.txt +0 -0
  63. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit.egg-info/requires.txt +0 -0
  64. {lbkit-0.9.0 → lbkit-0.9.2}/lbkit.egg-info/top_level.txt +0 -0
  65. {lbkit-0.9.0 → lbkit-0.9.2}/setup.cfg +0 -0
  66. {lbkit-0.9.0 → lbkit-0.9.2}/setup.py +0 -0
  67. {lbkit-0.9.0 → lbkit-0.9.2}/test/__init__.py +0 -0
  68. {lbkit-0.9.0 → lbkit-0.9.2}/test/test_config.py +0 -0
  69. {lbkit-0.9.0 → lbkit-0.9.2}/test/test_helper.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lbkit
3
- Version: 0.9.0
3
+ Version: 0.9.2
4
4
  Summary: Tools provided by litebmc.com
5
5
  Home-page: https://www.litebmc.com
6
6
  Author: xuhj@litebmc.com
@@ -0,0 +1,2 @@
1
+
2
+ __version__ = '0.9.2'
@@ -1209,12 +1209,12 @@ class IdfInterface(IdfInterfaceBase):
1209
1209
  "ref_value": {
1210
1210
  "type": "string",
1211
1211
  "description": "Property reference syntax. The format must be `\\$\\{([<]*|:)<object>.<property name>\\}`, for example: Test_Obj.Prop",
1212
- "pattern": "^\\$\\{([<]*|:)[a-zA-Z]([a-z0-9A-Z]*[a-z])?)_([a-z0-9A-Z]+)\\.[A-Za-z][a-zA-Z0-9_-]*\\}$"
1212
+ "pattern": "^\\$\\{([<]*|:)\\.?[a-zA-Z][a-z0-9A-Z]+_[a-zA-Z0-9][a-z0-9A-Z_]*\\.[a-zA-Z][A-Za-z0-9_-]*\\}$"
1213
1213
  },
1214
1214
  "ref_obj": {
1215
1215
  "type": "string",
1216
1216
  "description": "Property reference syntax. The format must be `\\$\\{([<]*|:)<object>.<property name>\\}`, for example: Test_Obj",
1217
- "pattern": "^\\$\\{([<]*|:)[a-zA-Z]([a-z0-9A-Z]*[a-z])?)_([a-z0-9A-Z]+)\\}$"
1217
+ "pattern": "^\\$\\{([<]*|:)\\.?[a-zA-Z][a-z0-9A-Z]+_[a-zA-Z0-9][a-z0-9A-Z_]*\\}$"
1218
1218
  },
1219
1219
  "ref_obj_array": {
1220
1220
  "type": "array",
@@ -1224,12 +1224,12 @@ class IdfInterface(IdfInterfaceBase):
1224
1224
  {
1225
1225
  "type": "string",
1226
1226
  "description": "Object reference syntax. The format must be `\\$\\{([<]*|:)<object>\\}`, for example: Test_Obj",
1227
- "pattern": "^\\$\\{([<]*|:)[a-zA-Z]([a-z0-9A-Z]*[a-z])?)_([a-z0-9A-Z]+)\\}$"
1227
+ "pattern": "^\\$\\{([<]*|:)\\.?[a-zA-Z][a-z0-9A-Z]+_[a-zA-Z0-9][a-z0-9A-Z_]*\\}$"
1228
1228
  },
1229
1229
  {
1230
1230
  "type": "string",
1231
1231
  "description": "Plain string format, if the string start with `$` must add `\\` before `$` to escape; If the string is empty it must be surrounded by `\"`",
1232
- "pattern": "^[/]?[A-Z0-9a-z_]+(/[A-Z0-9a-z_]+)*$"
1232
+ "pattern": "^/?[A-Z0-9a-z_]+(/[A-Z0-9a-z_]+)*$"
1233
1233
  }
1234
1234
  ]
1235
1235
  }
@@ -315,7 +315,7 @@ typedef struct {
315
315
  <% RSP_PARA = f'' %>\
316
316
  <% REQ_PARA = f'' %>\
317
317
  % if len(action.returns.parameters) > 0:
318
- <% RSP_PARA = f', {class_name}_{action.name}_Rsq **rsp' %>\
318
+ <% RSP_PARA = f', {class_name}_{action.name}_Rsp **rsp' %>\
319
319
  % endif
320
320
  % if len(action.parameters.parameters) > 0:
321
321
  <% REQ_PARA = f', const {class_name}_{action.name}_Req *req' %>\
@@ -2,27 +2,13 @@
2
2
  import os
3
3
  import yaml
4
4
  import shutil
5
- import re
6
- import json
7
- import tempfile
8
5
  from string import Template
9
- from multiprocessing import Pool
10
- import traceback
11
- from argparse import ArgumentParser
12
- from jsonschema import validate, ValidationError
13
- from git import Repo
14
- from git.exc import InvalidGitRepositoryError
15
- from mako.lookup import TemplateLookup
16
- from lbkit.misc import Color, load_yml_with_json_schema_validate, get_json_schema_file, load_json_schema
17
- from lbkit import errors
18
- from lbkit.codegen.codegen import CodeGen, history_versions
19
6
  from lbkit.tools import Tools
20
- from lbkit.build_conan_parallel import BuildConanParallel
21
- from lbkit.codegen.codegen import Version
22
7
  from lbkit.tasks.task_download import DownloadTask
23
8
  from lbkit.misc import DownloadFlag
24
9
  from lbkit.tools import Tools
25
10
  from lbkit.utils.env_detector import EnvDetector
11
+ from lbkit.misc import load_yml_with_json_schema_validate
26
12
 
27
13
 
28
14
  tools = Tools("comp_build")
@@ -33,10 +19,25 @@ class SourceDest():
33
19
  def __init__(self, cfg):
34
20
  self.source = cfg.get("source")
35
21
  self.dest = cfg.get("dest")
22
+ self.pattern = cfg.get("pattern")
36
23
 
37
24
  def copy(self, source_dir, dest_dir, with_template, **kwargs):
38
25
  source = os.path.join(source_dir, self.source)
39
26
  dest = os.path.join(dest_dir, self.dest)
27
+ if self.pattern and os.path.isdir(source):
28
+ if not source.endswith("/"):
29
+ source += "/"
30
+ files = tools.pipe([f"find {source} -name {self.pattern}"], out_file=None).decode("utf-8").split("\n")
31
+ for file in files:
32
+ file = file.strip()
33
+ if not file:
34
+ continue
35
+ new_dest = os.path.join(dest, file[len(source):])
36
+ self._copy(file, new_dest, with_template, **kwargs)
37
+ else:
38
+ self._copy(source, dest, with_template, **kwargs)
39
+
40
+ def _copy(self, source, dest, with_template, **kwargs):
40
41
  if os.path.isfile(dest):
41
42
  os.unlink(dest)
42
43
  dest_dir = os.path.dirname(dest)
@@ -86,9 +87,6 @@ class BuildGeneral():
86
87
  }
87
88
  task = DownloadTask(cfg, os.getcwd())
88
89
  task.start()
89
- _, sha = DownloadFlag.read(self.dir_name)
90
- if sha == sha256:
91
- return
92
90
  cmd = f"tar -xf {task.dst} -C {self.dir_name}"
93
91
  if task.strip_components:
94
92
  cmd += f" --strip-components={task.strip_components}"
@@ -101,10 +99,15 @@ class BuildGeneral():
101
99
  def prepare_defconfig(self):
102
100
  defconf = self.cfg.get("defconfig")
103
101
  compiler_path=os.path.join(self.work_dir, "toolchain")
104
- sd = SourceDest(defconf)
105
- sd.copy(self.cwd, os.path.join(self.work_dir, self.dir_name), True, compiler_path=compiler_path)
102
+ if isinstance(defconf, list):
103
+ for conf in defconf:
104
+ sd = SourceDest(conf)
105
+ sd.copy(self.cwd, os.path.join(self.work_dir, self.dir_name), True, compiler_path=compiler_path)
106
+ else:
107
+ sd = SourceDest(defconf)
108
+ sd.copy(self.cwd, os.path.join(self.work_dir, self.dir_name), True, compiler_path=compiler_path)
106
109
  os.environ["ARCH"] = self.arch
107
- os.environ["CROSS_COMPILE"] = self.cross_compile + "-"
110
+ os.environ["CROSS_COMPILE"] = os.path.join(compiler_path, "bin", self.cross_compile + "-")
108
111
  path = os.environ.get("PATH", "")
109
112
  if compiler_path not in path:
110
113
  path += ":" + compiler_path + "/bin"
@@ -113,13 +116,21 @@ class BuildGeneral():
113
116
 
114
117
  def build(self):
115
118
  os.chdir(self.dir_name)
116
- cmd = f"make {self.defconfig}"
117
- self.tools.exec(cmd, verbose=True)
118
- if self.name == "compiler":
119
- cmd = f"make sdk -j" + str(os.cpu_count())
119
+ cmds = self.cfg.get("cmds", [])
120
+ if cmds:
121
+ for cmd in cmds:
122
+ compiler = os.environ["CROSS_COMPILE"]
123
+ cmd = cmd.replace("${compiler}", compiler)
124
+ cmd = cmd.replace("${workdir}", self.dir_name)
125
+ self.tools.exec(cmd, verbose=True)
120
126
  else:
121
- cmd = f"make -j" + str(os.cpu_count())
122
- self.tools.exec(cmd, verbose=True)
127
+ cmd = f"make {self.defconfig}"
128
+ self.tools.exec(cmd, verbose=True)
129
+ if self.name == "compiler":
130
+ cmd = f"make sdk -j" + str(os.cpu_count())
131
+ else:
132
+ cmd = f"make -j" + str(os.cpu_count())
133
+ self.tools.exec(cmd, verbose=True)
123
134
 
124
135
  def tar_files(self):
125
136
  os.chdir(self.dir_name)
@@ -139,6 +150,8 @@ class BuildGeneral():
139
150
  sd.copy(self.dir_name, self.output, False)
140
151
 
141
152
  def run(self):
153
+ if not self.cfg:
154
+ return
142
155
  self.download()
143
156
  self.prepare_defconfig()
144
157
  self.build()
@@ -181,6 +194,59 @@ class BuildUBoot(BuildGeneral):
181
194
  super().__init__(config, cwd, "uboot", "uboot")
182
195
 
183
196
 
197
+ class PreDownload():
198
+ def __init__(self, config, cwd):
199
+ self.cwd = cwd
200
+ self.cfg = config.get("predownload", [])
201
+
202
+ def run(self):
203
+ if not self.cfg:
204
+ return
205
+ for down in self.cfg:
206
+ url = down.get("url")
207
+ sha256 = down.get("sha256")
208
+ verify = down.get("verify", True)
209
+ destfile = down.get("destfile")
210
+ destfile = os.path.join(self.cwd, ".temp", destfile)
211
+ destfile = os.path.realpath(destfile)
212
+ if not destfile.startswith(self.cwd):
213
+ raise Exception(f"dest file {destfile} not startswith {self.cwd}")
214
+ destdir = os.path.dirname(destfile)
215
+ if not os.path.isdir(destdir):
216
+ os.makedirs(destdir)
217
+
218
+ tmpfile = os.path.join(self.cwd, ".temp", os.path.basename(url))
219
+
220
+ cfg = {
221
+ "url": url,
222
+ "file": tmpfile,
223
+ "decompress": {
224
+ "dirname": self.cwd,
225
+ "strip_components": 0
226
+ },
227
+ "sha256": sha256,
228
+ "verify": verify
229
+ }
230
+ task = DownloadTask(cfg, os.getcwd())
231
+ task.start()
232
+ if tmpfile != destfile:
233
+ shutil.copyfile(tmpfile, destfile)
234
+ decomp = down.get("decompress")
235
+ if not decomp:
236
+ continue
237
+ strip_components = decomp.get("strip_components", 0)
238
+ dirname = decomp.get("dirname")
239
+ if not dirname:
240
+ continue
241
+ dirname = os.path.join(self.cwd, ".temp", dirname)
242
+ if os.path.isdir(dirname):
243
+ shutil.rmtree(dirname)
244
+ os.makedirs(dirname)
245
+ cmd = f"tar -xf {task.dst} -C {dirname}"
246
+ if strip_components:
247
+ cmd += f" --strip-components={strip_components}"
248
+ tools.exec(cmd)
249
+
184
250
  class UKRBuild():
185
251
  def __init__(self, env_detector: EnvDetector):
186
252
  os.chdir(env_detector.ukr.folder)
@@ -188,8 +254,10 @@ class UKRBuild():
188
254
 
189
255
  def run(self):
190
256
  cwd = os.getcwd()
191
- with open("config.yml") as fp:
192
- cfg = yaml.full_load(fp)
257
+
258
+ cfg = load_yml_with_json_schema_validate("config.yml", "/usr/share/litebmc/schema/ukr_config.v1.json")
259
+ download = PreDownload(cfg, cwd)
260
+ download.run()
193
261
  build = BuildCompiler(cfg, cwd)
194
262
  build.run()
195
263
  build = BuildRootfs(cfg, cwd)
@@ -199,4 +267,4 @@ class UKRBuild():
199
267
  build = BuildUBoot(cfg, cwd)
200
268
  build.run()
201
269
  cmd = f"tar -czf {cwd}/.temp/output/firmware.tar.gz -C {cwd}/.temp/output/images ."
202
- tools.exec(cmd)
270
+ tools.exec(cmd)
@@ -68,14 +68,14 @@ class MakeImage():
68
68
  start = end
69
69
  end += self.rootfs_blk_1m * 1024 * 2
70
70
  self.tools.exec(f"parted -s -a none {output} mkpart rootfs_b {start}s {end - 1}s")
71
- self.log.info("复制镜像文件到rootfs_b")
72
- self.tools.exec(f"dd if={rootfs} of={output} bs=512 seek={start} conv=notrunc")
71
+ # self.log.info("复制镜像文件到rootfs_b")
72
+ # self.tools.exec(f"dd if={rootfs} of={output} bs=512 seek={start} conv=notrunc")
73
73
  self.log.info("制作rootfs_c")
74
74
  start = end
75
75
  end += self.rootfs_blk_1m * 1024 * 2
76
76
  self.tools.exec(f"parted -s -a none {output} mkpart rootfs_c {start}s {end - 1}s")
77
- self.log.info("复制镜像文件到rootfs_c")
78
- self.tools.exec(f"dd if={rootfs} of={output} bs=512 seek={start} conv=notrunc")
77
+ # self.log.info("复制镜像文件到rootfs_c")
78
+ # self.tools.exec(f"dd if={rootfs} of={output} bs=512 seek={start} conv=notrunc")
79
79
  start = end
80
80
  self.log.info("制作userdata区")
81
81
  end += self.userdata_blk_1m * 1024 * 2
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lbkit
3
- Version: 0.9.0
3
+ Version: 0.9.2
4
4
  Summary: Tools provided by litebmc.com
5
5
  Home-page: https://www.litebmc.com
6
6
  Author: xuhj@litebmc.com
@@ -33,10 +33,10 @@ class TestCodeGenClass(unittest.TestCase):
33
33
 
34
34
  def mk_interface_with_number_property(self, name, type, max, min, default_val):
35
35
  with open(self.tmp_file, mode="w+") as fp:
36
- fp.write(f"# yaml-language-server: $schema={schema_dir}/idf.v1.json\n")
36
+ fp.write(f"# yaml-language-server: $schema={schema_dir}/idf.v2.json\n")
37
37
  fp.write("version: 1\n")
38
38
  fp.write("description: 测试接口,用于验证lb_base/lb_core,同时验证自动生成逻辑\n")
39
- fp.write("alias: Test\n")
39
+ fp.write("interface: com.litebmc.Test\n")
40
40
  fp.write("properties:\n")
41
41
  fp.write(f" - name: {name}\n")
42
42
  fp.write(f" description: {name}\n")
@@ -47,10 +47,10 @@ class TestCodeGenClass(unittest.TestCase):
47
47
 
48
48
  def mk_interface_with_string_property(self, name, type, pattern, default_val):
49
49
  with open(self.tmp_file, mode="w+") as fp:
50
- fp.write(f"# yaml-language-server: $schema={schema_dir}/idf.v1.json\n")
50
+ fp.write(f"# yaml-language-server: $schema={schema_dir}/idf.v2.json\n")
51
51
  fp.write("version: 1\n")
52
52
  fp.write("description: 测试接口,用于验证lb_base/lb_core,同时验证自动生成逻辑\n")
53
- fp.write("alias: Test\n")
53
+ fp.write("interface: com.litebmc.Test\n")
54
54
  fp.write("properties:\n")
55
55
  fp.write(f" - name: {name}\n")
56
56
  fp.write(f" description: {name}\n")
@@ -61,10 +61,10 @@ class TestCodeGenClass(unittest.TestCase):
61
61
 
62
62
  def mk_interface_with_double_property(self, name, type, default_val, max=None, min=None, exclusive_max=None, exclusive_min=None):
63
63
  with open(self.tmp_file, mode="w+") as fp:
64
- fp.write(f"# yaml-language-server: $schema={schema_dir}/idf.v1.json\n")
64
+ fp.write(f"# yaml-language-server: $schema={schema_dir}/idf.v2.json\n")
65
65
  fp.write("version: 1\n")
66
66
  fp.write("description: 测试接口,用于验证lb_base/lb_core,同时验证自动生成逻辑\n")
67
- fp.write("alias: Test\n")
67
+ fp.write("interface: com.litebmc.Test\n")
68
68
  fp.write("properties:\n")
69
69
  fp.write(f" - name: {name}\n")
70
70
  fp.write(f" description: {name}\n")
@@ -82,10 +82,10 @@ class TestCodeGenClass(unittest.TestCase):
82
82
 
83
83
  def validate_boolean(self, name, type, default):
84
84
  with open(self.tmp_file, mode="w+") as fp:
85
- fp.write(f"# yaml-language-server: $schema={schema_dir}/idf.v1.json\n")
85
+ fp.write(f"# yaml-language-server: $schema={schema_dir}/idf.v2.json\n")
86
86
  fp.write("version: 1\n")
87
87
  fp.write("description: 测试接口,用于验证lb_base/lb_core,同时验证自动生成逻辑\n")
88
- fp.write("alias: Test\n")
88
+ fp.write("interface: com.litebmc.Test\n")
89
89
  fp.write("properties:\n")
90
90
  fp.write(f" - name: {name}\n")
91
91
  fp.write(f" description: {name}\n")
@@ -380,10 +380,10 @@ class TestCodegenPropertyFlagsClass(unittest.TestCase):
380
380
 
381
381
  def mk_interface_unique(self, type):
382
382
  with open(self.intf_yaml, mode="w+") as fp:
383
- fp.write(f"# yaml-language-server: $schema={schema_dir}/idf.v1.json\n")
383
+ fp.write(f"# yaml-language-server: $schema={schema_dir}/idf.v2.json\n")
384
384
  fp.write("version: 1\n")
385
385
  fp.write("description: 测试接口,用于验证lb_base/lb_core,同时验证自动生成逻辑\n")
386
- fp.write("alias: Test\n")
386
+ fp.write("interface: com.litebmc.Test\n")
387
387
  fp.write("properties:\n")
388
388
  fp.write(f" - name: ar\n")
389
389
  fp.write(f" description: ar\n")
@@ -446,10 +446,10 @@ class TestCodegenUniqueClass(unittest.TestCase):
446
446
 
447
447
  def mk_interface_unique(self, type, unique):
448
448
  with open(self.intf_yaml, mode="w+") as fp:
449
- fp.write(f"# yaml-language-server: $schema={schema_dir}/idf.v1.json\n")
449
+ fp.write(f"# yaml-language-server: $schema={schema_dir}/idf.v2.json\n")
450
450
  fp.write("version: 1\n")
451
451
  fp.write("description: 测试接口,用于验证lb_base/lb_core,同时验证自动生成逻辑\n")
452
- fp.write("alias: Test\n")
452
+ fp.write("interface: com.litebmc.Test\n")
453
453
  fp.write("properties:\n")
454
454
  fp.write(f" - name: ar\n")
455
455
  fp.write(f" description: ar\n")
@@ -548,10 +548,10 @@ class TestCodegenItemsCountClass(unittest.TestCase):
548
548
 
549
549
  def mk_interface_min_max_items(self, type, min_items=None, max_items=None):
550
550
  with open(self.intf_yaml, mode="w+") as fp:
551
- fp.write(f"# yaml-language-server: $schema={schema_dir}/idf.v1.json\n")
551
+ fp.write(f"# yaml-language-server: $schema={schema_dir}/idf.v2.json\n")
552
552
  fp.write("version: 1\n")
553
553
  fp.write("description: 测试接口,用于验证lb_base/lb_core,同时验证自动生成逻辑\n")
554
- fp.write("alias: Test\n")
554
+ fp.write("interface: com.litebmc.Test\n")
555
555
  fp.write("properties:\n")
556
556
  fp.write(f" - name: ar\n")
557
557
  fp.write(f" description: ar\n")
@@ -684,10 +684,10 @@ class TestCodegenItemsMatchesClass(unittest.TestCase):
684
684
 
685
685
  def mk_interface_property_matches(self, type, matches):
686
686
  with open(self.intf_yaml, mode="w+") as fp:
687
- fp.write(f"# yaml-language-server: $schema={schema_dir}/idf.v1.json\n")
687
+ fp.write(f"# yaml-language-server: $schema={schema_dir}/idf.v2.json\n")
688
688
  fp.write("version: 1\n")
689
689
  fp.write("description: 测试接口,用于验证lb_base/lb_core,同时验证自动生成逻辑\n")
690
- fp.write("alias: Test\n")
690
+ fp.write("interface: com.litebmc.Test\n")
691
691
  fp.write("properties:\n")
692
692
  fp.write(f" - name: ar\n")
693
693
  fp.write(f" description: ar\n")
@@ -1,2 +0,0 @@
1
-
2
- __version__ = '0.9.0'
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes