From ac6874e5274724af2f1e35a3d655399f301b92d6 Mon Sep 17 00:00:00 2001 From: JulianKimmig Date: Fri, 6 Jun 2025 11:37:07 +0200 Subject: [PATCH 1/2] =?UTF-8?q?fix(data):=20=F0=9F=90=9B=20handle=20index?= =?UTF-8?q?=20as=20x=20value=20in=20plot=5Fmultidata=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Ensure `data` is a DataFrame before processing. - Allow "index" as a valid input for `x`, extracting index values accordingly. --- src/funcnodes_plotly/express.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/funcnodes_plotly/express.py b/src/funcnodes_plotly/express.py index 8f2f51c..a80b715 100644 --- a/src/funcnodes_plotly/express.py +++ b/src/funcnodes_plotly/express.py @@ -1452,7 +1452,7 @@ def line_ternary( [ "x", ], - lambda x: [NoValue] + list(iter(x)), + lambda x: ["index"] + list(iter(x)), ) } }, @@ -1486,11 +1486,17 @@ def is_plotable(value): and value.ndim < 2 ) - if x not in data: - raise ValueError(f"The specified x '{x}' is not in the dictionary.") + if not isinstance(data, pd.DataFrame): + data = pd.DataFrame(data) + + if x == "index": + x_values = data.index + else: + if x not in data: + raise ValueError(f"The specified x '{x}' is not in the data.") - # Extract the x values - x_values = data[x] + # Extract the x values + x_values = data[x] # Create figure fig = go.Figure() From 14825c54a2115a74e66888bc25bba1d532a99e93 Mon Sep 17 00:00:00 2001 From: JulianKimmig Date: Fri, 6 Jun 2025 11:38:18 +0200 Subject: [PATCH 2/2] =?UTF-8?q?bump:=20version=200.3.1=20=E2=86=92=200.3.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 21 +++++++++++++++++++++ pyproject.toml | 9 ++++++++- uv.lock | 2 +- 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..0da92f2 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,21 @@ +## v0.3.2 (2025-06-06) + +### Feat + +- update package dependencies and refactor render plugin types for improved compatibility +- add CSS styles for funcnodes_plotly_container and update module path in React plugin +- enhance add_trace function to support optional figure input and handle trace as figure + +### Fix + +- **data**: 🐛 handle index as x value in plot_multidata function +- update kaleido dependency condition for non-Windows platforms +- handle potential purge errors +- handle NoValue in plotting functions to ensure proper data representation + +### Refactor + +- rename test classes and update output variable names for clarity +- update plotting functions to return both trace and figure + +## v0.2.0 (2024-08-29) diff --git a/pyproject.toml b/pyproject.toml index bcfec21..65913e8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "funcnodes-plotly" -version = "0.3.1" +version = "0.3.2" description = "" readme = "README.md" classifiers = [ @@ -47,6 +47,13 @@ download = "https://pypi.org/project/funcnodes-plotly/#files" [tool.setuptools.package-dir] "" = "src" + +[tool.commitizen] +name = "cz_conventional_commits" +tag_format = "v$version" +version_scheme = "pep440" +version_provider = "uv" +update_changelog_on_bump = true [project.entry-points."funcnodes.module"] module = "funcnodes_plotly" shelf = "funcnodes_plotly:NODE_SHELF" diff --git a/uv.lock b/uv.lock index abd0953..574baad 100644 --- a/uv.lock +++ b/uv.lock @@ -489,7 +489,7 @@ wheels = [ [[package]] name = "funcnodes-plotly" -version = "0.3.1" +version = "0.3.2" source = { editable = "." } dependencies = [ { name = "funcnodes" },