怎么向组件库提交 component ?

zhangjianian
Posts: 10
Joined: Wed Apr 26, 2023 11:55 am

怎么向组件库提交 component ?

Postby zhangjianian » Mon Jul 24, 2023 6:46 am

您好:
我们开发了一套基于 esp32 轻量化的 PSA 及 Web3 的组件,但是应该如何提交到 espressif 的组件库呢?谢谢

ESP_Penguin_Helper
Posts: 156
Joined: Tue Jul 11, 2023 6:55 am

Re: 怎么向组件库提交 component ?

Postby ESP_Penguin_Helper » Tue Jul 25, 2023 2:32 am

你好,如果你想发布一个组件到到 Espressif 维护的仓库,且该仓库已经配置了 upload-components-ci-action 的 Github Action,那么你只需要注册一个 ESP-Registry 的账号并拿到 IDF_COMPONENT_API_TOKEN,然后在相关 Action 中更新参数。参考:https://github.com/espressif/esp-iot-so ... nt.yml#L19

ESP-Registry:https://components.espressif.com/

zhangjianian
Posts: 10
Joined: Wed Apr 26, 2023 11:55 am

Re: 怎么向组件库提交 component ?

Postby zhangjianian » Tue Jul 25, 2023 6:33 am

ESP_Penguin_Helper wrote:
Tue Jul 25, 2023 2:32 am
你好,如果你想发布一个组件到到 Espressif 维护的仓库,且该仓库已经配置了 upload-components-ci-action 的 Github Action,那么你只需要注册一个 ESP-Registry 的账号并拿到 IDF_COMPONENT_API_TOKEN,然后在相关 Action 中更新参数。参考:https://github.com/espressif/esp-iot-so ... nt.yml#L19

ESP-Registry:https://components.espressif.com/
您好,感谢您的回复,我还有几个问题想请假:
1. 整个过程是否有详细的文档说明?我确实没有找到
2. 我看过 ESP-Registry 中的第三方组件,你上面所说的步骤是否是可以以一个 github repo 的方式注册,比如向 LVGL 组件,或是形式上如 arudino (我们已经在 arudino 的 library 上注册了我们的 lib)

谢谢

ESP_Penguin_Helper
Posts: 156
Joined: Tue Jul 11, 2023 6:55 am

Re: 怎么向组件库提交 component ?

Postby ESP_Penguin_Helper » Tue Jul 25, 2023 12:53 pm

您好,ESP-Registry 可以直接使用 github 账号注册。像 LVGL 一样以一个 github repo 的方式注册是可以的。我们欢迎第三方分享自己创建的组件。但是您需要符合使用规范,如在 github 上需添加 LICENCE.txt。

ESP-Registry 使用规范:https://docs.espressif.com/projects/idf ... index.html

ESP-Registry 上传 component:https://docs.espressif.com/projects/idf ... -component

zhangjianian
Posts: 10
Joined: Wed Apr 26, 2023 11:55 am

Re: 怎么向组件库提交 component ?

Postby zhangjianian » Wed Aug 02, 2023 6:11 pm

首先感谢您的回复,我在具体的操作过程中还存在一些我问题:
1. namespace
https://docs.espressif.com/projects/idf ... nents.html
文档中说明:
compote component upload --namespace [YOUR_NAMESPACE] --name test_cmp

Once uploaded, your component should be viewable on <https://components.espressif.com/compon ... E/test_cmp>

我的理解是 YOUR_NAMESPACE 是可以自定义的,比如我填入 --namespace xxx 那么我就可以在
https://components.espressif.com/compon ... x/test_cmp 看到我上传的组件。
但是,文档中又写道:
Note:For now, creating custom namespace is not supported. Please contact us if you have such needs.
这个不支持自定义 namespace 怎么理解呢?

还有就是我在 https://components.espressif.com/ 中通过 github 注册账号,账户的 profile 显示
Namespace roles
NAMESPACE ROLE
iloveyou-github owner

其中 iloveyo-github 是我 github 的名称
这里面的 namespace 与我上面的提到的 upload 的 --namespace 有什么关系呢?
或者说,我以这个账户申请的 token 上传我的 component ,是不是会默认放在 iloveyou-github 这个 namespace 下,而我却不能自定义,谢谢。
我的需求是希望可以用我们公司的名称(IoTeX)建立一个 namespace


2. Authentication with a Config File
在这个章节中提到了 windows 环境中
C:/Users/YOUR_USERNAME/.espressif
Values provided in default profile would be used by default.

而我并没有在我的 C:/Users/YOUR_USERNAME/.espressif 文件夹下看到一个 default 的 Config File ,请问这个配置文件的文件名和文件类型是什么?谢谢

ESP_Penguin_Helper
Posts: 156
Joined: Tue Jul 11, 2023 6:55 am

Re: 怎么向组件库提交 component ?

Postby ESP_Penguin_Helper » Thu Aug 03, 2023 3:07 am

你好,

Namespace 是你 ESP-Registry 账户的名字。目前 ESP-Registry 不支持自定义账户改名,但是你可以用公司的名字创建一个 Github 账户,这样 namespace 就是你公司的名称了。

如果你没有找到 default 的 Config File,你可以自己创建一个文件 idf_component_manager.yml

zhangjianian
Posts: 10
Joined: Wed Apr 26, 2023 11:55 am

Re: 怎么向组件库提交 component ?

Postby zhangjianian » Tue Aug 15, 2023 6:12 pm

您好,首先感谢您的解答

我在最后使用 compote component upload 时出现一个 ERROR 提示:

ERROR: You are not allowed to perform this action.
screenshot-20230816-021028.png
screenshot-20230816-021028.png (94.21 KiB) Viewed 1994 times
请问,这是什么问题呢?应该怎么解决呢?谢谢

ESP_Penguin_Helper
Posts: 156
Joined: Tue Jul 11, 2023 6:55 am

Re: 怎么向组件库提交 component ?

Postby ESP_Penguin_Helper » Wed Aug 16, 2023 2:11 am

大概率是 token 的权限问题。你现在使用的是哪个 token?更换 token 种类试一下呢?
Attachments
tokens.png
tokens.png (20.42 KiB) Viewed 1965 times

zhangjianian
Posts: 10
Joined: Wed Apr 26, 2023 11:55 am

Re: 怎么向组件库提交 component ?

Postby zhangjianian » Wed Aug 16, 2023 3:00 am

感谢您的回复:
screenshot-20230816-105618.png
screenshot-20230816-105618.png (38.35 KiB) Viewed 1949 times
我重新试图创建新的 token,但是除了 Description 可以输入信息外,其它都无法修改,我不是很清楚您说的
“你现在使用的是哪个 token?更换 token 种类试一下呢?”
这句话的意思,我可以在哪里选择更换呢?谢谢

P.S 图中的三个 token 中的 scopes 与您给的完全一致

zhangjianian
Posts: 10
Joined: Wed Apr 26, 2023 11:55 am

Re: 怎么向组件库提交 component ?

Postby zhangjianian » Wed Aug 16, 2023 4:28 am

您好,我明白您的意思了,是在创建时选择一个 scop,我已经成功上传了。但是在上传后提示了一个 Warning

WARNING: A valid license file for this software could not be found. Please note that all components uploaded to our registry must have a valid license. This is to ensure that the components are safe and legal to use, and to protect the intellectual property rights of our contributors.

但是我的 component 内有一个 LICENSE 文件,并在 IDF Component Registry 里有显示,这个 Warning 需要我修改什么吗?谢谢
screenshot-20230816-122719.png
screenshot-20230816-122719.png (82.64 KiB) Viewed 1932 times

Who is online

Users browsing this forum: Bing [Bot], qwertyasdfg and 41 guests