From 438c40d35d91fe9e82fc02fe2be487c6684caf24 Mon Sep 17 00:00:00 2001 From: Michael Pilosov Date: Sat, 9 Dec 2023 13:49:33 -0700 Subject: [PATCH 1/2] style, but ordering messed up --- .gitignore | 4 ++++ package.json | 2 +- setup.py | 4 ++-- src/parallel/parallel.scss | 2 +- src/parallel/parallel.tsx | 12 ++++++------ 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index a68bf347..601550b5 100644 --- a/.gitignore +++ b/.gitignore @@ -116,3 +116,7 @@ docs/build hiplot/static/built src/**/*css.d.ts *.code-workspace + + +npm-build +npm-package diff --git a/package.json b/package.json index eac06477..c150dccb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hiplot", - "version": "0.0.0", + "version": "0.0.1", "description": "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.", "main": "dist/hiplot.lib.js", "types": "dist/hiplot.d.ts", diff --git a/setup.py b/setup.py index 2eca0a6a..fbff69c7 100644 --- a/setup.py +++ b/setup.py @@ -36,8 +36,8 @@ def readme() -> str: setup( - name="hiplot", - version=version, + name="hiplot-mm", + version="0.0.1rc1", description="High dimensional Interactive Plotting tool", long_description=readme(), long_description_content_type="text/markdown", diff --git a/src/parallel/parallel.scss b/src/parallel/parallel.scss index f2c3c181..44f100bf 100644 --- a/src/parallel/parallel.scss +++ b/src/parallel/parallel.scss @@ -23,7 +23,7 @@ } .pplotLabel :global(.label-name) { - transform-origin: bottom left; + transform-origin: top left; } .axis .tickSelected { diff --git a/src/parallel/parallel.tsx b/src/parallel/parallel.tsx index 754c8471..5f8d6b51 100644 --- a/src/parallel/parallel.tsx +++ b/src/parallel/parallel.tsx @@ -70,9 +70,9 @@ export class ParallelPlot extends React.Component void = null; m = [ TOP_MARGIN_PIXELS, // top - TOP_MARGIN_PIXELS * 0.5, // right - 10, // bottom - 10 // left + TOP_MARGIN_PIXELS * 0.125, // right + TOP_MARGIN_PIXELS * 0.125, // bottom + TOP_MARGIN_PIXELS * 0.25, // left ]; // Margins // Available space minus margins w: number; @@ -683,10 +683,10 @@ export class ParallelPlot extends React.Component Date: Sat, 9 Dec 2023 14:51:40 -0700 Subject: [PATCH 2/2] custom changes --- build.sh | 15 +++++++++++++++ package.json | 2 +- setup.py | 2 +- src/parallel/parallel.tsx | 6 +++--- 4 files changed, 20 insertions(+), 5 deletions(-) create mode 100755 build.sh diff --git a/build.sh b/build.sh new file mode 100755 index 00000000..ab8f668d --- /dev/null +++ b/build.sh @@ -0,0 +1,15 @@ +rm -rf hiplot/static/built/* +rm -rf dist && mkdir dist pypi-build +mkdir -p npm-build/dist npm-build/dist-dev dist +cp .circleci/hotfixes/internmap.js node_modules/internmap/src/index.js +npm run build-dev +mv dist/* npm-build/dist-dev/ +npm run build +npm run prepublish +mv dist/* npm-build/dist/ && mkdir -p hiplot/static/built/ && cp npm-build/dist/hiplot.bundle.js hiplot/static/built/ + +mkdir -p npm-package/hiplot + +cp -r package.json tsconfig.json webpack.config.js README.md LICENSE src npm-build/dist npm-package/hiplot +rm -rf npm-package/hiplot/dist/hiplot-* # Leftover from setup.py +python setup.py sdist bdist_wheel diff --git a/package.json b/package.json index c150dccb..ebbb8359 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hiplot", - "version": "0.0.1", + "version": "0.0.2", "description": "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.", "main": "dist/hiplot.lib.js", "types": "dist/hiplot.d.ts", diff --git a/setup.py b/setup.py index fbff69c7..ef4c7623 100644 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ def readme() -> str: setup( name="hiplot-mm", - version="0.0.1rc1", + version="0.0.2", description="High dimensional Interactive Plotting tool", long_description=readme(), long_description_content_type="text/markdown", diff --git a/src/parallel/parallel.tsx b/src/parallel/parallel.tsx index 5f8d6b51..d4ba5f2f 100644 --- a/src/parallel/parallel.tsx +++ b/src/parallel/parallel.tsx @@ -65,7 +65,7 @@ export interface ParallelPlotDisplayData { export interface ParallelPlotData extends HiPlotPluginData, ParallelPlotDisplayData { }; -const TOP_MARGIN_PIXELS = 80; +const TOP_MARGIN_PIXELS = 100; export class ParallelPlot extends React.Component { on_resize: () => void = null; m = [ @@ -267,8 +267,8 @@ export class ParallelPlot extends React.Component e == a); - const pdb = this.state.order.findIndex((e) => e == b); + const pda = this.state.order.findIndex((e) => e == b); + const pdb = this.state.order.findIndex((e) => e == a); return (pdb == -1 ? this.state.order.length : pdb) - (pda == -1 ? this.state.order.length : pda); }.bind(this)); this.setState({