Publish schema someplace more predictable/cached
Checklist
- [x] I added a descriptive title
- [x] I searched open reports and couldn't find a duplicate
What happened?
As always, thanks for constructor, and congrats on 3.12! :tada:
The next piece of the schema puzzle is publishing the JSON someplace that has a versioned URL, and broadly available, making it more it reliable for use in downstream tools. raw.githubusercontent is not a great spot, long term, as different users/instutions can be firewalled/ratebanned for various reasons, and requires some tricks to even cache locally.
The first place which might make sense is along with the docs: this could be as simple as adding ../../constructor/data to html_static_paths, which would make it available in /_static/construct.schema.json. However, GitHub pages doesn't allow for multiple deploys versioning, so to get proper versioning, this would probably have to be a more complex approach which e.g. restored the schema for all historic versions from git for publishing.
Another path would be to (also) publish docs on readthedocs.org, which would give basically free versioning as a URL prefix (in addition to a number of other features), though there is, as usual, some integration risk.
Parallel to all of that: getting a URL added to the schema store would give users of willing tools (such as yaml-language-server) a zero-configuration approach without magic comments: one can already add this to construct.yaml and start getting completion, hover information, etc.
#yaml-language-server $schema=https://github.com/conda/constructor/raw/refs/tags/3.12.0/constructor/data/construct.schema.json
This would generally need an "evergreen" URL (e.g. latest), which complicates matters a bit further.
Thanks again!
Additional Context
No response
We have schemas.conda.org for this, we'll get it done next week, thanks!
That's great! Even there, having per-release-of-owning-software-package version URLs goes a long way to making schema useful... even if they don't change between versions, getting false positives and negatives due to drift is pretty gnarly for reproducibility.