Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(perf): Lazy rewrite of schemapi.py, improve docs #3547

Draft
wants to merge 111 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
d95f332
perf: Replace `_use_referencing_library()` with a constant
dangotbanned Aug 18, 2024
f4a4e0e
docs: Move `_get_errors_from_spec` comment into docstring
dangotbanned Aug 18, 2024
6dfe61b
fix(typing): Resolve `jsonschema` incomplete stubs issue
dangotbanned Aug 18, 2024
e9a4beb
refactor: Reuse `None` in ternary expression
dangotbanned Aug 18, 2024
c534876
perf: Replace `_prepare_references_in_schema`
dangotbanned Aug 18, 2024
e30cac6
chore: Add note on `_get_errors_from_spec`
dangotbanned Aug 18, 2024
e702b26
build: run `generate-schema-wrapper`
dangotbanned Aug 18, 2024
af878d0
refactor(typing): Use stubs type `_JsonParameter`
dangotbanned Aug 19, 2024
5ca44df
refactor: Shorten some references to `ValidationError`
dangotbanned Aug 19, 2024
de07012
perf: Redefine `_json_path` to be bound on `jsonschema` version
dangotbanned Aug 19, 2024
05976a6
build: run `generate-schema-wrapper`
dangotbanned Aug 19, 2024
af6e41c
perf(DRAFT): Initial lazy validation
dangotbanned Aug 19, 2024
b24ac45
Merge remote-tracking branch 'upstream/main' into perf-validation
dangotbanned Aug 19, 2024
c261cb4
perf: Replace message length lambda
dangotbanned Aug 20, 2024
bbf6f14
perf: Use `islice` earlier to prune errors
dangotbanned Aug 20, 2024
2d20db7
ci: Add temporary script for `hatch run validation`
dangotbanned Aug 20, 2024
ad06d08
feat(perf): Adds `_lazy_deduplicate_enum`
dangotbanned Aug 20, 2024
af17d44
refactor(perf): Tidying up, more lazy ops, renaming
dangotbanned Aug 20, 2024
5483db8
test(perf): Adds `test_chart_validation_benchmark`
dangotbanned Aug 21, 2024
e77b9d1
Merge branch 'main' into perf-validation
dangotbanned Aug 21, 2024
f208066
fix: Invert default for `_SKIP_SLOW_BENCHMARKS`
dangotbanned Aug 21, 2024
996ea97
refactor: Parameterize `_regroup` and improve doc
dangotbanned Aug 21, 2024
5751132
docs: Update `validate_jsonschema`/`_fail_fast`
dangotbanned Aug 21, 2024
cb1fa24
refactor: Use more constants, rename, reorder
dangotbanned Aug 21, 2024
09c83ae
docs: Tweak `_group_tree_leaves`
dangotbanned Aug 21, 2024
a0a8978
refactor(perf): Conditionally define compatibility code
dangotbanned Aug 21, 2024
2e81592
build: run `generate-schema-wrapper`
dangotbanned Aug 21, 2024
49aeec1
refactor: Use language that more closely aligns with json schema
dangotbanned Aug 22, 2024
61bf448
perf: Cache the result of `referencing.jsonschema.specification_with`
dangotbanned Aug 22, 2024
c665bb1
build: run `generate-schema-wrapper`
dangotbanned Aug 22, 2024
69588b3
fix(typing): Address `None` propagation, Remove outdated doc
dangotbanned Aug 22, 2024
7fceab8
build: run `generate-schema-wrapper`
dangotbanned Aug 22, 2024
e6912c1
docs: Improve `specification_with`
dangotbanned Aug 22, 2024
283b69e
refactor: Rename`_get_referencing_registry` -> `_registry`, improve doc
dangotbanned Aug 22, 2024
56be984
refactor: Renaming, docs to align with `jsonschema`
dangotbanned Aug 22, 2024
4c4b322
build: run `generate-schema-wrapper`
dangotbanned Aug 22, 2024
3f8f9bb
Merge remote-tracking branch 'upstream/main' into perf-validation
dangotbanned Aug 22, 2024
a3a148e
refactor: Factor-out `_iter_validator_errors`
dangotbanned Aug 22, 2024
5fd6787
chore: rename `tp` -> `validator`
dangotbanned Aug 22, 2024
4cc1619
perf: Experiment with more cache layers
dangotbanned Aug 22, 2024
509b678
build: run `generate-schema-wrapper`
dangotbanned Aug 22, 2024
c594e55
ci: Add patterns for `pyright`
dangotbanned Aug 23, 2024
5334a2c
feat: Adds `schemapi.__all__`
dangotbanned Aug 24, 2024
2751bb2
fix: Use uniform docs in version-gated functions
dangotbanned Aug 25, 2024
f235284
refactor: Update imports
dangotbanned Aug 25, 2024
bd1d580
chore: Remove stale `SchemaBase.from_json` comment
dangotbanned Aug 25, 2024
8ca4266
perf: Refactor `SchemaBase.from_dict` and co
dangotbanned Aug 25, 2024
933c045
perf: Avoid expensive exceptions in `_FromDict.from_dict`
dangotbanned Aug 25, 2024
1e5993b
chore: Add todo for `__init_subclasses__`
dangotbanned Aug 25, 2024
67b7ae4
test: Update & add snapshots for `test_chart_validation_benchmark`
dangotbanned Aug 25, 2024
8725a6c
build: run `generate-schema-wrapper`
dangotbanned Aug 25, 2024
2ea0eb0
Merge remote-tracking branch 'upstream/main' into perf-validation
dangotbanned Aug 25, 2024
6770177
perf(ruff): Add & ignore some performance rules
dangotbanned Aug 25, 2024
0ddf19e
perf(ruff): Fix some `"PERF"` violations
dangotbanned Aug 25, 2024
cace782
perf: Remove unreachable `ValidationError` except
dangotbanned Aug 25, 2024
ac99939
docs(perf): Note some areas that may impact performance
dangotbanned Aug 25, 2024
f776fcf
refactor: Remove now-unused `validate_jsonschema_fail_fast`
dangotbanned Aug 25, 2024
56c573f
Merge remote-tracking branch 'upstream/main' into perf-validation
dangotbanned Aug 25, 2024
53663e8
perf: Avoid an exception in `SchemaBase.__getattr__`
dangotbanned Aug 26, 2024
bd31d7c
refactor: Ensure every `VegaLiteSchema` has a `._schema`
dangotbanned Aug 26, 2024
06ca339
refactor: Adds `_SchemaBasePEP487`
dangotbanned Aug 26, 2024
56a43cb
test: Adds a mini suite for `_SchemaBasePEP487`
dangotbanned Aug 26, 2024
6033d40
Merge remote-tracking branch 'upstream/main' into perf-validation
dangotbanned Aug 26, 2024
003c7fb
fix: Fix backwards incompatible import
dangotbanned Aug 26, 2024
34e647e
Merge remote-tracking branch 'upstream/HEAD' into perf-validation
dangotbanned Aug 27, 2024
5fad088
ci: Fix include pattern
dangotbanned Aug 27, 2024
1a93d0d
Merge branch 'main' into perf-validation
dangotbanned Aug 28, 2024
69d9f67
test: Add `SchemaBase.__init_subclass__` benchmark results
dangotbanned Aug 28, 2024
307cb9b
refactor(typing): Widen internal `rootschema|schema` types from `dict…
dangotbanned Aug 29, 2024
8fa8975
perf: Adds `resolve_references_rpds`
dangotbanned Aug 29, 2024
5e93933
build: run `generate-schema-wrapper`
dangotbanned Aug 29, 2024
c322e79
refactor: Rename `_rec_refs` -> `_recurse_refs`
dangotbanned Aug 29, 2024
96eed9b
perf: Adds `_FromDict.hash_resolved`
dangotbanned Aug 29, 2024
3258f56
perf: Remove unreachable `"oneOf"` keyword check
dangotbanned Aug 29, 2024
d6ce749
build: run `generate-schema-wrapper`
dangotbanned Aug 29, 2024
89fcaf7
perf: Optimize `dict` branch in `_FromDict.from_dict`
dangotbanned Aug 30, 2024
c9f9d8a
docs(perf): Adds benchmark result
dangotbanned Aug 30, 2024
e9c8f85
chore(perf): Add note on next refactor candidate
dangotbanned Aug 30, 2024
759a556
test: Add note on possibly outdated tests
dangotbanned Aug 30, 2024
dace488
build: run `generate-schema-wrapper`
dangotbanned Aug 30, 2024
531aa7c
chore(perf): Add FIXME on recursive source
dangotbanned Aug 30, 2024
3277b43
refactor(perf): Crawl registry, init `Resolver` with `_VEGA_LITE_ROOT…
dangotbanned Aug 30, 2024
96dde18
build: run `generate-schema-wrapper`
dangotbanned Aug 30, 2024
ab20005
refactor: Reuse `JSONEncoder` for hashing
dangotbanned Aug 30, 2024
5bceda9
Merge remote-tracking branch 'upstream/main' into perf-validation
dangotbanned Aug 31, 2024
a419ede
perf: Avoid exception handling in `Chart.from_dict`
dangotbanned Aug 31, 2024
4a7cc4e
chore(perf): Remove `# FIXME`(s) that had no effect
dangotbanned Sep 1, 2024
9bc3ccd
chore: Remove `# FIXME`(s) that won't be addressed
dangotbanned Sep 1, 2024
af480f5
refactor: Remove unused `_freeze`
dangotbanned Sep 2, 2024
dff817b
chore: Remove comments
dangotbanned Sep 2, 2024
133aa01
build: run `generate-schema-wrapper`
dangotbanned Sep 2, 2024
141c8d1
refactor: Collapse `...` following `:=`
dangotbanned Sep 2, 2024
fba3c46
chore: Remove temp notes from `_subclasses`
dangotbanned Sep 2, 2024
44f5227
chore: Remove outdated TODO
dangotbanned Sep 2, 2024
5d9fb65
refactor: Remove unused `resolve_references_rpds`
dangotbanned Sep 2, 2024
a26b3f1
refactor: Collect functions, global into `_Registry`
dangotbanned Sep 2, 2024
1858bf5
Merge branch 'main' into perf-validation
dangotbanned Sep 3, 2024
82a8106
chore: Add `_is_valid` to `schemapi.__all__`
dangotbanned Sep 3, 2024
af783b2
chore: Remove more comments
dangotbanned Sep 3, 2024
9a48448
refactor: Remove `_SchemaBasePEP487` & test suite
dangotbanned Sep 3, 2024
67642f0
ci: Remove debugging `hatch` script
dangotbanned Sep 3, 2024
8002dab
test: Remove `test_chart_validation_benchmark`
dangotbanned Sep 3, 2024
2feeeb7
Merge remote-tracking branch 'upstream/main' into perf-validation
dangotbanned Sep 3, 2024
ac45244
Merge branch 'main' into perf-validation
dangotbanned Sep 4, 2024
0838fef
Merge branch 'main' into perf-validation
dangotbanned Sep 6, 2024
20fbdc4
Merge branch 'main' into perf-validation
dangotbanned Sep 6, 2024
1fdb791
Merge remote-tracking branch 'upstream/main' into perf-validation
dangotbanned Sep 9, 2024
2dd4c42
Merge remote-tracking branch 'upstream/main' into perf-validation
dangotbanned Sep 10, 2024
842da01
Merge remote-tracking branch 'upstream/main' into perf-validation
dangotbanned Sep 10, 2024
75b35b4
Merge branch 'main' into perf-validation
dangotbanned Sep 17, 2024
0c829fb
Merge branch 'main' into perf-validation
dangotbanned Sep 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading