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

[Tidy] Make visual-vocabulary folder public #729

Merged
merged 4 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@ select = [
"vizro-ai/examples/chart_by_vizro_ai.ipynb" = ["T201", "E501"]
"vizro-ai/examples/dashboard_by_vizro_ai.ipynb" = ["T201", "E402", "E501"]
# Ignore missing docstrings in visual-vocabulary examples to keep them succinct.
"vizro-core/examples/_visual-vocabulary/pages/examples/**" = ["D100", "D103"]
"vizro-core/examples/visual-vocabulary/pages/examples/**" = ["D100", "D103"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!--
A new scriv changelog fragment.

Uncomment the section that is right (remove the HTML comment wrapper).
-->

<!--
### Highlights ✨

- A bullet item for the Highlights ✨ category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Removed

- A bullet item for the Removed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Added

- A bullet item for the Added category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Changed

- A bullet item for the Changed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Deprecated

- A bullet item for the Deprecated category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Fixed

- A bullet item for the Fixed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Security

- A bullet item for the Security category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ The dashboard is still in development. Below is an overview of the chart types f

Contributions are welcome! To contribute a chart, follow the steps below:

1. Check that a `svg` file named after the chart type is contained in the [assets](https://github.com/mckinsey/vizro/tree/main/vizro-core/examples/_visual-vocabulary/assets/images/charts) folder. If not, [raise an issue](https://github.com/mckinsey/vizro/issues) in the repository.
1. Check that a `svg` file named after the chart type is contained in the [assets](https://github.com/mckinsey/vizro/tree/main/vizro-core/examples/visual-vocabulary/assets/images/charts) folder. If not, [raise an issue](https://github.com/mckinsey/vizro/issues) in the repository.
2. Add the data set to `_pages_utils.py` if it doesn't already exist. Use existing data sets preferably or any other data set that is publicly available e.g. [plotlx.express.data](https://plotly.com/python-api-reference/generated/plotly.express.data.html)
3. Create a new page for the chart type and add it to the relevant category `.py` file such as `correlation.py`,
`deviation.py`, `distribution.py`, etc. Ensure you add the page to the list of `pages` at the end of the `.py` file.
Expand All @@ -111,6 +111,6 @@ Contributions are welcome! To contribute a chart, follow the steps below:

## How to run the example locally

1. If you have `hatch` set up, run the example with the command `hatch run example _visual-vocabulary`.
1. If you have `hatch` set up, run the example with the command `hatch run example visual-vocabulary`.
Otherwise, with a virtual Python environment activated, run `pip install -r requirements.txt` and then `python app.py`.
2. You should now be able to access the app locally via http://127.0.0.1:8050/.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def butterfly_factory(group: str):

Use a butterfly chart when you wish to emphasize the comparison between two data sets sharing the same
parameters. Sharing this chart with your audience will help them see at a glance how two groups differ
within the same parameters. You can also **stack** two bars on each side To divide your
within the same parameters. You can also **stack** two bars on each side to divide your
categories.
"""
),
Expand Down
4 changes: 2 additions & 2 deletions vizro-core/hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ serve = "mkdocs serve --open"
dependencies = [
"pip",
"pyyaml",
# black is required to run the example _visual-vocabulary. This is completely independent of the black used in linting
# black is required to run the example visual-vocabulary. This is completely independent of the black used in linting
# our code. When this moves to HuggingFace we can remove the requirement from here.
"black==24.4.2",
"plotly>=5.24.0" # to leverage new MapLibre features in _visual-vocabulary
"plotly>=5.24.0" # to leverage new MapLibre features in visual-vocabulary
]
installer = "uv"
scripts = {example = "cd examples/{args:scratch_dev}; python app.py"}
Expand Down
Loading