Add schema practices and a JSON Schema ecosystem profile
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 46/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 4
- Fork
- 1
- Merge trung bình
- 10 giờ 41 phút
- Pull request đã merge (30 ngày)
- 79
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của cpp-best-practices/project_validator
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
cpp-best-practices/project_validator#267 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
cpp-best-practices/project_validator#263 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
cpp-best-practices/project_validator#260 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
cpp-best-practices/project_validator#259 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
cpp-best-practices/project_validator#255 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của cpp-best-practices/project_validator
Issue tương tự
-
plot_graph crashes when a mesh node has no m2m edgeCó thể đã có người làm @tygvi đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
mllam/neural-lam#883 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
enhancement possible-duplicate
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 78/100
AOSSIE-Org/PictoPy#1715 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 6 ngày
-
SQLite connector omits generated columns from the catalog, and drops relationships sourced on themĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
NVIDIA/auto-ontology#511 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ethereum/execution-specs#3996 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Project-N-E-K-O/N.E.K.O#3725 ·
Maintainer thường phản hồi trong vòng 1 ngày