-
-
Notifications
You must be signed in to change notification settings - Fork 843
feat: Adds ThemeConfig (TypedDict)
#3536
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
Merged
Merged
Changes from all commits
Commits
Show all changes
165 commits
Select commit
Hold shift + click to select a range
7b324d6
feat: Adds `SchemaInfo.is_format`
dangotbanned 0325667
feat(typing): Annotate `SchemaProperties`
dangotbanned 832fd72
perf: Use more appropriate data structures in `codegen`
dangotbanned 549f42c
refactor: Reduce length and complexity of `get_python_type_representa…
dangotbanned 1b6e008
refactor: Update `codegen` to use new `get_python_type_representation`
dangotbanned 148c913
refactor(perf): Rewrite `generate_vegalite_mark_mixin`
dangotbanned de66450
perf: Iterate over `values()` when `keys()` are not needed
dangotbanned 8fa63de
refactor: reorder `get_python_type_representation` kwargs
dangotbanned ba08256
feat(typing): Add missing annotations
dangotbanned 5f35705
refactor: Rename `get_python_type_representation` -> `to_type_repr`
dangotbanned cb8aefc
refactor: Remove redundant `is_object` branch
dangotbanned 193e493
fix: Exclude array stub classes
dangotbanned b2db86c
feat(typing): Temp solution for `dict` in `TypedDict`
dangotbanned 566cd05
feat(typing): Add wip `ThemeConfig` implementation
dangotbanned aafe73f
build: run `generate-schema-wrapper`
dangotbanned f457a92
Merge remote-tracking branch 'upstream/main' into config-typed-dict
dangotbanned 5d1f2a5
docs: Add doc for `SchemaInfo.to_type_repr`
dangotbanned 40cd566
fix: Use pre `3.12` fstring syntax
dangotbanned 49633be
fix: Rerun `generate-schema-wrapper`
dangotbanned 9c51d43
Merge remote-tracking branch 'upstream/main' into config-typed-dict
dangotbanned b4f7ede
fix(typing): Exclude `core.Dict` from `format`
dangotbanned a8ac7ec
refactor: Replace `is_value()` case in `codegen.get_args()`
dangotbanned e4f62ec
fix(typing): Exclude `RelativeBandSize` from `discreteBandSize`
dangotbanned f23880f
feat(typing): Adds `Value` (`TypedDict`)
dangotbanned a9c8b99
build: run `generate-schema-wrapper`
dangotbanned 184f2b6
ci(ruff): Enable lint/format on notebooks
dangotbanned 91dacf8
Merge remote-tracking branch 'upstream/main' into config-typed-dict
dangotbanned ecf7fd5
feat: Adds `SchemaInfo.is_type_alias`
dangotbanned f4cb0d4
build: run `generate-schema-wrapper`
dangotbanned a9a738e
refactor: Move, rename `_type_checking_only_imports` -> `import_type_…
dangotbanned fcb9469
feat: Adds `utils.import_typing_extensions`
dangotbanned 7eea237
feat(typing): Adds `ColorHex`, `is_color_hex`
dangotbanned 3455fd7
build: run `generate-schema-wrapper`
dangotbanned 794e9d5
fix(typing): Exclude `str`, use `ColorHex | ColorName_T`
dangotbanned 859e998
fix: Move *TODO* location
dangotbanned f09a14c
chore: Label a comment as a temp fix
dangotbanned da516c1
feat(typing): Adds `OverlayMarkDefKwds`
dangotbanned fc10816
refactor: Rename `types_from_title` -> `title_to_type_reprs`
dangotbanned ff1a3f5
fix: Don't escape braces, require full match for `ColorHex`
dangotbanned 3b32cf7
docs: Add `ColorHex` example with transparency
dangotbanned 7b1875d
test(typing): Adds `test_is_color_hex`
dangotbanned 8ff7b00
refactor: Promote `title_to_type_reprs` to a `SchemaInfo` method
dangotbanned a59a7bd
perf: Optimize some checks in `SchemaInfo`
dangotbanned d68fcdb
feat: Use a dynamic `ClassVar` for remapping titles
dangotbanned e5c4b7f
feat(typing): Adds `LinearGradientKwds`, `RadialGradientKwds`
dangotbanned 0c63dc7
fix: Include `ArgInfo.required` in `TypedDict`(s)
dangotbanned 46fa848
feat(typing): Adds `GradientStopKwds`
dangotbanned d3f2898
ci: Remove old dependency `m2r` from `mypy`
dangotbanned db0419f
Merge remote-tracking branch 'upstream/main' into remove-m2r-mypy
dangotbanned da16406
Merge branch 'main' into config-typed-dict
dangotbanned 7d3eac9
revert(ruff): Remove default `ruff` setting
dangotbanned 4fd7628
feat(typing): Temporarily duplicate (#3538)
dangotbanned 5a3f9ee
Merge pull request #1 from vega/remove-m2r-mypy
dangotbanned 0ebc6bc
fix: Exclude titles w/ `SchemaInfo.additionalProperties`
dangotbanned a5e9442
feat: Fill out `MANUAL_DEFS` with all remaining targets
dangotbanned 9b6c4d6
build: run `generate-schema-wrapper`
dangotbanned e2f0ed3
refactor: Renaming/tidying up new functions
dangotbanned f045dc6
refactor: Somewhat standardize imports
dangotbanned d435380
Merge & re-build
dangotbanned bb99389
feat(typing): Finish `ThemeConfig` hierarchy
dangotbanned 67dc9df
Merge remote-tracking branch 'upstream/HEAD'
dangotbanned b24dbe2
Merge remote-tracking branch 'upstream/main'
dangotbanned 964745a
Merge branch 'main' into config-typed-dict
dangotbanned 3c9aab5
refactor: Tidy up `generate_schema_wrapper.py`
dangotbanned 0be9f5d
perf: Reprioritise unreachable `info.allOf`
dangotbanned 882013c
perf: Remove unused arg and compile pattern for `is_valid_identifier`
dangotbanned 2781969
refactor(typing): Fill out some more generics
dangotbanned 9e1c8c4
refactor(typing): Remove some `None` cases for `SchemaInfo`
dangotbanned b6fff04
Merge branch 'main' into config-typed-dict
dangotbanned cc6e9bd
Merge branch 'main' into config-typed-dict
dangotbanned 9c94918
Merge remote-tracking branch 'upstream/main' into config-typed-dict
dangotbanned 1b3202b
Merge branch 'config-typed-dict' of https://github.com/dangotbanned/a…
dangotbanned 11280df
chore: Remove outdated TODO
dangotbanned f6b4923
fix(typing): Resolve/ignore typing in `tools/`
dangotbanned a5bdd47
Merge branch 'main' into config-typed-dict
dangotbanned 068c484
Merge remote-tracking branch 'upstream/main' into config-typed-dict
dangotbanned 9e35e30
docs: Add note on `RelativeBandSize` exclusion
dangotbanned 2efe2ea
feat: Adds `SchemaProperties.__len__`
dangotbanned d922e4b
feat(typing): Enable type checking on `tools/`
dangotbanned 1330708
refactor(typing): Fake immutability in `SchemaInfo`
dangotbanned 230d625
refactor: Make `SchemaInfo` effectively immutable
dangotbanned a67755e
feat: Make `SchemaInfo` hashable
dangotbanned ae23b23
feat(DRAFT): Add WIP config schema sourcing
dangotbanned f62c82a
ci: Add patterns for `pyright`
dangotbanned a70f259
perf: Use cheaper comparison for `SchemaInfo.__eq__`
dangotbanned e40768e
refactor: `iter_children` -> `SchemaInfo.iter_descendants`
dangotbanned 6334db0
feat: Avoid manual defs
dangotbanned 2d89ad7
build: run `generate-schema-wrapper`
dangotbanned 0af1cd1
feat: Adds `_config.__all__`
dangotbanned 2670e3b
refactor: Un-special-case `Dict`, include in `SchemaInfo.is_type_alias`
dangotbanned 6926973
Merge branch 'main' into config-typed-dict
dangotbanned 836fc00
Merge remote-tracking branch 'upstream/main' into config-typed-dict
dangotbanned ba70325
Merge branch 'config-typed-dict' of https://github.com/dangotbanned/a…
dangotbanned d63b8a6
docs: Update comments in `SchemaInfo.title_to_type_reprs`
dangotbanned ebfdbd4
refactor: `is_relevant_schema` -> `SchemaInfo.is_theme_config_target`
dangotbanned 96a7460
refactor: Simplify `generate_config_typed_dicts`
dangotbanned b3a7fb3
docs: Link to discussion for unresolvable issue
dangotbanned aae8e6e
style: Use constant convention `FOR_TYPE_HINTS`
dangotbanned 732b31d
feat(typing): Accept an `Iterator` in `indent_docstring`
dangotbanned 5c33b2c
feat: Adds initial docs for `_config.py`
dangotbanned 0a04d4d
build: run `generate-schema-wrapper`
dangotbanned 7bb0b8e
Merge branch 'main' into config-typed-dict
dangotbanned b486f10
docs: Add summary for `ThemeConfig`
dangotbanned 81349ea
test(typing): Adds `test_theme_config_typing`
dangotbanned b43deb5
Merge remote-tracking branch 'upstream/main' into config-typed-dict
dangotbanned ff364a1
test: Remove `Vega`-only properties from theme tests
dangotbanned bf36b69
fix(typing): Misc typing fixes
dangotbanned 79804ec
fix: Remove `Vega`-only properties from vendored `vega-themes.json`
dangotbanned 0bdfa72
fix: Support hyphenated keys in `TypedDict`(s)
dangotbanned 427a0dd
chore: Add note on remaining issue
dangotbanned 6f13b0b
Merge remote-tracking branch 'upstream/main' into config-typed-dict
dangotbanned e564ca5
fix(DRAFT): Hack workaround for `Padding`
dangotbanned 73f6b25
test: Adds `binste_altair_theme`
dangotbanned ab41cb7
test: Adds `husky_theme`
dangotbanned 1dc4c05
test: Refactor, add runtime testing of `ThemeConfig`
dangotbanned 5315a3d
refactor: Reuse `finalize_type_reprs`
dangotbanned c816ca3
chore: Rename `init_subclass_args` -> `metaclass_kwds`
dangotbanned 7c55a35
refactor: Use only `generate_typed_dict` for `TypedDict`(s)
dangotbanned 44624ef
refactor: Move `process_description` to `tools.schemapi.utils`
dangotbanned b5e54d8
docs: Add note to `SchemaGenerator.subclasses`
dangotbanned 6d744f8
refactor: Include `process_description` in `deep_description`
dangotbanned dd05abd
perf: Replace relative links on entire description
dangotbanned bed1285
refactor(perf): Compile patterns and tidy up `fix_docstring_issues`
dangotbanned 025aae5
chore: Remove unused code
dangotbanned 9bc28d4
refactor: Factor out `_doc_args`, add `iter_args`
dangotbanned 626401e
refactor: Remove unused `ruff_format_str`
dangotbanned a5c0567
refactor: Factor out `_signature_args`, enhance `ArgInfo.iter_args`
dangotbanned 36fdaa6
refactor: Add `SchemaInfo.from_refname` constructor
dangotbanned 1b236f9
docs: Add some missing docs
dangotbanned 160ee63
refactor: Reorganize `.rst` utils to be together
dangotbanned 7e85b36
refactor: Remove unused parameters
dangotbanned 36ebca6
refactor: Move more constants into templates
dangotbanned 7b7390a
refactor: Accept multiple remap titles
dangotbanned af7c17c
docs: Finish `generate_typed_dict`
dangotbanned 072f512
feat(typing): Adds `RowCol` generic
dangotbanned 007f373
feat(typing): Adds missing types for `TopLevelUnitSpec`
dangotbanned 2afdc19
fix: Add `RowCol` to `_typing.__all__`
dangotbanned 2c70eb6
fix: Version-gate `typing_extensions` in `utils`
dangotbanned ef3df18
feat: Support callables in `ArgInfo.iter_args`
dangotbanned 4f3c0e7
feat: Define `ThemeConfig` as subset of `TopLevelUnitSpec`
dangotbanned ff01520
build: run `generate-schema-wrapper`
dangotbanned 0b8eda8
test: Update `test_theme` to account for level correction
dangotbanned 80b21d5
fix(typing): Use a single `TypeVar` for `RowCol`
dangotbanned 810921c
feat(typing): Add `ThemeConfig` to `alt.typing`
dangotbanned 79fb2fb
feat(typing): Update all `ThemeRegistry` annotations
dangotbanned c8ccb05
fix(typing): Satisfy `mypy` on `utils.core.update_nested`
dangotbanned 26c6ede
fix: run `generate-schema-wrapper`
dangotbanned 4933e54
feat(typing): Adds `PaddingKwds`
dangotbanned 2847293
refactor: Factor out `_typed_dict_doc`
dangotbanned f386052
refactor: Factor out `_typed_dict_args`
dangotbanned ed24ada
docs: Update `generate_typed_dict`
dangotbanned ddf4636
refactor: Reuse `ArgInfo.iter_args` in `SchemaGenerator`
dangotbanned 0c8f9e2
chore: Removed outdated comment
dangotbanned bf29786
Merge branch 'main' into config-typed-dict
dangotbanned cafd696
Update altair/vegalite/v5/schema/_typing.py
dangotbanned 0bb7a86
fix: Apply suggested fix at source
dangotbanned ffb3214
style: Remove extra whitespace from docs
dangotbanned aaffebd
refactor: Reuse literals, add `_typing` dicts to `_config.__all__`
dangotbanned 12b6410
feat: Export `_config.py` as `altair.typing.theme`
dangotbanned 6e4af95
docs: Use `:class:` directive on `TypedDict`(s)
dangotbanned d4bd6db
fix: Define `typing` as a package to support submodules
dangotbanned 8db4469
fix: Update `TypedDict` import in `_typing.py`
dangotbanned 93334b7
Merge branch 'main' into config-typed-dict
dangotbanned 8519444
Merge branch 'main' into config-typed-dict
dangotbanned b36519f
Merge remote-tracking branch 'upstream/main' into config-typed-dict
dangotbanned File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| from altair.vegalite.v5.schema._config import * # noqa: F403 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.