Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recent API changes #398

Open
MistEO opened this issue Oct 22, 2024 · 6 comments
Open

Recent API changes #398

MistEO opened this issue Oct 22, 2024 · 6 comments
Labels
announcement An announcement from MaaXZY

Comments

@MistEO MistEO added documentation Improvements or additions to documentation enhancement New feature or request work in progress Something is developing labels Oct 22, 2024
@MistEO MistEO pinned this issue Oct 22, 2024
@MistEO MistEO added announcement An announcement from MaaXZY and removed enhancement New feature or request documentation Improvements or additions to documentation work in progress Something is developing labels Oct 22, 2024
@MistEO

This comment was marked as outdated.

@MistEO
Copy link
Member Author

MistEO commented Dec 3, 2024

定义下版本号,对于 vX.Y.Z

  • X 新版本:全新版本,可能有大幅度 breaking changes,接口、行为均可能有较大变动
  • Y 新版本:大版本,新功能、优化等。新增接口,并可能有小幅度的 breaking changes,但会尽量控制影响范围,保证兼容性
  • Z 新版本:小版本,仅 bug 修复、代码优化等,不涉及接口变动,不涉及行为变动
  • alpha 版本:MaaFW 新特性预览,新修改的接口随时可能变动。仅在 XY 新版本后会出现
  • beta 版本:新接口不再变动,binding 可用该版本集成、修复。仅在 XY 新版本后会出现
  • rc 版本:code freeze,但由于当前版本修改过大,改为测试版本发布。仅在 X 新版本后会出现

@MistEO

This comment was marked as outdated.

@MistEO
Copy link
Member Author

MistEO commented Dec 18, 2024

下个大版本存在 breaking changes,基于 术语 的接口重命名,版本号直接叫 3.0 了

@MistEO
Copy link
Member Author

MistEO commented Jan 9, 2025

@MaaXYZ/binding-developers v3.0.0-beta.1 is released, please help develop API changes. Thanks!

包含了一个大的 breaking change,基于术语的重命名,可能全局替换一下就行,逻辑上没有变动。

@MistEO
Copy link
Member Author

MistEO commented Jan 14, 2025

v3.0.0 迁移指南

仅使用 Pipeline 开发的项目

若使用了 check_resource.py,请替换成 新版本
其他没有需要修改的地方。

自行集成 / 使用了 Custom 的项目

以下划线风格的 binding 为例,小驼峰或其他风格请照葫芦画瓢

接口名变动

  • 替换 run_pipeline -> run_task
  • 替换 post_path -> post_bundle
  • 替换 post_pipeline -> post_task
  • 替换 get_task_list -> get_node_list

接口参数变动

  • RecognitionDetail 参数重命名 name -> node_name
  • NodeDetail 参数重命名 name -> node_name

回调消息变动

对于 Python, NodeJS 等有回调解析封装的语言

  • 替换 on_task_ -> on_node_

对于其他语言

  • 替换 Task. -> Node.

Custom 参数名变动

  • CustomRecognition 参数重命名 current_task_name -> node_name
  • CustomAction 参数重命名 current_task_name -> node_name

Python 的额外 property

仅 Python 修改,部分方法添加了属性修饰符,需要去掉小括号调用

  • status() 替换为 status
  • done() 替换为 done
  • succeeded() 替换为 succeeded
  • failed() 替换为 failed
  • pending() 替换为 pending
  • running() 替换为 running

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
announcement An announcement from MaaXZY
Projects
None yet
Development

No branches or pull requests

1 participant