micropython / micropython/micropython-lib
mip / package.json: Allow 'deps' to come from another repository
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 1.1k
- Avg merge
- 7d 6h
- Merged PRs (30d)
- 3
Description
Problem
In repo https://github.com/hmaerki/experiment_micropython_mip, I create a mip-package which may be install as follows:
import mip
mip.install("dryer2023", version="main", index="https://hmaerki.github.io/experiment_micropython_mip")
This is the package.json file:
{
"version": "0.1",
"hashes": [
["dryer2023/statemachine.mpy", "a47f24f2064b"],
["dryer2023/__init__.mpy", "c4104085da6d"]
],
"deps": [
["umqtt.simple", "latest"] <== ERROR A
["https://micropython.org/pi/v2/package/6/umqtt.simple/latest.json", "dummy"] <== ERROR B
]
}
The installation of the hashes works nice.
In the deps section, I would like to install umqtt.simple from another index (the micropython default) but I could not make it working.
- ERROR A: Will search in my index (https://hmaerki.github.io/experiment_micropython_mip) which is wrong.
- ERROR B: This will correctly download 'latest.json' but then again will try to get the mpy-files from my index which is wrong.
Proposed: Solution
["umqtt.simple", "latest"] should always search in https://micropython.org/pi/v2
["github:org/repo/path/latest.json", "latest"] should search in github:org/repo/path/latest.json
Are there other suggestions/thoughs?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing mip.install and the package.json deps handling described in the issue, including how hashes and dependency package URLs are resolved. Done means dependencies can be sourced from the default index or another repository without incorrectly fetching their mpy files from the parent package's index, and the proposed dependency forms behave as specified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100