Add schema practices and a JSON Schema ecosystem profile
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 46/100
Direção de pesquisa
Start with project_validator/rules.py to see how rule types are defined, then read tests/test_ecosystem_contract.py and the language profile implementation for the existing contract pattern. Add the JSON Schema profile and the four checks described in the issue; the fixtures should show that a well configured schema passes and a bare schema is reported appropriately. Keep --validate-data out of scope.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Checks
New practices, each a rule type in project_validator/rules.py, first supplied by a JSON Schema profile:
| Check | Passes when |
|---|---|
schema-declared |
every schema names its dialect ($schema) and has an $id; a dialect older than draft 2019-09 warns |
schema-validation |
CI validates the instance documents against their schemas: check-jsonschema, ajv-cli, the jsonschema CLI, jv |
schema-examples |
the schemas come with examples that CI validates: valid ones that must pass and invalid ones that must fail (e.g. examples/valid, examples/invalid, or a test suite) |
schema-compatibility |
CI checks schema changes for breaking changes (json-schema-diff or an equivalent) (warning-level) |
Profile
JSON Schema: recognised by intent only, never by plain .json files (#63): *.schema.json, or a top-level $schema naming json-schema.org. code-formatting: prettier or biome. Language practices (coverage, platform-matrix, ...) have no rule and report SKIP.
Later
An optional deep mode, --validate-data, could validate instances against their schemas itself, with jsonschema as an optional dependency like rich (see the Dependency Policy). It follows --build as a precedent and is not part of this issue.
Definition of done
As for language profiles: well_configured_json_schema and bare_json_schema fixtures held by tests/test_ecosystem_contract.py. data-wellformed (#84) already covers schemas that do not parse.
- Linguagem predominante
- Python
- Estrelas
- 4
- Forks
- 1
- Merge médio
- 10h 41min
- PRs com merge (30d)
- 79
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de cpp-best-practices/project_validator
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
cpp-best-practices/project_validator#267 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
cpp-best-practices/project_validator#263 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
cpp-best-practices/project_validator#260 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
cpp-best-practices/project_validator#259 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
cpp-best-practices/project_validator#255 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de cpp-best-practices/project_validator
Issues semelhantes
-
add entry to blockAberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 65/100
StevenBlack/hosts#3299 ·
-
`garak --report` overwrites the input report when its name has no ".report"Talvez já em andamento @0z5a assumiu hoje. Abertaneeds-triage
Dificuldade 2/5 Meio dia Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 2 dias
-
plot_graph crashes when a mesh node has no m2m edgeTalvez já em andamento @tygvi assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
mllam/neural-lam#883 · 1 comentário ·
Mantenedores costumam responder em até 2 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
future-agi/future-agi#4092 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
transcript analytics: a text whose only protected spans the prose pass redacts is withheld wholeAberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 82/100
WingedGuardian/GENesis-AGI#4641 ·
Mantenedores costumam responder em até 1 dia