Use `greenery` and `regex_transformer` to merge `pattern` and `patternProperties` keywords
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 20/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- python
- Bereich
- testing-qa
Rechercherichtung
Start by reading the existing handling of overlapping pattern and patternProperties expressions in the repository, then review the greenery and regex_transformer projects linked in the issue. The issue describes integrating their regex operations while handling unsupported syntax and Unicode performance; done means overlapping patterns can be combined where supported, with graceful fallback for unsupported cases. No code entry point or tests are named, and the issue has had no comment for years.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Currently, hypothesis-jsonschema basically just gives up if the schema has two overlapping regular expressions - at best, we'll try to randomly pick one to generate examples from, and use the other to filter. The status quo is mostly fine, but we can do better!
- https://github.com/qntm/greenery implements all the key logic to translate between (truly) regular expressions and finite automata, which means we can do set operations like intersection and difference, but has a custom not-quite-Python-compatible pattern syntax.
- https://github.com/doni69/regex_transformer supports python
resyntax forgreenery
(Not all "python regular expressions" are truly regular in the sense of being equivalent to finite automata. Also, JSONSchema regex actually follow ECMA262 syntax, which is neither truly regular nor entirely compatible with the Python syntax. Fortunately the recommended subset is both compatible (except for Python allowing a trailing newline with $) and - with some special handling for lookahead - regular, so we'll continue our approach of handling what we can and gracefully degrading on the rest.)
This is a medium-to-large feature to develop, since regex_transformer exists but isn't packaged or particularly mature, and of unknown (neg-medium to medium) benefit. greenery might also need some patches to make Unicode handling more efficient. However I'd also like better regex handling in upstream Hypothesis, and it should only get easier over time!
- Vorherrschende Sprache
- Python
- Sterne
- 281
- Forks
- 35
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus python-jsonschema/hypothesis-jsonschema
-
Missing test files in Pypi releaseEvtl. vergeben @blouirts123 hat das vor 49 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 35/100
-
Shouldn't PKG-INFO Homepage point to https://github.com/python-jsonschema/hypothesis-jsonschema ?Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 58/100
python-jsonschema/hypothesis-jsonschema#114 · 1 Kommentar ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 55/100
python-jsonschema/hypothesis-jsonschema#113 · 1 Reaktion ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 30/100
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 15/100
python-jsonschema/hypothesis-jsonschema#104 · 3 Reaktionen ·
Alle Issues in python-jsonschema/hypothesis-jsonschema
Ähnliche Issues
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
Techiebutler/freeframe#687 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug verbose GC
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
IBM/javacore-analyser#677 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 79/100
Maintainer antworten meist innerhalb von 2 Tagen
-
area/config comp/plugins P1 platform/qqbot tool/file type/bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
NousResearch/hermes-agent#163932 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
plugins/dsh: todayStr() computes UTC but is documented as local — journal entries written 00:00–08:00 local land in the previous day's fileEvtl. vergeben @Beehtrix hat das heute übernommen. Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
zilliztech/memsearch#907 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag