mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2026-02-06 06:25:06 +00:00
Dev backward (#228)
* Workbench example, adjust log level, and ci check (#220)
* TestLatency Return Value Example & gitignore update
* Adjust log level & Add workbench virtual example & Add not action decorator & Add check_mode &
* Add CI Check
* CI Check Fix 1
* CI Check Fix 2
* CI Check Fix 3
* CI Check Fix 4
* CI Check Fix 5
* Upgrade to py 3.11.14; ros 0.7; unilabos 0.10.16
* Update to ROS2 Humble 0.7
* Fix Build 1
* Fix Build 2
* Fix Build 3
* Fix Build 4
* Fix Build 5
* Fix Build 6
* Fix Build 7
* ci(deps): bump actions/configure-pages from 4 to 5 (#222)
Bumps [actions/configure-pages](https://github.com/actions/configure-pages) from 4 to 5.
- [Release notes](https://github.com/actions/configure-pages/releases)
- [Commits](https://github.com/actions/configure-pages/compare/v4...v5)
---
updated-dependencies:
- dependency-name: actions/configure-pages
dependency-version: '5'
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* ci(deps): bump actions/upload-artifact from 4 to 6 (#224)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v6)
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-version: '6'
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* ci(deps): bump actions/upload-pages-artifact from 3 to 4 (#225)
Bumps [actions/upload-pages-artifact](https://github.com/actions/upload-pages-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-pages-artifact/releases)
- [Commits](https://github.com/actions/upload-pages-artifact/compare/v3...v4)
---
updated-dependencies:
- dependency-name: actions/upload-pages-artifact
dependency-version: '4'
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* ci(deps): bump actions/checkout from 4 to 6 (#223)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v6)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-version: '6'
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Fix Build 8
* Fix Build 9
* Fix Build 10
* Fix Build 11
* Fix Build 12
* Fix Build 13
* v0.10.17
(cherry picked from commit 176de521b4)
* CI Check use production mode
* Fix OT2 & ReAdd Virtual Devices
* add msg goal
* transfer liquid handles
* gather query
* add unilabos_class
* Support root node change pos
* save class name when deserialize & protocol execute test
* fix upload workflow json
* workflow upload & set liquid fix & add set liquid with plate
* speed up registry load
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: hanhua@dp.tech <2509856570@qq.com>
This commit is contained in:
@@ -182,3 +182,49 @@ def get_all_subscriptions(instance) -> list:
|
||||
except Exception:
|
||||
pass
|
||||
return subscriptions
|
||||
|
||||
|
||||
def not_action(func: F) -> F:
|
||||
"""
|
||||
标记方法为非动作的装饰器
|
||||
|
||||
用于装饰 driver 类中的方法,使其在 complete_registry 时不被识别为动作。
|
||||
适用于辅助方法、内部工具方法等不应暴露为设备动作的公共方法。
|
||||
|
||||
Example:
|
||||
class MyDriver:
|
||||
@not_action
|
||||
def helper_method(self):
|
||||
# 这个方法不会被注册为动作
|
||||
pass
|
||||
|
||||
def actual_action(self, param: str):
|
||||
# 这个方法会被注册为动作
|
||||
self.helper_method()
|
||||
|
||||
Note:
|
||||
- 可以与其他装饰器组合使用,@not_action 应放在最外层
|
||||
- 仅影响 complete_registry 的动作识别,不影响方法的正常调用
|
||||
"""
|
||||
|
||||
@wraps(func)
|
||||
def wrapper(*args, **kwargs):
|
||||
return func(*args, **kwargs)
|
||||
|
||||
# 在函数上附加标记
|
||||
wrapper._is_not_action = True # type: ignore[attr-defined]
|
||||
|
||||
return wrapper # type: ignore[return-value]
|
||||
|
||||
|
||||
def is_not_action(func) -> bool:
|
||||
"""
|
||||
检查函数是否被标记为非动作
|
||||
|
||||
Args:
|
||||
func: 被检查的函数
|
||||
|
||||
Returns:
|
||||
如果函数被 @not_action 装饰则返回 True,否则返回 False
|
||||
"""
|
||||
return getattr(func, "_is_not_action", False)
|
||||
|
||||
Reference in New Issue
Block a user