Generate integers for "number" schema?
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- json, python
- 领域
- backend, testing-qa
调研方向
Read the strategy that maps the JSON Schema "number" type to st.float, then trace how schema canonicalization handles not, minimum, and integer types. Consider whether integer generation should be included and how that affects output variation and negated schemas; done means the strategy and its tests cover the intended behavior. The issue has had no activity for years, so check whether the work is still relevant before starting.
由索引模型根据 Issue 内容生成。
描述
At the moment the "number" type corresponds to st.float strategy, but as integers are valid for the "number" type in JSON Schema, I am wondering whether it will make sense to generate integers there as well.
I believe it may increase the output variation. What do you think?
I was thinking about your comment in the context of negating schemas and tried to canonicalise {"not": {"minimum": 42}} which gives {'not': {'minimum': 42, 'type': 'number'}, 'type': 'number'}. Even though it is a valid transformation, it seems too restrictive. For example, the end-user might expect that negating {"minimum": 42} will give e.g. 41, or some other integers, but there will be always floats. Having type: integer in place will solve this ({"not": {"minimum": 42}, "type": "integer"} works), but still sometimes it happens that it is missing.
- 主要语言
- Python
- 星标
- 281
- 派生
- 35
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
python-jsonschema/hypothesis-jsonschema 的其他 Issue
-
Missing test files in Pypi release可能已有人在做 @blouirts123 于 49 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 35/100
-
Shouldn't PKG-INFO Homepage point to https://github.com/python-jsonschema/hypothesis-jsonschema ?未关闭
难度 1/5 1 小时以内 新手友好度 58/100
python-jsonschema/hypothesis-jsonschema#114 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 55/100
python-jsonschema/hypothesis-jsonschema#113 · 1 个 reaction ·
-
难度 5/5 一周以上 新手友好度 30/100
-
难度 5/5 一周以上 新手友好度 15/100
python-jsonschema/hypothesis-jsonschema#104 · 3 个 reaction ·
查看 python-jsonschema/hypothesis-jsonschema 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 92/100
Techiebutler/freeframe#687 ·
维护者通常 1 天内回复
-
bug verbose GC
难度 2/5 1-3 小时 新手友好度 74/100
IBM/javacore-analyser#677 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 79/100
维护者通常 2 天内回复
-
area/config comp/plugins P1 platform/qqbot tool/file type/bug
难度 2/5 1-3 小时 新手友好度 75/100
NousResearch/hermes-agent#163932 · 1 条评论 ·
维护者通常 1 天内回复
-
plugins/dsh: todayStr() computes UTC but is documented as local — journal entries written 00:00–08:00 local land in the previous day's file可能已有人在做 @Beehtrix 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 82/100
zilliztech/memsearch#907 · 1 条评论 ·
维护者通常 1 天内回复