Skip to content
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

Validate JEP Front Matter against a Schema? #55

Open
bollwyvl opened this issue Jun 15, 2020 · 1 comment
Open

Validate JEP Front Matter against a Schema? #55

bollwyvl opened this issue Jun 15, 2020 · 1 comment

Comments

@bollwyvl
Copy link

To help reduce the manual review time, and increase the impact of submissions to the JEP process, the validity of JEP front matter could be tested in CI.

A naive implementation, presupposing #54:

import yaml, pathlib, jsonschema

jep_schema = yaml.safe_load_all(
    pathlib.Path("jep-xxxx-jep-metadata.md"
).read_text())[0]

for jep in pathlib.Path().rglob("*.md):
    jsonschema.validate(
      yaml.safe_load_all(jep.read_text())[0], 
      jep_schema
    )

a more elegant approach would probably be a pytest fixture

@choldgraf
Copy link
Contributor

I think it's a good idea! Anything that can reduce some editing/shepherding burden would help, I think. At least, we should require a minimal set of key/values. Perhaps we can begin with the set given by the metadata in the #29 JEP?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants