From b07c4c42b8df36f40e58c83f86fd7d2bfd85d0c0 Mon Sep 17 00:00:00 2001 From: Sylvie Zhang <114536986+sylviezhang37@users.noreply.github.com> Date: Mon, 7 Oct 2024 06:12:39 -0400 Subject: [PATCH] [GHC] Refactor/remove legacy code (#790) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Antony Milne <49395058+antonymilne@users.noreply.github.com> --- ...536986+sylviezhang37_remove_legacy_code.md | 48 +++++++++++++++++++ vizro-core/docs/pages/explanation/authors.md | 3 +- vizro-core/src/vizro/models/_layout.py | 13 +---- 3 files changed, 52 insertions(+), 12 deletions(-) create mode 100644 vizro-core/changelog.d/20241004_220357_114536986+sylviezhang37_remove_legacy_code.md diff --git a/vizro-core/changelog.d/20241004_220357_114536986+sylviezhang37_remove_legacy_code.md b/vizro-core/changelog.d/20241004_220357_114536986+sylviezhang37_remove_legacy_code.md new file mode 100644 index 000000000..f1f65e73c --- /dev/null +++ b/vizro-core/changelog.d/20241004_220357_114536986+sylviezhang37_remove_legacy_code.md @@ -0,0 +1,48 @@ + + + + + + + + + diff --git a/vizro-core/docs/pages/explanation/authors.md b/vizro-core/docs/pages/explanation/authors.md index fc1e77d9c..cb53f6ad7 100644 --- a/vizro-core/docs/pages/explanation/authors.md +++ b/vizro-core/docs/pages/explanation/authors.md @@ -35,7 +35,8 @@ Natalia Kurakina, [Rashida Kanchwala](https://github.com/rashidakanchwala), [Juan Luis Cano Rodríguez](https://github.com/astrojuanlu), [Anna Xiong](https://github.com/Anna-Xiong), -[Chiara Pullem](https://github.com/chiara-sophie) +[Chiara Pullem](https://github.com/chiara-sophie), +[Sylvie Zhang](https://github.com/sylviezhang37) with thanks to Sam Bourton and Kevin Staight for sponsorship, inspiration and guidance, diff --git a/vizro-core/src/vizro/models/_layout.py b/vizro-core/src/vizro/models/_layout.py index 2249f355a..938a9daf7 100644 --- a/vizro-core/src/vizro/models/_layout.py +++ b/vizro-core/src/vizro/models/_layout.py @@ -5,9 +5,9 @@ from numpy import ma try: - from pydantic.v1 import Field, PrivateAttr, ValidationError, validator + from pydantic.v1 import Field, PrivateAttr, validator except ImportError: # pragma: no cov - from pydantic import Field, PrivateAttr, ValidationError, validator + from pydantic import Field, PrivateAttr, validator from vizro._constants import EMPTY_SPACE_CONST from vizro.models import VizroBaseModel @@ -223,12 +223,3 @@ def build(self): id=self.id, ) return component_container - - -if __name__ == "__main__": - print(repr(Layout(grid=[[0, 1], [0, 2]]))) # noqa: T201 - - try: - Layout(grid=[[0, 1], [1, 0]]) - except ValidationError as e: - print(e) # noqa: T201