mip: package installation using GitLab URLs for repos in subgroups
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 48/100
調査の方向性
micropython/mip/mip/init.py の 63 行目付近にある _rewrite_url 関数から始め、GitLab のサブグループ URL を使って失敗する mpremote mip install コマンドを再現します。動作する raw URL および既存の GitHub/GitLab 形式と比較します。サブグループのパッケージ URL と依存関係 URL が、現在の URL 処理を壊すことなく正しく解決されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
This is more of an awareness piece and something to trigger a discussion. There is also the possibility that I am wrong and the installation process is working as intended.
I'm currently developing MicroPython packages on GitLab, which sit inside a 'Libraries' subgroup, which is inside a parent 'MicroPython IoT Projects' group.
Due to the way that the mip _rewrite_url function parses GitLab and GitHub URLs, the assumption is made that the first component after splitting the URL, is the org and the second is the repository slug, which doesn't account for subgroups.
As a result, I had to change the way I reference my packages and package extension urls and deps in the package.json files. My network-utils 'package.json' has to have the following structure:
{
"urls": [
["network_utils/__init__.py", "https://gitlab.com/micropython-iot-projects/libraries/micropython-network-utils/-/raw/HEAD/network-utils/network_utils/__init__.py"]
],
"deps": [
["logging", "latest"],
["github:josverl/micropython-stubs/mip/typing.mpy", "main"],
["github:josverl/micropython-stubs/mip/typing_extensions.mpy", "main"]
],
"version": "0.0.1"
}
In order to install network-utils with mpremote, I would have to use the following command:
mpremote mip install https://gitlab.com/micropython-iot-projects/libraries/micropython-network-utils/-/raw/HEAD/network-utils/package.json
The command below will not work, resulting in a 403 error:
mpremote mip install gitlab:micropython-iot-projects/libraries/micropython-network-utils/network-utils/package.json
The network-utils-mqtt extension package, which requires network-utils, had to have its package.json written like so:
{
"urls": [
["network_utils/mqtt.py", "https://gitlab.com/micropython-iot-projects/libraries/micropython-network-utils/-/raw/HEAD/network-utils-mqtt/network_utils/mqtt.py"]
],
"deps": [
["https://gitlab.com/micropython-iot-projects/libraries/micropython-network-utils/-/raw/HEAD/network-utils/", "develop"]
],
"version": "0.0.1"
}
The URL for the deps, which is the network-utils package this one extends, had to be rewritten so that the package.json could be found correctly.
- 主要言語
- Python
- スター
- 2.9k
- フォーク
- 1.1k
- 平均マージ
- 7日 4時間
- マージ済み PR(30日)
- 4
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
micropython/micropython-lib のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
micropython/micropython-lib#1074 ·
-
needs-info
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
micropython/micropython-lib#943 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
micropython/micropython-lib#931 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
micropython/micropython-lib#795 · コメント 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
micropython/micropython-lib#762 ·
micropython/micropython-lib の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
xinnan-tech/xiaozhi-fde-talk#263 ·
-
rules
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
huggingface/Repo2RLEnv#163 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
huggingface/sentence-transformers#4074 ·
-
comp/dashboard invalid P3
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
NousResearch/hermes-agent#121143 ·