{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":551892774,"defaultBranch":"main","name":"altair","ownerLogin":"binste","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2022-10-15T10:28:29.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/23366411?v=4","public":true,"private":false,"isOrgOwned":false},"refInfo":{"name":"","listCacheKey":"v0:1716017147.0","currentOid":""},"activityList":{"items":[{"before":"95111ca29a549bd5cd355f85dfaeeaef669473ad","after":"847baf48e2476b3120f2443b362f70235c328f0a","ref":"refs/heads/use_type_checking_blocks","pushedAt":"2024-05-24T08:25:58.000Z","pushType":"push","commitsCount":8,"pusher":{"login":"binste","name":"Stefan Binder","path":"/binste","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/23366411?s=80&v=4"},"commit":{"message":"Minor stuff","shortMessageHtmlLink":"Minor stuff"}},{"before":"ad9a261bcab87ab8f626700bc982178fb9d91c58","after":"18a2c3c237014591d172284560546a2f0ac1a883","ref":"refs/heads/main","pushedAt":"2024-05-24T08:23:08.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"binste","name":"Stefan Binder","path":"/binste","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/23366411?s=80&v=4"},"commit":{"message":"feat: Adds `ChartType` type and type guard `is_chart_type`. Change PurePath to Path type hints (#3420)\n\n* feat: Type hints: Adds `ChartType` and guard `is_chart_type`\r\n\r\nI'm working on a library that uses `altair`, and looking to make it an optional dependency. During this process, I thought `ChartType` and `is_chart_type` might be a good fit in `altair` itself.\r\n\r\nI don't believe any existing `altair` code would directly benefit from these additions - but you could likely reduce some `isinstance` checks with [type narrowing](https://typing.readthedocs.io/en/latest/spec/narrowing.html) functions like `is_chart_type`.\r\nFor example `altair/vegalite/v5/api.py` has **63** occurrences of `isinstance`.\r\n\r\n---\r\n\r\nper [CONTRIBUTING.md](https://github.com/vega/altair/blob/main/CONTRIBUTING.md)\r\n> In particular, we welcome companion efforts from other visualization libraries to render the Vega-Lite specifications output by Altair. We see this portion of the effort as much bigger than Altair itself\r\n\r\nTowards this aim, it could be beneficial to provide `typing` constructs/tools for downstream use.\r\n\r\nRegarding my specfic use case, the below [Protocol](https://typing.readthedocs.io/en/latest/spec/protocol.html#runtime-checkable-decorator-and-narrowing-types-by-isinstance) - I believe - describes the concept of a `_/Chart`, for the purposes of writing to file:\r\n\r\n```py\r\nfrom typing import Any, Protocol, runtime_checkable\r\n\r\n@runtime_checkable\r\nclass AltairChart(Protocol):\r\n data: Any\r\n\r\n def copy(self, *args: Any, **kwargs: Any) -> Any: ...\r\n def save(self, *args: Any, **kwargs: Any) -> None: ...\r\n def to_dict(self, *args: Any, **kwargs: Any) -> dict[Any, Any]: ...\r\n def to_html(self, *args: Any, **kwargs: Any) -> str: ...\r\n```\r\n\r\nDue to the number of symbols in `altair` and heavy use of mixins, coming to this conclusion can be a stumbling block.\r\n\r\nHowever, exporting things like `ChartType`, `is_chart_type`, `AltairChart` could be a way to expose these shared behaviours - without requiring any changes to the core API.\r\n\r\n* fix: Type hints: Add missing `pathlib.Path` in `save` method annotation\r\n\r\n`TopLevelMixin.save` calls a function accepting `pathlib` objects, but the two didn't share the same `Union` for `fp`.\r\nWhen using `pyright`, the following warning is presented:\r\n\r\n> Argument of type \"Path\" cannot be assigned to parameter \"fp\" of type \"str | IO[Unknown]\" in function \"save\"\r\n> Type \"Path\" is incompatible with type \"str | IO[Unknown]\"\r\n> \"Path\" is incompatible with \"str\"\r\n> \"Path\" is incompatible with \"IO[Unknown]\"\r\n\r\nThis fix avoids the need to use type ignores on the public facing API, as a user.\r\n\r\n* refactor: Simplify `save.py` path handling\r\n\r\nBy normalizing `fp` in `save`, it simplifies the signatures of two other functions and removes the need for `str` specific suffix handling.\r\n\r\n* refactor: Replace duplicated `save` get encoding with a single expression\r\n\r\nAlthough there are branches it isn't needed, I think this is easier to read and maintain.\r\n\r\nVery low priority change, just something I noticed while reading.\r\n\r\n* docs: Add docstring for `is_chart_type`\r\n\r\n* fix: Removed unused `type: ignore` comment\r\n\r\n* build: Mark `TypeIs` as not a relevant attribute\r\n\r\n* build: Make new additions to `api` private\r\n\r\nBelieve these should be public, but it seems like the issue at build-time is that I'd be extending the public API.\r\n\r\n* Bump version of typing_extensions so it includes TypeIs\r\n\r\n* Make ChartType and is_chart_type public. Use typing.get_args to reduce duplication of list of charts\r\n\r\n* Update API docs\r\n\r\n* refactor: Adds ruff `SIM101` and apply fixes\r\n\r\nAs [requested](https://github.com/vega/altair/pull/3420/files/a4de6d1feb6f3f17c7f6d4c7738eb008ff33d17e#r1606780541).\r\nSeems to only occur in a few places, but all were autofix-able.\r\n\r\n* revert: Change `set` back to `list` for `format`\r\n\r\nAs [requested](https://github.com/vega/altair/pull/3420/commits/99b4f81d456b2b05c97919e751152dcec1cbf00b#r1606785466)\r\n\r\n* style: Re-run ruff format\r\n\r\n* revert: Add `str` support back for \"private\" `save` functions\r\n\r\nAn earlier commit assumed a minor optimization would be possible, by normalizing a `Union` early and reuse the narrowed type in \"private\" functions.\r\n\r\n@binste [comment](https://github.com/vega/altair/pull/3420/files#r1610440552)\r\n\r\n---------\r\n\r\nCo-authored-by: Stefan Binder ","shortMessageHtmlLink":"feat: Adds ChartType type and type guard is_chart_type. Change Pu…"}},{"before":"035d225336e6e8a3227e7863ccc95b015bb6f62d","after":"7338bed8a5148385f202aca53adcc7ab4fb48878","ref":"refs/heads/cleanup_ci_and_archived_package_references","pushedAt":"2024-05-18T08:00:54.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"binste","name":"Stefan Binder","path":"/binste","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/23366411?s=80&v=4"},"commit":{"message":"Skip more tests which are expected to fail if vl-convert is not installed","shortMessageHtmlLink":"Skip more tests which are expected to fail if vl-convert is not insta…"}},{"before":"76dd578e5dd567cc633a07fe3f7d15145665533e","after":"035d225336e6e8a3227e7863ccc95b015bb6f62d","ref":"refs/heads/cleanup_ci_and_archived_package_references","pushedAt":"2024-05-18T07:48:21.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"binste","name":"Stefan Binder","path":"/binste","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/23366411?s=80&v=4"},"commit":{"message":"Merge branch 'main' into cleanup_ci_and_archived_package_references","shortMessageHtmlLink":"Merge branch 'main' into cleanup_ci_and_archived_package_references"}},{"before":"9c5b17d0703a0d89a17670dae904058cd6575017","after":"ad9a261bcab87ab8f626700bc982178fb9d91c58","ref":"refs/heads/main","pushedAt":"2024-05-18T07:47:21.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"binste","name":"Stefan Binder","path":"/binste","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/23366411?s=80&v=4"},"commit":{"message":"ci: remove again geopandas pin and disable flaky test (#3422)\n\n* ci: remove again geopandas pin and disable flaky test\r\n\r\n* Move exclusion to hopefully correct place","shortMessageHtmlLink":"ci: remove again geopandas pin and disable flaky test (vega#3422)"}},{"before":"f85fd0d6043f04f996a01f527072be440f244eb7","after":"c179291fc33f4d292df55770561e185ba9f34fb8","ref":"refs/heads/disable_example","pushedAt":"2024-05-18T07:38:42.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"binste","name":"Stefan Binder","path":"/binste","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/23366411?s=80&v=4"},"commit":{"message":"Move exclusion to hopefully correct place","shortMessageHtmlLink":"Move exclusion to hopefully correct place"}},{"before":null,"after":"f85fd0d6043f04f996a01f527072be440f244eb7","ref":"refs/heads/disable_example","pushedAt":"2024-05-18T07:25:47.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"binste","name":"Stefan Binder","path":"/binste","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/23366411?s=80&v=4"},"commit":{"message":"ci: remove again geopandas pin and disable flaky test","shortMessageHtmlLink":"ci: remove again geopandas pin and disable flaky test"}},{"before":"f1b4e2c84da2fba220022c8a285cc8280f824ed8","after":"9c5b17d0703a0d89a17670dae904058cd6575017","ref":"refs/heads/main","pushedAt":"2024-05-18T07:19:10.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"binste","name":"Stefan Binder","path":"/binste","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/23366411?s=80&v=4"},"commit":{"message":"tmp pin upperlimit geopandas (#3421)","shortMessageHtmlLink":"tmp pin upperlimit geopandas (vega#3421)"}},{"before":"baf2535a3e5e274626795f9e34a601d96920bc79","after":"76dd578e5dd567cc633a07fe3f7d15145665533e","ref":"refs/heads/cleanup_ci_and_archived_package_references","pushedAt":"2024-05-18T06:58:31.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"binste","name":"Stefan Binder","path":"/binste","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/23366411?s=80&v=4"},"commit":{"message":"Fix mypy errors","shortMessageHtmlLink":"Fix mypy errors"}},{"before":"6f4d9b3f0846ea3992969d5f31cb168644b230d6","after":"baf2535a3e5e274626795f9e34a601d96920bc79","ref":"refs/heads/cleanup_ci_and_archived_package_references","pushedAt":"2024-05-18T06:54:55.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"binste","name":"Stefan Binder","path":"/binste","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/23366411?s=80&v=4"},"commit":{"message":"Some more test skips if vl convert or anywidget are not installed","shortMessageHtmlLink":"Some more test skips if vl convert or anywidget are not installed"}},{"before":"2ba200df5d70d4d3dbbfb766a04526dfcad4cb26","after":"6f4d9b3f0846ea3992969d5f31cb168644b230d6","ref":"refs/heads/cleanup_ci_and_archived_package_references","pushedAt":"2024-05-18T06:47:43.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"binste","name":"Stefan Binder","path":"/binste","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/23366411?s=80&v=4"},"commit":{"message":"Skip jupyterchart tests if anywidget is not installed","shortMessageHtmlLink":"Skip jupyterchart tests if anywidget is not installed"}},{"before":"b00ba9f46718ad4650e502bed2f9cc007a2138bc","after":"2ba200df5d70d4d3dbbfb766a04526dfcad4cb26","ref":"refs/heads/cleanup_ci_and_archived_package_references","pushedAt":"2024-05-15T05:12:31.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"mattijn","name":"Mattijn van Hoek","path":"/mattijn","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/5186265?s=80&v=4"},"commit":{"message":"Merge branch 'main' into cleanup_ci_and_archived_package_references","shortMessageHtmlLink":"Merge branch 'main' into cleanup_ci_and_archived_package_references"}},{"before":"e0cd8ab2ad805687b29dba199f348a7ee40e8861","after":"b00ba9f46718ad4650e502bed2f9cc007a2138bc","ref":"refs/heads/cleanup_ci_and_archived_package_references","pushedAt":"2024-05-12T08:39:57.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"binste","name":"Stefan Binder","path":"/binste","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/23366411?s=80&v=4"},"commit":{"message":"Run __init__ update script","shortMessageHtmlLink":"Run __init__ update script"}},{"before":"3d79a489cb89ec6e3b95a4378b0b10aa0a6eb791","after":"e0cd8ab2ad805687b29dba199f348a7ee40e8861","ref":"refs/heads/cleanup_ci_and_archived_package_references","pushedAt":"2024-05-12T07:49:49.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"binste","name":"Stefan Binder","path":"/binste","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/23366411?s=80&v=4"},"commit":{"message":"Remove unused imports","shortMessageHtmlLink":"Remove unused imports"}},{"before":null,"after":"3d79a489cb89ec6e3b95a4378b0b10aa0a6eb791","ref":"refs/heads/cleanup_ci_and_archived_package_references","pushedAt":"2024-05-12T07:49:00.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"binste","name":"Stefan Binder","path":"/binste","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/23366411?s=80&v=4"},"commit":{"message":"Run test_save_html again with inline=True as vl-convert now supports it","shortMessageHtmlLink":"Run test_save_html again with inline=True as vl-convert now supports it"}},{"before":"3a9b23bf9bac348f5708416efe0048d2cdb1bad8","after":"f1b4e2c84da2fba220022c8a285cc8280f824ed8","ref":"refs/heads/main","pushedAt":"2024-05-11T11:35:50.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"binste","name":"Stefan Binder","path":"/binste","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/23366411?s=80&v=4"},"commit":{"message":"fix: solve mypy errors which are due to same object names in core.py and channels.py (#3414)\n\n* fix: solve mypy errors for altair.Color by being explicit in what is exported from core.py so that altair.Color is correctly identified as coming from channels.py\r\n\r\n* Also exclude core.Text\r\n\r\n* Fix ruff","shortMessageHtmlLink":"fix: solve mypy errors which are due to same object names in core.py …"}},{"before":"817e30be3c0c87f336adaededdca30a48715be88","after":"b2dc40195840c71a8735a91b9f767dabf18bf906","ref":"refs/heads/explicit_imports","pushedAt":"2024-05-05T14:58:47.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"binste","name":"Stefan Binder","path":"/binste","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/23366411?s=80&v=4"},"commit":{"message":"Fix ruff","shortMessageHtmlLink":"Fix ruff"}},{"before":"582da8d994056abf755190a085f6e37c88f682a7","after":"817e30be3c0c87f336adaededdca30a48715be88","ref":"refs/heads/explicit_imports","pushedAt":"2024-05-05T14:49:51.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"binste","name":"Stefan Binder","path":"/binste","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/23366411?s=80&v=4"},"commit":{"message":"Also exclude core.Text","shortMessageHtmlLink":"Also exclude core.Text"}},{"before":null,"after":"582da8d994056abf755190a085f6e37c88f682a7","ref":"refs/heads/explicit_imports","pushedAt":"2024-05-05T14:29:24.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"binste","name":"Stefan Binder","path":"/binste","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/23366411?s=80&v=4"},"commit":{"message":"fix: solve mypy errors for altair.Color by being explicit in what is exported from core.py so that altair.Color is correctly identified as coming from channels.py","shortMessageHtmlLink":"fix: solve mypy errors for altair.Color by being explicit in what is …"}},{"before":"fa8df102cd9acd19a835ca6b7bdca394ee17ea76","after":"3a9b23bf9bac348f5708416efe0048d2cdb1bad8","ref":"refs/heads/main","pushedAt":"2024-05-05T13:30:29.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"binste","name":"Stefan Binder","path":"/binste","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/23366411?s=80&v=4"},"commit":{"message":"Use raw strings with escape sequences (#3411)","shortMessageHtmlLink":"Use raw strings with escape sequences (vega#3411)"}},{"before":null,"after":"95111ca29a549bd5cd355f85dfaeeaef669473ad","ref":"refs/heads/use_type_checking_blocks","pushedAt":"2024-04-14T13:21:15.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"binste","name":"Stefan Binder","path":"/binste","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/23366411?s=80&v=4"},"commit":{"message":"Refactor","shortMessageHtmlLink":"Refactor"}},{"before":"eed97fe0ba661b7db577cf346bc531cdf7ed7327","after":"fa8df102cd9acd19a835ca6b7bdca394ee17ea76","ref":"refs/heads/main","pushedAt":"2024-04-14T12:57:00.000Z","pushType":"push","commitsCount":5,"pusher":{"login":"binste","name":"Stefan Binder","path":"/binste","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/23366411?s=80&v=4"},"commit":{"message":"Link to project board for roadmap (#3404)","shortMessageHtmlLink":"Link to project board for roadmap (vega#3404)"}},{"before":null,"after":"42bde58b6803ee827fa9cdbffb3d8e58e77bf399","ref":"refs/heads/reduce_num_header_items","pushedAt":"2024-04-12T14:59:14.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"binste","name":"Stefan Binder","path":"/binste","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/23366411?s=80&v=4"},"commit":{"message":"Reduce number of items in header to 4","shortMessageHtmlLink":"Reduce number of items in header to 4"}},{"before":"91a1166e1054b4a758b348ff1a78a00e79bf0aec","after":"b875f5abc9077580f326776d4317bc7aa9368877","ref":"refs/heads/update_org_name","pushedAt":"2024-04-12T12:35:26.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"binste","name":"Stefan Binder","path":"/binste","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/23366411?s=80&v=4"},"commit":{"message":"Ruff format","shortMessageHtmlLink":"Ruff format"}},{"before":null,"after":"91a1166e1054b4a758b348ff1a78a00e79bf0aec","ref":"refs/heads/update_org_name","pushedAt":"2024-04-12T12:04:23.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"binste","name":"Stefan Binder","path":"/binste","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/23366411?s=80&v=4"},"commit":{"message":"chore: Update org name from altair-viz to vega","shortMessageHtmlLink":"chore: Update org name from altair-viz to vega"}},{"before":"5e58fa24e1c10646d7285f23ebc8e18f4a3440d6","after":"eed97fe0ba661b7db577cf346bc531cdf7ed7327","ref":"refs/heads/main","pushedAt":"2024-03-30T15:38:36.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"binste","name":"Stefan Binder","path":"/binste","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/23366411?s=80&v=4"},"commit":{"message":"chore: use conventional commits standard in releasing.md. Remove temporary 5.3.0 release notes","shortMessageHtmlLink":"chore: use conventional commits standard in releasing.md. Remove temp…"}},{"before":"4a2e7f1014b17d538d812027e21c57ac223fdf1c","after":"5e58fa24e1c10646d7285f23ebc8e18f4a3440d6","ref":"refs/heads/main","pushedAt":"2024-03-30T15:38:02.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"binste","name":"Stefan Binder","path":"/binste","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/23366411?s=80&v=4"},"commit":{"message":"chore: bump version to 5.4.0dev","shortMessageHtmlLink":"chore: bump version to 5.4.0dev"}},{"before":"86c5411714b826d06aefe8b6c5ad704627ba77c1","after":"4a2e7f1014b17d538d812027e21c57ac223fdf1c","ref":"refs/heads/main","pushedAt":"2024-03-30T15:23:27.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"binste","name":"Stefan Binder","path":"/binste","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/23366411?s=80&v=4"},"commit":{"message":"chore: bump version to 5.3.0","shortMessageHtmlLink":"chore: bump version to 5.3.0"}},{"before":"439c253346dac376afd556e83e6a1e5209381850","after":"86c5411714b826d06aefe8b6c5ad704627ba77c1","ref":"refs/heads/main","pushedAt":"2024-03-30T15:22:07.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"binste","name":"Stefan Binder","path":"/binste","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/23366411?s=80&v=4"},"commit":{"message":"docs: Fix numpy tooltip images example","shortMessageHtmlLink":"docs: Fix numpy tooltip images example"}},{"before":"51aa57fa767f791859c5770cf11c4e5e76bb25f9","after":"439c253346dac376afd556e83e6a1e5209381850","ref":"refs/heads/main","pushedAt":"2024-03-30T15:20:58.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"binste","name":"Stefan Binder","path":"/binste","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/23366411?s=80&v=4"},"commit":{"message":"chore: Update releasing instructions","shortMessageHtmlLink":"chore: Update releasing instructions"}}],"hasNextPage":true,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAEUs_B9AA","startCursor":null,"endCursor":null}},"title":"Activity · binste/altair"}