Use `greenery` and `regex_transformer` to merge `pattern` and `patternProperties` keywords
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 20/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- python
- Ambito
- testing-qa
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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!
- Lingua principale
- Python
- Stelle
- 281
- Fork
- 35
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di python-jsonschema/hypothesis-jsonschema
-
Missing test files in Pypi releaseForse già presa @blouirts123 l’ha presa 49 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
-
Shouldn't PKG-INFO Homepage point to https://github.com/python-jsonschema/hypothesis-jsonschema ?Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 58/100
python-jsonschema/hypothesis-jsonschema#114 · 1 commento ·
-
Push release tags to github?Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 55/100
python-jsonschema/hypothesis-jsonschema#113 · 1 reazione ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
python-jsonschema/hypothesis-jsonschema#104 · 3 reazioni ·
Tutte le issue di python-jsonschema/hypothesis-jsonschema
Issue simili
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 78/100
web-push-libs/pywebpush#216 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
AgriciDaniel/claude-seo#572 ·
I maintainer di solito rispondono entro 5 giorni
-
area:print-dispatch
Difficoltà 2/5 1-3 ore Idoneità per principianti 92/100
I maintainer di solito rispondono entro 1 giorno
-
area: docs domain: technical-writing good first issue type: documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
Deepak3699/Ai_Mentor#919 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno