-
Notifications
You must be signed in to change notification settings - Fork 12
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
Speed up --store
support
#138
Comments
Yes, the main idea I've been working on is providing a regularly updated copy of the schema store files as a plugin. The problem with releasing this has been #134, since some schema (cibuildwheel, specifically) required fragment support. That's actually not true anymore, since cibuildwheel now uses a partial, so no current files require fragments. This solves caching as well as stability - a regularly updated Python package can be pinned as well. The |
@abravalheri, I have pushed https://github.com/henryiii/validate-pyproject-schema-store if you'd like to take a look. |
Very nice @henryiii , thank you! I wonder if it would make sense to add this in the |
I'm not sure about "all". A Where would you like validate-pyproject-schema-store to live, by the way? I have it in |
FYI, I've released |
Hi @henryiii, is it just a matter of cutting a new release? |
Awesome, thanks! It's working. See https://scientific-python.github.io/repo-review/ for an initial demo. |
Will see how the auto-update works after SchemaStore/schemastore#3548. |
Auto update works, merged and released it from my phone. New tool in this update, too,
|
This already caught a mistake in cookie's template: scientific-python/cookie#364 (comment) Nice! |
Thanks @henryiii for the work on validate-pyproject-schema-store. With that we're down to around 1.5 seconds to validate our pyproject.toml file with pre-commit. Which isn't extremely fast, but fast enough for our use case. With that in mind, I'm happy to close this issue as resolved. |
Thanks for providing this useful tool.
I looked into validating
pyproject.toml
with acibuildwheel
section. A schema for the cibuildwheel section is included inhttps://json.schemastore.org/pyproject.json
(as of pypa/cibuildwheel#1622), but not in the JSON schema shipped with validate-pyproject. So I went to use the new--store
command-line option in my pre-commit configuration like this:This approach works beautifully on a technical level (i.e., the cibuildwheel tool section is validated correctly), but comes at a cost: running
validate-pyproject
now takes multiple seconds.I haven't done any profiling, but I would assume downloading the individual schemas at least contributes to the cost.
@henryiii, is this something you're seeing as well, and is there already a plan to address this (caching?)
The text was updated successfully, but these errors were encountered: