-
Notifications
You must be signed in to change notification settings - Fork 16
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
feat: load tool(s) via URL #121
Conversation
dd9dae3
to
e71823d
Compare
f11ee0c
to
1474016
Compare
4ba6a65
to
a7b9b21
Compare
13ea848
to
89d7925
Compare
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
a833597
to
758b005
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for working on this @henryiii.
I wonder if it would make more sense for the API layer to be more focused on complex types instead of primitives and let the CLI layer to do the lifting.
For example, would some of the following alternatives work as Python API?
Validator(
load_tools={
"cibuildwheel": "https://json.schemastore.org/cibuildwheel.json#/properties/tool/properties/cibuildwheel",
}
)
# OR
Validator(
tools=[
RemotePlugin("cibuildwheel", "https://json.schemastore.org/cibuildwheel.json#/properties/tool/properties/cibuildwheel"),
# Would require `RemotePlugin.load()` or something similar
]
)
# OR
Validator(
plugins=[
PluginWrapper(...),
RemotePlugin("cibuildwheel", "https://json.schemastore.org/cibuildwheel.json#/properties/tool/properties/cibuildwheel"),
# Would require `RemotePlugin.schema` to lazily trigger/cache the download
]
)
Co-authored-by: Anderson Bravalheri <andersonbravalheri+github@gmail.com>
93a8035
to
c4afcef
Compare
I basically followed your third suggestion, though I didn't implement lazy loading (it would complicate the implementation quite a bit, and since |
I also had to add |
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
ad51df0
to
f59a976
Compare
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
f59a976
to
454c86b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much, @henryiii.
This looks good. If you are happy with it, please feel free to merge.
I will be away from a proper computer in December, and probably less responsive. But if at any point you want to cut a release, please feel free to do so. I believe that it can be done via the github webUI, and then the CI should take care of it...
This adds
--tool <name>=<url>#<pointer>
support. I've also added basic support for pyodide (untested, probably can add eventually), since loading URLs is different there.