qlsdk2 0.4.2__py3-none-any.whl → 0.5.1__py3-none-any.whl

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.
qlsdk/rsc/parser/base.py CHANGED
@@ -1,3 +1,6 @@
1
+ from io import BytesIO
2
+ from multiprocessing import Lock
3
+ import time
1
4
  from qlsdk.rsc.interface import IDevice, IParser
2
5
 
3
6
  from loguru import logger
@@ -11,7 +14,13 @@ class TcpMessageParser(IParser):
11
14
  self.device = device
12
15
  self.running = False
13
16
 
14
- self.cache = b''
17
+ # 网络实时数据缓存,选用BytesIO
18
+ # 临时缓冲区-用于接收数据
19
+ self.cache = BytesIO()
20
+ # 缓冲区-用于处理数据
21
+ self.buffer = BytesIO()
22
+ # 读写锁-用于临时缓冲区(避免读写冲突)
23
+ self._lock = Lock()
15
24
 
16
25
  @property
17
26
  def header(self):
@@ -28,42 +37,121 @@ class TcpMessageParser(IParser):
28
37
  def set_device(self, device):
29
38
  self.device = device
30
39
 
31
- def append(self, buffer):
32
- self.cache += buffer
33
- logger.trace(f"已缓存的数据长度: {len(self.cache)}")
34
-
40
+ def append(self, value):
41
+ # self.cache.write(buffer)
42
+ with self._lock:
43
+ self.cache.write(value)
44
+
35
45
  def __parser__(self):
36
46
  logger.info("数据解析开始")
37
- while self.running:
38
- if len(self.cache) < 14:
39
- continue
40
- if self.cache[0] != 0x5A or self.cache[1] != 0xA5:
41
- self.cache = self.cache[1:]
42
- continue
43
- pkg_len = int.from_bytes(self.cache[8:12], 'little')
44
- logger.trace(f" cache len: {len(self.cache)}, pkg_len len: {len(self.cache)}")
45
- # 一次取整包数据
46
- if len(self.cache) < pkg_len:
47
- continue
48
- pkg = self.cache[:pkg_len]
49
- self.cache = self.cache[pkg_len:]
50
- self.unpack(pkg)
47
+
48
+ # 告警阈值(10M)
49
+ warn_len = 10 * 1024 * 1024
50
+
51
+ try:
52
+ while self.running:
53
+ buf_len = get_len(self.buffer)
54
+
55
+ if buf_len < self.header_len:
56
+ logger.trace(f"操作区缓存数据不足: expect: {self.header_len}, actual: {buf_len}, 等待数据...")
57
+ if not self.__fill_from_cache():
58
+ time.sleep(0.1)
59
+ continue
60
+
61
+ if buf_len > warn_len:
62
+ logger.warning(f"操作区缓存数据过大: {buf_len} bytes, 可能存在数据丢失风险")
63
+
64
+ start_pos = self.buffer.tell()
65
+ head = self.buffer.read(2)
66
+ if head != self.header:
67
+ logger.debug(f"数据包头部不匹配: {head.hex()}, 期望: {self.header.hex()},继续查找...")
68
+ self.buffer.seek(start_pos + 1) # 移动到下一个字节
69
+ continue
70
+
71
+ # 移动下标(指向包长度的位置)
72
+ self.buffer.seek(start_pos + 8)
73
+ # 包总长度
74
+ pkg_len = int.from_bytes(self.buffer.read(4), 'little')
75
+ buf_len = get_len(self.buffer)
76
+
77
+ # 直接等待长度足够(如果从头开始判断,因为逻辑相同,所以会执行一样的操作)
78
+ while buf_len < pkg_len:
79
+ logger.trace(f"操作区缓存数据不足: expect: {pkg_len}, actual: {buf_len}, 等待数据...")
80
+ if self.__fill_from_cache():
81
+ buf_len = get_len(self.buffer)
82
+ continue
83
+ else:
84
+ time.sleep(0.05)
85
+
86
+ # 读取剩余数据
87
+ self.buffer.seek(pkg_len)
88
+ tmp = self.buffer.read()
89
+
90
+ # 读取当前数据包
91
+ self.buffer.seek(start_pos)
92
+ pkg = self.buffer.read(pkg_len)
93
+
94
+ # 清空操作区缓存(truncate会保留内存,重新初始化)
95
+ self.buffer = BytesIO()
96
+ if len(tmp) > 0:
97
+ self.buffer.write(tmp)
98
+ self.buffer.seek(0)
99
+
100
+ self.unpack(pkg)
101
+ except Exception as e:
102
+ logger.error(f"数据解析异常: {e}")
103
+
104
+ logger.info(f"数据解析结束:{self.running}")
105
+
106
+ # 填充操作区缓存
107
+ def __fill_from_cache(self) -> bool:
108
+ result = False
109
+
110
+ cur_pos = self.buffer.tell()
111
+ # 移动到操作区缓存末尾,内容追加到缓冲区尾部
112
+ self.buffer.seek(0,2)
113
+ len = self.buffer.tell()
114
+ # 操作缓冲区
115
+ with self._lock:
116
+ cache_len = get_len(self.cache)
117
+
118
+ # 临时缓冲区只要有数据,就写入操作缓冲区(避免分片传输导致数据不完整)
119
+ if cache_len > 0:
120
+ if len == 0:
121
+ self.buffer = self.cache
122
+ cur_pos = 0
123
+ else:
124
+ self.buffer.write(self.cache.getvalue())
125
+ self.cache = BytesIO() # 清空缓冲区
126
+ result = True
127
+
128
+ self.buffer.seek(cur_pos) # 恢复到原位置
129
+
130
+ return result
51
131
 
52
132
  def unpack(self, packet):
53
133
  # 提取指令码
54
134
  cmd_code = int.from_bytes(packet[self.cmd_pos : self.cmd_pos + 2], 'little')
55
135
  cmd_class = CommandFactory.create_command(cmd_code)
56
- logger.info(f"收到指令:{cmd_class.cmd_desc}[{hex(cmd_code)}]")
57
136
  instance = cmd_class(self.device)
58
- start = time_ns()
59
- logger.info(f"开始解析: {start}")
60
137
  instance.parse_body(packet[self.header_len:-2])
61
- logger.info(f"解析完成:{time_ns()}, 解析耗时:{time_ns() - start}ns")
62
138
  return instance
63
139
 
64
140
  def start(self):
65
141
  self.running = True
66
- parser = Thread(target=self.__parser__,)
67
- parser.daemon = True
142
+ parser = Thread(target=self.__parser__, daemon=True)
68
143
  parser.start()
69
-
144
+
145
+ def stop(self):
146
+ self.running = False
147
+
148
+ # 工具方法
149
+ def get_len(buf: BytesIO) -> int:
150
+ if buf is None:
151
+ return 0
152
+ cur_pos = buf.tell()
153
+ buf.seek(0, 2) # 移动到操作区缓存末尾
154
+ len = buf.tell()
155
+ buf.seek(cur_pos) # 恢复到原位置
156
+ return len
157
+
@@ -0,0 +1,57 @@
1
+ Metadata-Version: 2.1
2
+ Name: qlsdk2
3
+ Version: 0.5.1
4
+ Summary: SDK for quanlan device
5
+ Home-page: https://github.com/hehuajun/qlsdk
6
+ Author: hehuajun
7
+ Author-email: hehuajun@eegion.com
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: Microsoft :: Windows :: Windows 10
11
+ Requires-Python: >=3.9
12
+ Description-Content-Type: text/markdown
13
+ Requires-Dist: loguru >=0.6.0
14
+ Requires-Dist: numpy >=1.23.5
15
+ Requires-Dist: bitarray >=1.5.3
16
+ Provides-Extra: dev
17
+ Requires-Dist: pytest >=6.0 ; extra == 'dev'
18
+ Requires-Dist: twine >=3.0 ; extra == 'dev'
19
+
20
+ # 版本 v0.5.1 (2025-08-04)
21
+
22
+ ## ⚙️ 优化
23
+ #### 修复C16R通道映射的问题
24
+
25
+ #### 支持设置记录参数,在需要保存大量事件时使用
26
+
27
+ #### 订阅队列满的时候,丢弃最早的数据
28
+
29
+
30
+ # 版本 v0.5.0 (2025-07-29)
31
+
32
+ ## 🚀 新特性
33
+
34
+ 1. **C16R设备连接**
35
+ 支持C16R类型设备的搜索与连接
36
+
37
+ 2. **C16R信号采集/停止控制**
38
+ 支持信号采集的参数配置
39
+ 支持信号采集的启动与停止控制
40
+
41
+ 3. **C16R数据自动记录**
42
+ 采集到的信号数据自动保存为bdf文件
43
+
44
+ 4. **C16R采集通道设置**
45
+ - 支持数字模式通道配置
46
+ - 支持名称模式通道配置
47
+ - 支持两种模式混合使用
48
+
49
+ ## ⚙️ 优化
50
+
51
+ 1. **性能提升**
52
+ - 信号接收效率优化
53
+ - 指令拆包方式优化
54
+
55
+ 2. **日志系统改进**
56
+ - 日志级别精细化调整,减少不必要的日志信息
57
+ - 日志文案清晰化
@@ -8,7 +8,7 @@ qlsdk/core/local.py,sha256=vbison4XZtS4SNYLJ9CqBhetEcukdviTWmvtdA1efkQ,811
8
8
  qlsdk/core/utils.py,sha256=yfCiLpufO96I68MLs6Drc6IECRjcQ-If8sXn7RaRHrk,4241
9
9
  qlsdk/core/crc/__init__.py,sha256=kaYSr6KN5g4U49xlxAvT2lnEeGtwX4Dz1ArwKDvUIIY,143
10
10
  qlsdk/core/crc/crctools.py,sha256=sDeE6CMccQX2cRAyMQK0SZUk1fa50XMuwqXau5UX5C8,4242
11
- qlsdk/core/entity/__init__.py,sha256=OHedug2XusjSuxQ479bcX5IVq35FTFWEfYriFT3rEzY,3339
11
+ qlsdk/core/entity/__init__.py,sha256=1BBbL41zqb0_UsxgoiuyG5zM0CKVzT5VUA_BXSKZmAs,3177
12
12
  qlsdk/core/filter/__init__.py,sha256=YIWIzDUKN30mq2JTr53ZGblggZfC_rLUp2FSRrsQFgU,36
13
13
  qlsdk/core/filter/norch.py,sha256=5RdIBX5eqs5w5nmVAnCB3ESSuAT_vVBZ2g-dg6HMZdY,1858
14
14
  qlsdk/core/message/__init__.py,sha256=sHuavOyHf4bhH6VdDpTA1EsCh7Q-XsPHcFiItpVz3Rs,51
@@ -20,7 +20,7 @@ qlsdk/core/network/monitor.py,sha256=QqjjPwSr1kgqDTTySp5bpalZmsBQTaAWSxrfPLdROZo
20
20
  qlsdk/persist/__init__.py,sha256=b8qk1aOU6snEMCQNYDl1ijV3-2gwBmMt76fiAzNk1E8,107
21
21
  qlsdk/persist/ars_edf.py,sha256=_pYtHqucB-utMw-xUXZc9IB8_8ThbLFpTl_-WBQR-Sc,10555
22
22
  qlsdk/persist/edf.py,sha256=ETngb86CfkIUJYWmw86QR445MvTFC7Edk_CH9nyNgtY,7857
23
- qlsdk/persist/rsc_edf.py,sha256=fY1eRMflCvOshN_YTxmzT3MYzEHyHtNMiczCgXWgJ7w,11878
23
+ qlsdk/persist/rsc_edf.py,sha256=89Wv7r6u_J4fHlGKsIBAUYD7SOdfqFRxbwV2asvutH8,13315
24
24
  qlsdk/persist/stream.py,sha256=TCVF1sqDrHiYBsJC27At66AaCs-_blXeXA_WXdJiIVA,5828
25
25
  qlsdk/rsc/__init__.py,sha256=hOMiN0eYn4jYo7O4_0IPlQT0hD15SqqCQUihOVlTZvs,269
26
26
  qlsdk/rsc/device_manager.py,sha256=1ucd-lzHkNeQPKPzXV6OBkAMqPp_vOcsLyS-9TJ7wRc,4448
@@ -29,27 +29,29 @@ qlsdk/rsc/eegion.py,sha256=lxrktO-3Z_MYdFIwc4NxvgLM5AL5kU3UItjH6tsKmHY,11670
29
29
  qlsdk/rsc/entity.py,sha256=-fRWFkVWp9d8Y1uh6GiacXC5scdeEKNiNFf3aziGdCE,17751
30
30
  qlsdk/rsc/paradigm.py,sha256=DGfwY36sMdPIMRjbGo661GvUTEwsRRi3jrmG405mSTk,12840
31
31
  qlsdk/rsc/proxy.py,sha256=9CPdGNGWremwBUh4GvlXAykYB-x_BEPPLqsNvwuwIDE,2736
32
- qlsdk/rsc/command/__init__.py,sha256=3rONCv9eFjIS1Hk2T0uoCwSo_wt89QSi1PYfdFNLv3k,11896
32
+ qlsdk/rsc/command/__init__.py,sha256=2rqWM23fFqvFfgN7K3PLT7rkTyW9mawK4OGCo63hnJg,12292
33
33
  qlsdk/rsc/command/message.py,sha256=nTdG-Vp4MBnltyrgedAWiKD6kzOaPrg58Z_hq6yjhys,12220
34
- qlsdk/rsc/device/__init__.py,sha256=5tNSYmpl_jfaHZcOMyB2IcO-tzL-Pj5f3V8CRC8uLHc,73
35
- qlsdk/rsc/device/arskindling.py,sha256=HEy0yCloDWiveRT5lY3qVDAfqPfr_FiztbiZeqQPT3k,14895
36
- qlsdk/rsc/device/base.py,sha256=lrdLi9OXeVgLsUn5Bif9sJ9PZo5cDUQ-moOGur5Gsp8,15685
37
- qlsdk/rsc/device/c256_rs.py,sha256=ns4osmACbStDf7oz8aBnfZhJCe1R2g3M--_Oum6eN50,13921
38
- qlsdk/rsc/device/c64_rs.py,sha256=hzOQxtZf_X-sdTR32-WsO7MNGn-tyPImuXRpwpdSMTo,13578
39
- qlsdk/rsc/device/c64s1.py,sha256=2TmJJ9Ncr0jy8HtdI66C-kSFyCSqAILco3Eijth_oIo,13920
40
- qlsdk/rsc/device/device_factory.py,sha256=B_JZOAGGaLafSdly2i6PeIV2rVoz7S3MJyFfUCICu94,1257
34
+ qlsdk/rsc/device/__init__.py,sha256=xtTXLT9QFKtb-qS-A8-ewSxJ3zXgImFCX0OoAPw6hHE,185
35
+ qlsdk/rsc/device/arskindling.py,sha256=owci6MEGjyWqohEXzPdKj_ESeVIZKgO53StVj6Tmi18,15002
36
+ qlsdk/rsc/device/base.py,sha256=osLToxNrb745OzCpgXZU5AH72emMh4OxATeqy4fCxsg,17856
37
+ qlsdk/rsc/device/c16_rs.py,sha256=BHQRHOnsTMAKgqSXaAS2RjPIklZQAl2CVfe6i_iX-i4,5928
38
+ qlsdk/rsc/device/c256_rs.py,sha256=K1XmLqZpvHTAfCm_dr2VsGxHc67aJQVDV1cI41a1WTI,13955
39
+ qlsdk/rsc/device/c64_rs.py,sha256=cZIioIRGgd4Ub0ieho4_XujBNo8AQgJEjXcqgcEkyFQ,13644
40
+ qlsdk/rsc/device/c64s1.py,sha256=L7nKmsoMCGj6GMjHYfYkKgkBtrGfP516kQHQ5I1FAUE,13986
41
+ qlsdk/rsc/device/device_factory.py,sha256=AL_dtjx6ThcyWTHxGSrLKjEDaCt1Y9gClK4HQ5FGjFI,1315
41
42
  qlsdk/rsc/interface/__init__.py,sha256=xeRzIlQSB7ZSf4r5kLfH5cDQLzCyWeJAReG8Xq5nOE0,70
42
43
  qlsdk/rsc/interface/command.py,sha256=1s5Lxb_ejsd-JNvKMqU2aFSnOoW-_cx01VSD3czxmQI,199
43
- qlsdk/rsc/interface/device.py,sha256=0wCKyI19fbDHVuIMoOhLcJTUSbp4D8ou9SfBVxYA8Qs,3034
44
+ qlsdk/rsc/interface/device.py,sha256=VEV-Ige8tjvASdddP6SPRolTqPuIuHrIZP8wiX-Fhu8,3391
44
45
  qlsdk/rsc/interface/handler.py,sha256=ADDe_a2RAxGMuooLyivH0JBPTGBcFP2JaTVX41R1A4w,198
45
46
  qlsdk/rsc/interface/parser.py,sha256=DxuFZiprJJbG4pfFbbZPaG8MlBiBRe0S0lJrvc2Iees,251
46
47
  qlsdk/rsc/manager/__init__.py,sha256=4ljT3mR8YPBDQur46B5xPqK5tjLKlsWfgCJVuA0gs-8,40
47
- qlsdk/rsc/manager/container.py,sha256=4yQH8P_pEk7vaO_UYkEe9UPga7pFdcKgo1ZpOApAFqM,4866
48
+ qlsdk/rsc/manager/container.py,sha256=mowoFJNVDSEhqsz-EDzPVDcMRiuu_oakdGLZbJrPvlM,5071
48
49
  qlsdk/rsc/manager/search.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
49
50
  qlsdk/rsc/network/__init__.py,sha256=PfYiqXS2pZV__uegQ1TjaeYhY1pefZ_shwE_X5HNVbs,23
50
- qlsdk/rsc/network/discover.py,sha256=ONXN6YWY-OMU0sBoLqqKUyb-8drtAp1g_MvnpzaFvHQ,3124
51
+ qlsdk/rsc/network/discover.py,sha256=4aojzRFInTC3d8K2TYGbnP1Ji5fOFEi31ekghj7ce5k,2977
51
52
  qlsdk/rsc/parser/__init__.py,sha256=8RgwbKCINu3eTsxVLF9cMoBXJnVrDocOEFP6NGP_atk,34
52
- qlsdk/rsc/parser/base.py,sha256=mR41XedSptTwbMdo-KZ_ejo2b2pi5pc-_TGWfW2AF34,2277
53
+ qlsdk/rsc/parser/base-new.py,sha256=cAOy1V_1fAJyGq7bm7uLxpW41DbkllWOprnfWKpjtsQ,5116
54
+ qlsdk/rsc/parser/base.py,sha256=Cqel02BA_AH-deSmzTyUvqecIGoYVBre5UuFlG1eNGA,5728
53
55
  qlsdk/sdk/__init__.py,sha256=v9LKP-5qXCqnAsCkiRE9LDb5Tagvl_Qd_fqrw7y9yd4,68
54
56
  qlsdk/sdk/ar4sdk.py,sha256=tugH3UUeNebdka78AzLyrtAXbYQQE3iFJ227zUit6tY,27261
55
57
  qlsdk/sdk/hub.py,sha256=uEOGZBZtMDCWlV8G2TZe6FAo6eTPcwHAW8zdqr1eq_0,1571
@@ -57,7 +59,7 @@ qlsdk/sdk/libs/libAr4SDK.dll,sha256=kZp9_DRwPdAJ5OgTFQSqS8tEETxUs7YmmETuBP2g60U,
57
59
  qlsdk/sdk/libs/libwinpthread-1.dll,sha256=W77ySaDQDi0yxpnQu-ifcU6-uHKzmQpcvsyx2J9j5eg,52224
58
60
  qlsdk/x8/__init__.py,sha256=FDpDK7GAYL-g3vzfU9U_V03QzoYoxH9YLm93PjMlANg,4870
59
61
  qlsdk/x8m/__init__.py,sha256=cLeUqEEj65qXw4Qa4REyxoLh6T24anSqPaKe9_lR340,634
60
- qlsdk2-0.4.2.dist-info/METADATA,sha256=g6FdFdj4E8B5kRk-MVTVnaUli_S0Z6ckyNKTADf6Dd4,7063
61
- qlsdk2-0.4.2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
62
- qlsdk2-0.4.2.dist-info/top_level.txt,sha256=2CHzn0SY-NIBVyBl07Suh-Eo8oBAQfyNPtqQ_aDatBg,6
63
- qlsdk2-0.4.2.dist-info/RECORD,,
62
+ qlsdk2-0.5.1.dist-info/METADATA,sha256=vJ3DPDoa8rM-m9YdziuNsMNlnx5o21C570W8uZ7FtZU,1572
63
+ qlsdk2-0.5.1.dist-info/WHEEL,sha256=Z4pYXqR_rTB7OWNDYFOm1qRk0RX6GFP2o8LgvP453Hk,91
64
+ qlsdk2-0.5.1.dist-info/top_level.txt,sha256=2CHzn0SY-NIBVyBl07Suh-Eo8oBAQfyNPtqQ_aDatBg,6
65
+ qlsdk2-0.5.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.0)
2
+ Generator: setuptools (70.3.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,121 +0,0 @@
1
- Metadata-Version: 2.2
2
- Name: qlsdk2
3
- Version: 0.4.2
4
- Summary: SDK for quanlan device
5
- Home-page: https://github.com/hehuajun/qlsdk
6
- Author: hehuajun
7
- Author-email: hehuajun@eegion.com
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: License :: OSI Approved :: MIT License
10
- Classifier: Operating System :: OS Independent
11
- Requires-Python: >=3.9
12
- Description-Content-Type: text/markdown
13
- Requires-Dist: loguru>=0.6.0
14
- Requires-Dist: numpy>=1.23.5
15
- Requires-Dist: bitarray>=1.5.3
16
- Provides-Extra: dev
17
- Requires-Dist: pytest>=6.0; extra == "dev"
18
- Requires-Dist: twine>=3.0; extra == "dev"
19
- Dynamic: author
20
- Dynamic: author-email
21
- Dynamic: classifier
22
- Dynamic: description
23
- Dynamic: description-content-type
24
- Dynamic: home-page
25
- Dynamic: requires-dist
26
- Dynamic: requires-python
27
- Dynamic: summary
28
-
29
- # qlsdk project
30
-
31
-
32
-
33
- ## Getting started
34
-
35
- To make it easy for you to get started with GitLab, here's a list of recommended next steps.
36
-
37
- Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
38
-
39
- ## Add your files
40
-
41
- - [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
42
- - [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
43
-
44
- ```
45
- cd existing_repo
46
- git remote add origin http://10.60.170.104/sw/qlsdk-project.git
47
- git branch -M main
48
- git push -uf origin main
49
- ```
50
-
51
- ## Integrate with your tools
52
-
53
- - [ ] [Set up project integrations](http://10.60.170.104/sw/qlsdk-project/-/settings/integrations)
54
-
55
- ## Collaborate with your team
56
-
57
- - [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
58
- - [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
59
- - [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
60
- - [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
61
- - [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
62
-
63
- ## Test and Deploy
64
-
65
- Use the built-in continuous integration in GitLab.
66
-
67
- - [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/)
68
- - [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
69
- - [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
70
- - [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
71
- - [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
72
-
73
- ***
74
-
75
- # Editing this README
76
-
77
- When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
78
-
79
- ## Suggestions for a good README
80
-
81
- Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
82
-
83
- ## Name
84
- Choose a self-explaining name for your project.
85
-
86
- ## Description
87
- Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
88
-
89
- ## Badges
90
- On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
91
-
92
- ## Visuals
93
- Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
94
-
95
- ## Installation
96
- Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
97
-
98
- ## Usage
99
- Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
100
-
101
- ## Support
102
- Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
103
-
104
- ## Roadmap
105
- If you have ideas for releases in the future, it is a good idea to list them in the README.
106
-
107
- ## Contributing
108
- State if you are open to contributions and what your requirements are for accepting them.
109
-
110
- For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
111
-
112
- You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
113
-
114
- ## Authors and acknowledgment
115
- Show your appreciation to those who have contributed to the project.
116
-
117
- ## License
118
- For open source projects, say how it is licensed.
119
-
120
- ## Project status
121
- If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.