deepKernel 0.0.3__tar.gz → 0.0.6__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.
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deepKernel
3
- Version: 0.0.3
3
+ Version: 0.0.6
4
4
  Summary: A simple example package
5
5
  Home-page: https://www.pzeda.com/CN
6
6
  Author: pz
7
7
  Author-email: meichiyuan@pzeda.com
8
8
  Classifier: Programming Language :: Python :: 3
9
- Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
10
10
  Classifier: Operating System :: OS Independent
11
11
  Requires-Python: >=3.6
12
12
  Description-Content-Type: text/markdown
@@ -21,4 +21,6 @@ Dynamic: license-file
21
21
  Dynamic: requires-python
22
22
  Dynamic: summary
23
23
 
24
- 测试
24
+ 20250926 0.0.5 正式第一版,主要使用configuration.init、input.open_job、information.get_profile_box以测试SDK包是否可用
25
+
26
+ 20250928 0.0.6 正式第二版,主要加入output模块用以测试导出Gerber/ODBPP接口是否可用
@@ -0,0 +1,3 @@
1
+ 20250926 0.0.5 正式第一版,主要使用configuration.init、input.open_job、information.get_profile_box以测试SDK包是否可用
2
+
3
+ 20250928 0.0.6 正式第二版,主要加入output模块用以测试导出Gerber/ODBPP接口是否可用
@@ -0,0 +1,4 @@
1
+ import os,sys
2
+ package_root = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
3
+ if package_root not in sys.path:
4
+ sys.path.insert(0, package_root)
@@ -0,0 +1,142 @@
1
+ from deepKernel import deepline
2
+ import json
3
+
4
+ def _init():
5
+ global _global_dict
6
+ _global_dict={}
7
+
8
+ def set_config_path(path):
9
+ data = {
10
+ 'func': 'SET_CONFIG_PATH',
11
+ 'paras': {
12
+ 'path': path
13
+ }
14
+ }
15
+ #print(json.dumps(data))
16
+ return deepline.process(json.dumps(data))
17
+
18
+ #获取当前层feature数
19
+ def get_layer_feature_count(jobName, stepName, layerName):
20
+ data = {
21
+ 'func': 'GET_LAYER_FEATURE_COUNT',
22
+ 'paras': {'jobName': jobName,
23
+ 'stepName': stepName,
24
+ 'layerName': layerName}
25
+ }
26
+ return deepline.process(json.dumps(data))
27
+
28
+ def get_opened_jobs():
29
+ data = {
30
+ 'func': 'GET_OPENED_JOBS'
31
+ }
32
+ #print(json.dumps(data))
33
+ return deepline.process(json.dumps(data))
34
+
35
+ def open_job(path, job):
36
+ data = {
37
+ 'func': 'OPEN_JOB',
38
+ 'paras': [{'path': path},
39
+ {'job': job}]
40
+ }
41
+ # print(json.dumps(data))
42
+ ret = deepline.process(json.dumps(data))
43
+ return ret
44
+
45
+ def get_matrix(job):
46
+ data = {
47
+ 'func': 'GET_MATRIX',
48
+ 'paras': {'job': job}
49
+ }
50
+ # print(json.dumps(data))
51
+ return deepline.process(json.dumps(data))
52
+
53
+ def has_profile(job, step):
54
+ data = {
55
+ 'func': 'HAS_PROFILE',
56
+ 'paras': {
57
+ 'job': job,
58
+ 'step': step
59
+ }
60
+ }
61
+ #print(json.dumps(data))
62
+ return deepline.process(json.dumps(data))
63
+
64
+ def get_profile_box(job, step):
65
+ data = {
66
+ 'func': 'PROFILE_BOX',
67
+ 'paras': {'job': job,
68
+ 'step': step}
69
+ }
70
+ js = json.dumps(data)
71
+ #print(js)
72
+ ret = deepline.process(json.dumps(data))
73
+ return ret
74
+
75
+ #导出
76
+ def layer_export(job, step, layer, _type, filename, gdsdbu, resize, angle, scalingX, scalingY, isReverse,
77
+ mirror, rotate, scale, profiletop, cw, cutprofile, mirrorpointX, mirrorpointY, rotatepointX,
78
+ rotatepointY, scalepointX, scalepointY, mirrordirection, cut_polygon,numberFormatL=2,numberFormatR=6,
79
+ zeros=2,unit=0):
80
+ data = {
81
+ 'func': 'LAYER_EXPORT',
82
+ 'paras': {
83
+ 'job': job,
84
+ 'step': step,
85
+ 'layer': layer,
86
+ 'type': _type,
87
+ 'filename': filename,
88
+ 'gdsdbu': gdsdbu,
89
+ 'resize': resize,
90
+ 'angle': angle,
91
+ 'scalingX': scalingX,
92
+ 'scalingY': scalingY,
93
+ 'isReverse': isReverse,
94
+ 'mirror': mirror,
95
+ 'rotate': rotate,
96
+ 'scale': scale,
97
+ 'profiletop': profiletop,
98
+ 'cw': cw,
99
+ 'cutprofile': cutprofile,
100
+ 'mirrorpointX': mirrorpointX,
101
+ 'mirrorpointY': mirrorpointY,
102
+ 'rotatepointX': rotatepointX,
103
+ 'rotatepointY': rotatepointY,
104
+ 'scalepointX': scalepointX,
105
+ 'scalepointY': scalepointY,
106
+ 'mirrordirection': mirrordirection,
107
+ 'cut_polygon': cut_polygon,
108
+ 'numberFormatL': numberFormatL,
109
+ 'numberFormatR': numberFormatR,
110
+ 'zeros': zeros,
111
+ 'unit': unit
112
+ }
113
+ }
114
+ js = json.dumps(data)
115
+ print(js)
116
+ return deepline.process(json.dumps(data))
117
+
118
+ #load layer
119
+ def load_layer(jobname, stepname, layername):
120
+ data = {
121
+ 'func': 'LOAD_LAYER',
122
+ 'paras': {'jobname': jobname,
123
+ 'stepname': stepname,
124
+ 'layername': layername}
125
+ }
126
+ js = json.dumps(data)
127
+ #print(js)
128
+ deepline.process(json.dumps(data))
129
+
130
+ #料号另存为
131
+ def save_job_as(job, path):
132
+ data = {
133
+ 'func': 'SAVE_JOB_AS',
134
+ 'paras': {
135
+ 'job': job,
136
+ 'path': path
137
+ }
138
+ }
139
+ js = json.dumps(data)
140
+ #print(js)
141
+ ret = deepline.process(json.dumps(data))
142
+ return ret
@@ -0,0 +1,5 @@
1
+ from deepKernel import deepline,base
2
+
3
+ def init(path:str):
4
+ deepline.init(path)
5
+ base.set_config_path(path)
@@ -1,5 +1,5 @@
1
- import os, sys, json, math
2
- import deepline, base
1
+ import json
2
+ from deepKernel import base
3
3
 
4
4
  #打开料号
5
5
  def open_job(job:str, path:str)->bool:
@@ -1,5 +1,5 @@
1
- import deepline,base
2
- import os, sys, json
1
+ from deepKernel import base
2
+ import json
3
3
 
4
4
 
5
5
  #打开料号
@@ -0,0 +1,55 @@
1
+ import json
2
+ from deepKernel import base,information
3
+
4
+ def save_gerber( job:str, step:str, layer:str, filename:str, resize:int=0, angle:float=0,
5
+ scalingX:float=1, scalingY:float=1, mirror:bool=False, rotate:bool=False,
6
+ scale:bool=False, cw:bool=False, mirrorpointX:int=0, mirrorpointY:int=0,
7
+ rotatepointX:int=0, rotatepointY:int=0, scalepointX:int=0, scalepointY:int=0,
8
+ mirrorX:bool = False, mirrorY:bool = False, numberFormatL:int=2,
9
+ numberFormatR:int=6, zeros:int=0, unit:int=0)->bool:
10
+ try:
11
+ _type = 0
12
+ gdsdbu = 0.01
13
+ profiletop = False
14
+ cutprofile = True
15
+ isReverse = False
16
+ cut_polygon = []
17
+ if scalingX == 0:
18
+ scalingX == 1
19
+ if scalingY == 0:
20
+ scalingY == 1
21
+ if mirrorX == True and mirrorY ==True:
22
+ mirrordirection = 'XY'
23
+ elif mirrorX==True and mirrorY ==False:
24
+ mirrordirection = 'Y'
25
+ elif mirrorX==False and mirrorY ==True:
26
+ mirrordirection = 'X'
27
+ else:
28
+ mirrordirection = 'NO'
29
+ _ret = base.layer_export(job, step, layer, _type, filename, gdsdbu, resize, angle, scalingX, scalingY, isReverse,
30
+ mirror, rotate, scale, profiletop, cw, cutprofile, mirrorpointX, mirrorpointY, rotatepointX,
31
+ rotatepointY, scalepointX, scalepointY, mirrordirection, cut_polygon,numberFormatL,numberFormatR,
32
+ zeros,unit)
33
+ ret = json.loads(_ret)['status']
34
+ if ret == 'true':
35
+ ret = True
36
+ else:
37
+ ret = False
38
+ return ret
39
+ except Exception as e:
40
+ print(e)
41
+ return False
42
+
43
+ def save_job(job:str,path:str)->bool:
44
+ try:
45
+ layers = information.get_layers(job)
46
+ steps = information.get_steps(job)
47
+ for step in steps:
48
+ for layer in layers:
49
+ base.load_layer(job,step,layer)
50
+ base.save_job_as(job,path)
51
+ return True
52
+ except Exception as e:
53
+ print(e)
54
+ return False
55
+
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deepKernel
3
- Version: 0.0.3
3
+ Version: 0.0.6
4
4
  Summary: A simple example package
5
5
  Home-page: https://www.pzeda.com/CN
6
6
  Author: pz
7
7
  Author-email: meichiyuan@pzeda.com
8
8
  Classifier: Programming Language :: Python :: 3
9
- Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
10
10
  Classifier: Operating System :: OS Independent
11
11
  Requires-Python: >=3.6
12
12
  Description-Content-Type: text/markdown
@@ -21,4 +21,6 @@ Dynamic: license-file
21
21
  Dynamic: requires-python
22
22
  Dynamic: summary
23
23
 
24
- 测试
24
+ 20250926 0.0.5 正式第一版,主要使用configuration.init、input.open_job、information.get_profile_box以测试SDK包是否可用
25
+
26
+ 20250928 0.0.6 正式第二版,主要加入output模块用以测试导出Gerber/ODBPP接口是否可用
@@ -7,6 +7,7 @@ deepKernel/configuration.py
7
7
  deepKernel/deepline.py
8
8
  deepKernel/information.py
9
9
  deepKernel/input.py
10
+ deepKernel/output.py
10
11
  deepKernel.egg-info/PKG-INFO
11
12
  deepKernel.egg-info/SOURCES.txt
12
13
  deepKernel.egg-info/dependency_links.txt
@@ -6,21 +6,21 @@ with open("README.md", "r", encoding="utf-8") as fh:
6
6
 
7
7
  setuptools.setup(
8
8
  name="deepKernel", # Replace with your desired PyPI package name (must be unique)
9
- version="0.0.3", # Initial version number
9
+ version="0.0.6", # Initial version number
10
10
  author="pz", # Replace with your name
11
11
  author_email="meichiyuan@pzeda.com", # Replace with your email
12
12
  description="A simple example package", # Short description
13
13
  long_description=long_description, # Use README.md as long description
14
14
  long_description_content_type="text/markdown", # Format of long description
15
15
  url="https://www.pzeda.com/CN", # Replace with your package's URL (e.g., GitHub repo)
16
- packages=setuptools.find_packages(), # Automatically find package directories (will find /)
16
+ packages=setuptools.find_packages(), # Automatically find package directories (will find zephyrzhong/)
17
17
  classifiers=[ # Package classifiers
18
18
  "Programming Language :: Python :: 3",
19
- "License :: OSI Approved :: MIT License", # Ensure this matches your LICENSE file
19
+ "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", # Ensure this matches your LICENSE file
20
20
  "Operating System :: OS Independent",
21
21
  ],
22
22
  python_requires='>=3.6', # Specify compatible Python versions
23
23
  # install_requires=[ # List dependencies here if any
24
24
  # 'requests>=2.20.0',
25
25
  # ],
26
- )
26
+ )
@@ -1 +0,0 @@
1
- 测试
@@ -1 +0,0 @@
1
- import deepline
@@ -1,74 +0,0 @@
1
- import deepline
2
- import json,operator
3
- import math
4
-
5
- def _init():
6
- global _global_dict
7
- _global_dict={}
8
-
9
- def set_config_path(path):
10
- data = {
11
- 'func': 'SET_CONFIG_PATH',
12
- 'paras': {
13
- 'path': path
14
- }
15
- }
16
- #print(json.dumps(data))
17
- return deepline.process(json.dumps(data))
18
-
19
- #获取当前层feature数
20
- def get_layer_feature_count(jobName, stepName, layerName):
21
- data = {
22
- 'func': 'GET_LAYER_FEATURE_COUNT',
23
- 'paras': {'jobName': jobName,
24
- 'stepName': stepName,
25
- 'layerName': layerName}
26
- }
27
- return deepline.process(json.dumps(data))
28
-
29
- def get_opened_jobs():
30
- data = {
31
- 'func': 'GET_OPENED_JOBS'
32
- }
33
- #print(json.dumps(data))
34
- return deepline.process(json.dumps(data))
35
-
36
- def open_job(path, job):
37
- data = {
38
- 'func': 'OPEN_JOB',
39
- 'paras': [{'path': path},
40
- {'job': job}]
41
- }
42
- # print(json.dumps(data))
43
- ret = deepline.process(json.dumps(data))
44
- return ret
45
-
46
- def get_matrix(job):
47
- data = {
48
- 'func': 'GET_MATRIX',
49
- 'paras': {'job': job}
50
- }
51
- # print(json.dumps(data))
52
- return deepline.process(json.dumps(data))
53
-
54
- def has_profile(job, step):
55
- data = {
56
- 'func': 'HAS_PROFILE',
57
- 'paras': {
58
- 'job': job,
59
- 'step': step
60
- }
61
- }
62
- #print(json.dumps(data))
63
- return deepline.process(json.dumps(data))
64
-
65
- def get_profile_box(job, step):
66
- data = {
67
- 'func': 'PROFILE_BOX',
68
- 'paras': {'job': job,
69
- 'step': step}
70
- }
71
- js = json.dumps(data)
72
- #print(js)
73
- ret = deepline.process(json.dumps(data))
74
- return ret
@@ -1,6 +0,0 @@
1
- import deepline,base
2
- import os, sys, json,requests,time
3
-
4
- def init(path:str):
5
- deepline.init(path)
6
- base.set_config_path(path)
File without changes
File without changes