hiplot-mm 0.0.3rc0__tar.gz → 0.0.3rc1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. {hiplot_mm-0.0.3rc0/hiplot_mm.egg-info → hiplot_mm-0.0.3rc1}/PKG-INFO +67 -23
  2. hiplot_mm-0.0.3rc1/README.md +116 -0
  3. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/hiplot/__init__.py +1 -1
  4. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/hiplot/fetchers.py +1 -1
  5. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/hiplot/fetchers_demo.py +2 -2
  6. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/hiplot/ipython.py +2 -2
  7. hiplot_mm-0.0.3rc1/hiplot/pkginfo.py +15 -0
  8. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/hiplot/render.py +2 -2
  9. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/hiplot/server.py +1 -1
  10. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/hiplot/static/built/hiplot.bundle.js +1 -1
  11. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/hiplot/static/built/streamlit_component/hiplot_streamlit.bundle.js +1 -1
  12. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/hiplot/test_render.py +2 -2
  13. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1/hiplot_mm.egg-info}/PKG-INFO +67 -23
  14. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/hiplot_mm.egg-info/SOURCES.txt +0 -1
  15. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/hiplot_mm.egg-info/entry_points.txt +1 -1
  16. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/hiplot_mm.egg-info/requires.txt +2 -3
  17. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/pyproject.toml +13 -7
  18. hiplot_mm-0.0.3rc0/README.md +0 -71
  19. hiplot_mm-0.0.3rc0/hiplot/pkginfo.py +0 -22
  20. hiplot_mm-0.0.3rc0/setup.py +0 -12
  21. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/LICENSE +0 -0
  22. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/MANIFEST.in +0 -0
  23. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/NOTICE +0 -0
  24. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/hiplot/__main__.py +0 -0
  25. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/hiplot/compress.py +0 -0
  26. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/hiplot/experiment.py +0 -0
  27. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/hiplot/py.typed +0 -0
  28. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/hiplot/static/built/streamlit_component/index.html +0 -0
  29. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/hiplot/static/icon-w.svg +0 -0
  30. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/hiplot/static/icon.png +0 -0
  31. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/hiplot/static/icon.svg +0 -0
  32. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/hiplot/static/logo-w.svg +0 -0
  33. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/hiplot/static/logo.png +0 -0
  34. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/hiplot/static/logo.svg +0 -0
  35. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/hiplot/static/thumbnail.png +0 -0
  36. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/hiplot/streamlit_helpers.py +0 -0
  37. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/hiplot/templates/index.html +0 -0
  38. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/hiplot/test_experiment.py +0 -0
  39. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/hiplot/test_fetchers.py +0 -0
  40. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/hiplot_mm.egg-info/dependency_links.txt +0 -0
  41. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/hiplot_mm.egg-info/top_level.txt +0 -0
  42. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/requirements/dev.txt +0 -0
  43. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/requirements/main.txt +0 -0
  44. {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc1}/setup.cfg +0 -0
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hiplot-mm
3
- Version: 0.0.3rc0
3
+ Version: 0.0.3rc1
4
4
  Summary: High dimensional Interactive Plotting tool
5
5
  Author: Facebook AI Research, mathematicalmichael @ Mind the Math, LLC
6
6
  License-Expression: MIT
7
- Project-URL: Homepage, https://github.com/facebookresearch/hiplot
7
+ Project-URL: Homepage, https://github.com/mindthemath/hiplot
8
8
  Project-URL: Documentation, https://facebookresearch.github.io/hiplot/
9
- Project-URL: Repository, https://github.com/facebookresearch/hiplot
9
+ Project-URL: Repository, https://github.com/mindthemath/hiplot
10
10
  Classifier: Development Status :: 4 - Beta
11
11
  Classifier: Intended Audience :: Developers
12
12
  Classifier: Intended Audience :: Science/Research
@@ -38,10 +38,9 @@ Provides-Extra: all
38
38
  Requires-Dist: hiplot-mm[notebook,server,streamlit]; extra == "all"
39
39
  Provides-Extra: dev
40
40
  Requires-Dist: pytest; extra == "dev"
41
- Requires-Dist: mypy; extra == "dev"
41
+ Requires-Dist: ty; extra == "dev"
42
42
  Requires-Dist: ipykernel; extra == "dev"
43
43
  Requires-Dist: wheel; extra == "dev"
44
- Requires-Dist: selenium; extra == "dev"
45
44
  Requires-Dist: mistune==0.8.4; extra == "dev"
46
45
  Requires-Dist: twine; extra == "dev"
47
46
  Requires-Dist: pre-commit; extra == "dev"
@@ -51,37 +50,53 @@ Requires-Dist: beautifulsoup4; extra == "dev"
51
50
  Requires-Dist: optuna; extra == "dev"
52
51
  Requires-Dist: sphinx==5.2.0; extra == "dev"
53
52
  Requires-Dist: guzzle_sphinx_theme==0.7.11; extra == "dev"
54
- Requires-Dist: m2r2==0.3.3; extra == "dev"
53
+ Requires-Dist: m2r2>=0.3.4; extra == "dev"
55
54
  Requires-Dist: flask; extra == "dev"
56
55
  Requires-Dist: flask-compress; extra == "dev"
57
56
  Requires-Dist: ipython>=7.0.1; extra == "dev"
58
57
  Dynamic: license-file
59
58
 
60
- # HiPlot - High dimensional Interactive Plotting [![CircleCI](https://circleci.com/gh/facebookresearch/hiplot/tree/main.svg?style=svg&circle-token=c89b6825078e174cf35bdc18e4ad4a16e28876f9)](https://circleci.com/gh/facebookresearch/hiplot/tree/main)
59
+ # HiPlot - High dimensional Interactive Plotting
61
60
 
61
+ ![Logo](https://raw.githubusercontent.com/mindthemath/hiplot/main/hiplot/static/logo.png)
62
62
 
63
- ![Logo](https://raw.githubusercontent.com/facebookresearch/hiplot/main/hiplot/static/logo.png)
64
-
65
- [![Support Ukraine](https://img.shields.io/badge/Support-Ukraine-FFD500?style=flat&labelColor=005BBB)](https://opensource.fb.com/support-ukraine)
63
+ [![CI](https://github.com/mindthemath/hiplot/actions/workflows/ci.yml/badge.svg)](https://github.com/mindthemath/hiplot/actions/workflows/ci.yml)
64
+ [![Release](https://github.com/mindthemath/hiplot/actions/workflows/release.yml/badge.svg)](https://github.com/mindthemath/hiplot/actions/workflows/release.yml)
66
65
  [![License: MIT](https://img.shields.io/badge/License-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT)
67
- [![PyPI download month](https://img.shields.io/pypi/dm/hiplot.svg)](https://pypi.python.org/pypi/hiplot/) [![PyPI version](https://img.shields.io/pypi/v/hiplot.svg)](https://pypi.python.org/pypi/hiplot/) [![docs](https://img.shields.io/badge/docs-passing-brightgreen.svg)](https://facebookresearch.github.io/hiplot/index.html) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/facebookresearch/hiplot/blob/main/examples/HiPlotColabExample.ipynb)
66
+ [![PyPI version](https://img.shields.io/pypi/v/hiplot-mm.svg)](https://pypi.python.org/pypi/hiplot-mm/)
67
+ [![PyPI downloads](https://img.shields.io/pypi/dm/hiplot-mm.svg)](https://pypi.python.org/pypi/hiplot-mm/)
68
+ [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mindthemath/hiplot/blob/main/examples/HiPlotColabExample.ipynb)
68
69
 
70
+ > **Community-maintained fork**: This is a community-maintained fork of [Facebook Research's HiPlot](https://github.com/facebookresearch/hiplot), which has been archived. We aim to keep the project alive with bug fixes, security updates, and new features.
69
71
 
70
72
  HiPlot is a lightweight interactive visualization tool to help AI researchers discover correlations and patterns in high-dimensional data using parallel plots and other graphical ways to represent information.
71
73
 
72
- ### [Try a demo now with sweep data](https://facebookresearch.github.io/hiplot/_static/demo/ml1.csv.html) or [upload your CSV](https://facebookresearch.github.io/hiplot/_static/hiplot_upload.html) or [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/facebookresearch/hiplot/blob/main/examples/HiPlotColabExample.ipynb)
74
+ ### [Try a demo now with sweep data](https://mindthemath.github.io/hiplot/_static/demo/ml1.csv.html) or [upload your CSV](https://mindthemath.github.io/hiplot/_static/hiplot_upload.html) or [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mindthemath/hiplot/blob/main/examples/HiPlotColabExample.ipynb)
73
75
 
74
76
  There are several modes to HiPlot:
75
77
  - As a web-server (if your data is a CSV for instance)
76
- - In a jupyter notebook (to visualize python data), or in [Streamlit apps](https://facebookresearch.github.io/hiplot/tuto_streamlit.html)
78
+ - In a jupyter notebook (to visualize python data), or in [Streamlit apps](https://mindthemath.github.io/hiplot/tuto_streamlit.html)
77
79
  - In CLI to render standalone HTML
78
80
 
79
81
 
80
82
  ```bash
81
- pip install -U hiplot # Or for conda users: conda install -c conda-forge hiplot
83
+ # Core package (HTML export only)
84
+ pip install hiplot-mm
85
+
86
+ # With Jupyter notebook support
87
+ pip install hiplot-mm[notebook]
88
+
89
+ # With web server support (hiplot CLI command)
90
+ pip install hiplot-mm[server]
91
+
92
+ # With Streamlit support
93
+ pip install hiplot-mm[streamlit]
94
+
95
+ # Everything
96
+ pip install hiplot-mm[all]
82
97
  ```
83
98
 
84
- If you have a jupyter notebook, you can get started with something as simple as:
99
+ If you have a Jupyter notebook, you can get started with something as simple as:
85
100
 
86
101
  ```python
87
102
  import hiplot as hip
@@ -91,17 +106,46 @@ data = [{'dropout':0.1, 'lr': 0.001, 'loss': 10.0, 'optimizer': 'SGD'},
91
106
  hip.Experiment.from_iterable(data).display()
92
107
  ```
93
108
 
94
- ### [See the live result](https://facebookresearch.github.io/hiplot/_static/demo/demo_basic_usage.html)
95
- ![Result](https://raw.githubusercontent.com/facebookresearch/hiplot/main/assets/notebook.png)
109
+ ### [See the live result](https://mindthemath.github.io/hiplot/_static/demo/demo_basic_usage.html)
110
+ ![Result](https://raw.githubusercontent.com/mindthemath/hiplot/main/assets/notebook.png)
96
111
 
97
112
  ## Links
98
113
 
99
- * Blog post: https://ai.facebook.com/blog/hiplot-high-dimensional-interactive-plots-made-easy/
100
- * Documentation: https://facebookresearch.github.io/hiplot/index.html
101
- * Pypi package: https://pypi.org/project/hiplot/
102
- * Conda package: https://anaconda.org/conda-forge/hiplot
103
- * NPM package: https://www.npmjs.com/package/hiplot
104
- * Examples: https://github.com/facebookresearch/hiplot/tree/main/examples
114
+ * Repository: https://github.com/mindthemath/hiplot
115
+ * Documentation: https://mindthemath.github.io/hiplot/
116
+ * PyPI package: https://pypi.org/project/hiplot-mm/
117
+ * Examples: https://github.com/mindthemath/hiplot/tree/main/examples
118
+ * Original blog post: https://ai.facebook.com/blog/hiplot-high-dimensional-interactive-plots-made-easy/
119
+
120
+
121
+ ## Development
122
+
123
+ To build from source:
124
+
125
+ ```bash
126
+ # Install dependencies
127
+ bun install
128
+ uv sync --all-extras
129
+
130
+ # Build JavaScript bundles
131
+ bun run build
132
+
133
+ # Build Python package
134
+ uv build
135
+
136
+ # Or use the all-in-one build script
137
+ ./build.sh
138
+ ```
139
+
140
+ **Output directories:**
141
+ - `npm-dist/` - NPM package artifacts
142
+ - `dist/` - Python wheel and sdist
143
+ - `hiplot/static/built/` - JS bundle included in Python package
144
+
145
+ **Run the dev server:**
146
+ ```bash
147
+ uv run hiplot --port 8765
148
+ ```
105
149
 
106
150
 
107
151
  ## Citing
@@ -0,0 +1,116 @@
1
+ # HiPlot - High dimensional Interactive Plotting
2
+
3
+ ![Logo](https://raw.githubusercontent.com/mindthemath/hiplot/main/hiplot/static/logo.png)
4
+
5
+ [![CI](https://github.com/mindthemath/hiplot/actions/workflows/ci.yml/badge.svg)](https://github.com/mindthemath/hiplot/actions/workflows/ci.yml)
6
+ [![Release](https://github.com/mindthemath/hiplot/actions/workflows/release.yml/badge.svg)](https://github.com/mindthemath/hiplot/actions/workflows/release.yml)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT)
8
+ [![PyPI version](https://img.shields.io/pypi/v/hiplot-mm.svg)](https://pypi.python.org/pypi/hiplot-mm/)
9
+ [![PyPI downloads](https://img.shields.io/pypi/dm/hiplot-mm.svg)](https://pypi.python.org/pypi/hiplot-mm/)
10
+ [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mindthemath/hiplot/blob/main/examples/HiPlotColabExample.ipynb)
11
+
12
+ > **Community-maintained fork**: This is a community-maintained fork of [Facebook Research's HiPlot](https://github.com/facebookresearch/hiplot), which has been archived. We aim to keep the project alive with bug fixes, security updates, and new features.
13
+
14
+ HiPlot is a lightweight interactive visualization tool to help AI researchers discover correlations and patterns in high-dimensional data using parallel plots and other graphical ways to represent information.
15
+
16
+ ### [Try a demo now with sweep data](https://mindthemath.github.io/hiplot/_static/demo/ml1.csv.html) or [upload your CSV](https://mindthemath.github.io/hiplot/_static/hiplot_upload.html) or [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mindthemath/hiplot/blob/main/examples/HiPlotColabExample.ipynb)
17
+
18
+ There are several modes to HiPlot:
19
+ - As a web-server (if your data is a CSV for instance)
20
+ - In a jupyter notebook (to visualize python data), or in [Streamlit apps](https://mindthemath.github.io/hiplot/tuto_streamlit.html)
21
+ - In CLI to render standalone HTML
22
+
23
+
24
+ ```bash
25
+ # Core package (HTML export only)
26
+ pip install hiplot-mm
27
+
28
+ # With Jupyter notebook support
29
+ pip install hiplot-mm[notebook]
30
+
31
+ # With web server support (hiplot CLI command)
32
+ pip install hiplot-mm[server]
33
+
34
+ # With Streamlit support
35
+ pip install hiplot-mm[streamlit]
36
+
37
+ # Everything
38
+ pip install hiplot-mm[all]
39
+ ```
40
+
41
+ If you have a Jupyter notebook, you can get started with something as simple as:
42
+
43
+ ```python
44
+ import hiplot as hip
45
+ data = [{'dropout':0.1, 'lr': 0.001, 'loss': 10.0, 'optimizer': 'SGD'},
46
+ {'dropout':0.15, 'lr': 0.01, 'loss': 3.5, 'optimizer': 'Adam'},
47
+ {'dropout':0.3, 'lr': 0.1, 'loss': 4.5, 'optimizer': 'Adam'}]
48
+ hip.Experiment.from_iterable(data).display()
49
+ ```
50
+
51
+ ### [See the live result](https://mindthemath.github.io/hiplot/_static/demo/demo_basic_usage.html)
52
+ ![Result](https://raw.githubusercontent.com/mindthemath/hiplot/main/assets/notebook.png)
53
+
54
+ ## Links
55
+
56
+ * Repository: https://github.com/mindthemath/hiplot
57
+ * Documentation: https://mindthemath.github.io/hiplot/
58
+ * PyPI package: https://pypi.org/project/hiplot-mm/
59
+ * Examples: https://github.com/mindthemath/hiplot/tree/main/examples
60
+ * Original blog post: https://ai.facebook.com/blog/hiplot-high-dimensional-interactive-plots-made-easy/
61
+
62
+
63
+ ## Development
64
+
65
+ To build from source:
66
+
67
+ ```bash
68
+ # Install dependencies
69
+ bun install
70
+ uv sync --all-extras
71
+
72
+ # Build JavaScript bundles
73
+ bun run build
74
+
75
+ # Build Python package
76
+ uv build
77
+
78
+ # Or use the all-in-one build script
79
+ ./build.sh
80
+ ```
81
+
82
+ **Output directories:**
83
+ - `npm-dist/` - NPM package artifacts
84
+ - `dist/` - Python wheel and sdist
85
+ - `hiplot/static/built/` - JS bundle included in Python package
86
+
87
+ **Run the dev server:**
88
+ ```bash
89
+ uv run hiplot --port 8765
90
+ ```
91
+
92
+
93
+ ## Citing
94
+
95
+ ```bibtex
96
+ @misc{hiplot,
97
+ author = {Haziza, D. and Rapin, J. and Synnaeve, G.},
98
+ title = {{Hiplot, interactive high-dimensionality plots}},
99
+ year = {2020},
100
+ publisher = {GitHub},
101
+ journal = {GitHub repository},
102
+ howpublished = {\url{https://github.com/facebookresearch/hiplot}},
103
+ }
104
+ ```
105
+
106
+ ## Credits
107
+ Inspired by and based on code from [Kai Chang](http://bl.ocks.org/syntagmatic/3150059), [Mike Bostock](http://bl.ocks.org/1341021) and [Jason Davies](http://bl.ocks.org/1341281).
108
+
109
+ External contributors (*please add your name when you submit your first pull request*):
110
+ - [louismartin](https://github.com/louismartin)
111
+ - [GoldenCorgi](https://github.com/GoldenCorgi)
112
+ - [callistachang](https://github.com/callistachang)
113
+
114
+
115
+ ## License
116
+ HiPlot is [MIT](LICENSE) licensed, as found in the [LICENSE](LICENSE) file.
@@ -5,7 +5,7 @@
5
5
  from .experiment import (Experiment, ExperimentFetcherDoesntApply, ExperimentValidationError, ExperimentValidationCircularRef,
6
6
  ExperimentValidationMissingParent, Datapoint, ExperimentDisplayed, ValueDef, ValueType, Displays)
7
7
  from .server import run_server, run_server_main
8
- from .pkginfo import version as __version__, package_name
8
+ from .pkginfo import __version__, package_name
9
9
 
10
10
  from . import fetchers
11
11
 
@@ -306,7 +306,7 @@ def get_fetcher(fetcher_spec: str) -> hip.ExperimentFetcher:
306
306
  if module is None:
307
307
  raise RuntimeError(f"Unable to create fetcher '{fetcher_spec}'")
308
308
 
309
- return getattr(module, parts[-1]) # type: ignore
309
+ return getattr(module, parts[-1])
310
310
 
311
311
 
312
312
  def get_fetchers(add_fetchers: tp.List[str]) -> tp.List[hip.ExperimentFetcher]:
@@ -50,8 +50,8 @@ def demo_line_xy() -> hip.Experiment:
50
50
  if i > 10:
51
51
  from_parent = random.choice(exp.datapoints[-10:])
52
52
  dp.from_uid = from_parent.uid # <-- Connect the parent to the child
53
- dp.values['loss'] += from_parent.values['loss'] # type: ignore
54
- dp.values['param'] *= from_parent.values['param'] # type: ignore
53
+ dp.values['loss'] += from_parent.values['loss']
54
+ dp.values['param'] *= from_parent.values['param']
55
55
  exp.datapoints.append(dp)
56
56
  # DEMO_LINE_XY_END
57
57
  return exp
@@ -111,7 +111,7 @@ class IPythonExperimentDisplayed(exp.ExperimentDisplayed):
111
111
  # msg is the comm_open message
112
112
 
113
113
  # Register handler for later messages
114
- @comm.on_msg # type: ignore
114
+ @comm.on_msg
115
115
  def _recv(msg: t.Dict[str, t.Any]) -> None:
116
116
  self._num_recv += 1
117
117
  msg_data = msg["content"]["data"]
@@ -145,7 +145,7 @@ class IPythonExperimentDisplayed(exp.ExperimentDisplayed):
145
145
  last_msg = self._last_data_per_type.get("brush_extents")
146
146
  if last_msg is None:
147
147
  raise self.no_data_received_error
148
- return last_msg # type: ignore
148
+ return last_msg
149
149
 
150
150
 
151
151
  def _should_embed_js_with_html() -> bool:
@@ -0,0 +1,15 @@
1
+ # Copyright (c) Facebook, Inc. and its affiliates.
2
+ # This source code is licensed under the MIT license found in the
3
+ # LICENSE file in the root directory of this source tree.
4
+
5
+ from importlib.metadata import version, PackageNotFoundError
6
+
7
+ package_name = "hiplot-mm"
8
+
9
+ # Dynamic version from installed package metadata
10
+ # This ensures __version__ matches pyproject.toml when installed via pip
11
+ try:
12
+ __version__ = version(package_name)
13
+ except PackageNotFoundError:
14
+ # Package is not installed (e.g., running from source checkout)
15
+ __version__ = "0.0.0.dev0"
@@ -36,7 +36,7 @@ def html_inlinize(html: str, replace_local: bool = True) -> str:
36
36
  static_root = str(Path(__file__).parent)
37
37
  soup = BeautifulSoup(html, "html.parser")
38
38
  for i in soup.find_all("link"):
39
- href = i["href"]
39
+ href = str(i["href"])
40
40
  if href.startswith("http") or href.startswith("//"):
41
41
  continue
42
42
  if not replace_local:
@@ -54,7 +54,7 @@ def html_inlinize(html: str, replace_local: bool = True) -> str:
54
54
  i["href"] = f"data:{SUFFIX_TO_TYPE[file.suffix]};base64,{base64.b64encode(file.open('rb').read()).decode('ascii')}"
55
55
  for i in soup.find_all("script"):
56
56
  try:
57
- src = i["src"]
57
+ src = str(i["src"])
58
58
  except KeyError:
59
59
  continue
60
60
  if src.startswith("http") or src.startswith("//"):
@@ -51,7 +51,7 @@ def run_server(fetchers: List[exp.ExperimentFetcher], host: str = '127.0.0.1', p
51
51
 
52
52
  def run_server_main() -> int:
53
53
  parser = argparse.ArgumentParser(prog="HiPlot", description="Start HiPlot webserver")
54
- parser.add_argument('--version', action='version', version=f'{pkginfo.package_name} {pkginfo.version}')
54
+ parser.add_argument('--version', action='version', version=f'{pkginfo.package_name} {pkginfo.__version__}')
55
55
  parser.add_argument("--host", type=str, default="127.0.0.1")
56
56
  parser.add_argument("--port", type=int, default=5005)
57
57
  parser.add_argument("--dev", action='store_true', help="Enable Flask Debug mode (watches for files modifications, etc..)")