dvcyaml-schema
JSON Schema for dvc.yaml
file format.
It can provide better autocompletion, validation, and linting for dvc.yaml
files.
Usage
JSON Schema
Use the following URL to obtain the latest JSON schema for dvc.yaml
:
https://raw.githubusercontent.com/iterative/dvcyaml-schema/master/schema.json
YAML Extension):
Visual Studio Code (withIf you have installed YAML extension, it'll automatically fetch the latest dvcyaml-schema, and should work out of the box.
But you can specify explicitly as well by adding following contents to your settings:
{
"yaml.schemas": {
"https://raw.githubusercontent.com/iterative/dvcyaml-schema/master/schema.json":
"dvc.yaml"
}
}
You can also specify custom URL or path instead for debugging/testing purposes.
JetBrain IDEs (PyCharm, Intellij IDEA, et al.)
Follow this instruction.
Important Files:
Contributing
- Prepare your environment (you'll need
python3.10+
andpip
).$ python3 -m venv .venv $ source .venv/bin/activate $ pip install -r requirements.txt
- Install
pre-commit
hook.$ pip install pre-commit $ pre-commit install
- Open gen.py, make some adjustments.
- (Optional) Add valid and invalid yaml examples.
- Commit.
pre-commit
hook should run automatically and format/lint code, generate new schema and run tests. If there are any new changes, add and try to commit it again. - Send us a pull request. 🤗