Open vshymanskyy opened 1 month ago
package.json
suggestion:
{
"name": "MySample",
"version": "0.1.0",
"description": "Makes everyone happy",
"author": "Citizen of the Universe",
"license": "MIT",
"readme": "https://link.to/README.md",
"keywords": "json,rest,http,web,esp32",
"urls": [
["fs:main.py", "src/main.py"],
["fs:etc/data.dat", "github:org/repo/dir/file.dat"]
],
"deps": [
["collections-defaultdict", "latest"],
"os-path@latest",
"aiodns"
]
}
Notes:
urls
, deps
are the same as described in https://docs.micropython.org/en/latest/reference/packages.htmlurls
changes:
urls
relative to package.json
.
Probably done in https://github.com/micropython/micropython/pull/12477fs:
the target installation path should pwd (/
or /flash
) by defaultAll of this needs some changes in ViperIDE (and later in mpremote
)
Comments and ideas are welcome
@RobertBlackhart I think this would be very useful for education scenarios
I agree. I really like the ability to link using a URL query. I'd be happy to do some work on #41/#42 if you're looking for volunteers, although I can't promise a timeline right now (not that you're asking, just wanted to set expectations).
No, this is completely on me for now. Also, it's in discussion/definition phase (also setting expectations here :smile: )
There's now an experimental support of installing applications.
For example you can install aiodns
example using this button:
I am adding Run in ViperIDE to another example in emlearn-micropython. Ref this package.json, https://github.com/emlearn/emlearn-micropython/blob/master/examples/har_trees/package.json However, this example one depends on a couple of libraries which are not in micropython-lib, and fails to install because the dependencies are not known. The libraries in question are:
How to add these?
Once #41 is ready, it should be rather easy to implement project import:
package.json
structure. This can be inspired/adapted from mip, node.js, PlatformIO etc.&vm=1
README.md
from the sample