Skip to content

Commit

Permalink
trying the build script first (#273)
Browse files Browse the repository at this point in the history
* build works with jlab 4.0, wheel installs for jlab 3.6.5 YAY
* building with yarn instead of npm
  • Loading branch information
paddymul authored Apr 13, 2024
1 parent 0e51855 commit 3d3f788
Show file tree
Hide file tree
Showing 7 changed files with 3,552 additions and 3,735 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ jobs:
matrix:
#os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest]
python-version: ["3.8"]
python-version: ["3.9"]
steps:
- name: Checkout
uses: actions/checkout@v2

uses: actions/checkout@v4
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: "18.x"
node-version: "20.x"
cache: yarn

- name: Install dependencies
run: |
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
python -m build .
- name: Upload builds
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: buckaroo-dist-${{ github.run_number }}
path: |
Expand All @@ -69,15 +69,15 @@ jobs:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v3
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: buckaroo-dist-${{ github.run_number }}

- name: Install Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.9

- name: Setup buckaroo ui test
run: pip install `echo dist/*.whl`[ui-test] -r requirements-ui-test.txt
Expand All @@ -90,7 +90,7 @@ jobs:

- name: Upload Test artifacts
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: buckaroo-test-results-${{ github.run_number }}
path: test-results
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ git clone https://github.com/paddymul/buckaroo.git
cd buckaroo
#we need to build against 3.6.5, jupyterlab 4.0 has different JS typing that conflicts
# the installable still works in JL4
pip install build twine pytest sphinx polars mypy jupyterlab==3.6.5 pandas-stubs
pip install build twine pytest sphinx polars mypy jupyterlab==3.6.5 pandas-stubs geopolars pyarrow
pip install -ve .
```

Expand Down
159 changes: 0 additions & 159 deletions docs/source/_static/embed-bundle.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,164 +1,5 @@
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/

/*! Conditions:: INITIAL */

/*! Production:: css_value : ANGLE */

/*! Production:: css_value : CHS */

/*! Production:: css_value : EMS */

/*! Production:: css_value : EXS */

/*! Production:: css_value : FREQ */

/*! Production:: css_value : LENGTH */

/*! Production:: css_value : PERCENTAGE */

/*! Production:: css_value : REMS */

/*! Production:: css_value : RES */

/*! Production:: css_value : SUB css_value */

/*! Production:: css_value : TIME */

/*! Production:: css_value : VHS */

/*! Production:: css_value : VMAXS */

/*! Production:: css_value : VMINS */

/*! Production:: css_value : VWS */

/*! Production:: css_variable : CSS_VAR LPAREN CSS_CPROP COMMA math_expression RPAREN */

/*! Production:: css_variable : CSS_VAR LPAREN CSS_CPROP RPAREN */

/*! Production:: expression : math_expression EOF */

/*! Production:: math_expression : LPAREN math_expression RPAREN */

/*! Production:: math_expression : NESTED_CALC LPAREN math_expression RPAREN */

/*! Production:: math_expression : SUB PREFIX SUB NESTED_CALC LPAREN math_expression RPAREN */

/*! Production:: math_expression : css_value */

/*! Production:: math_expression : css_variable */

/*! Production:: math_expression : math_expression ADD math_expression */

/*! Production:: math_expression : math_expression DIV math_expression */

/*! Production:: math_expression : math_expression MUL math_expression */

/*! Production:: math_expression : math_expression SUB math_expression */

/*! Production:: math_expression : value */

/*! Production:: value : NUMBER */

/*! Production:: value : SUB NUMBER */

/*! Rule:: $ */

/*! Rule:: (--[0-9a-z-A-Z-]*) */

/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)% */

/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)Hz\b */

/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)\b */

/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)ch\b */

/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)cm\b */

/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)deg\b */

/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)dpcm\b */

/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)dpi\b */

/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)dppx\b */

/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)em\b */

/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)ex\b */

/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)grad\b */

/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)in\b */

/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)kHz\b */

/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)mm\b */

/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)ms\b */

/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)pc\b */

/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)pt\b */

/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)px\b */

/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)rad\b */

/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)rem\b */

/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)s\b */

/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)turn\b */

/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)vh\b */

/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)vmax\b */

/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)vmin\b */

/*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)vw\b */

/*! Rule:: ([a-z]+) */

/*! Rule:: (calc) */

/*! Rule:: (var) */

/*! Rule:: , */

/*! Rule:: - */

/*! Rule:: \( */

/*! Rule:: \) */

/*! Rule:: \* */

/*! Rule:: \+ */

/*! Rule:: \/ */

/*! decimal.js-light v2.5.1 https://github.com/MikeMcl/decimal.js-light/LICENCE */

/**
* @ag-grid-community/all-modules - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v31.0.3
* @link https://www.ag-grid.com/
* @license MIT
*/

/**
* @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
* @version v31.0.3
* @link https://www.ag-grid.com/
* @license MIT
*/

/**
* @license
* Lodash <https://lodash.com/>
Expand Down
27 changes: 16 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,24 @@
"url": "https://github.com/paddymul/buckaroo"
},
"scripts": {
"build": "npm run build:lib && npm run build:nbextension && npm run build:labextension",
"build-full": "npm run build:lib && run build:nbextension && npm run build:labextension",
"build:dev": "npm run build:lib && npm run build:nbextension && npm run build:labextension:dev",
"build": "yarn run build:lib && yarn run build:nbextension && yarn run build:labextension",
"build-full": "yarn run build:lib && run build:nbextension && yarn run build:labextension",
"build:dev": "yarn run build:lib && yarn run build:nbextension && yarn run build:labextension:dev",
"build:labextension": "jupyter labextension build .",
"build:labextension:dev": "which jupyter && jupyter labextension build --development True .",
"build:lib": "tsc",
"build:nbextension": "webpack --mode=production --no-devtool",
"build:widget-examples": "cd widget-examples/basic && webpack --mode=production",
"build:examples": "webpack --mode=production --config docs/webpack.typescript.localdev.ts --env production",
"build:all": "npm run build:labextension && npm run build:nbextension && npm run build:widget-examples",
"clean": "rimraf dist && npm run clean:lib && npm run clean:labextension && npm run clean:nbextension",
"build:all": "yarn run build:labextension && yarn run build:nbextension && yarn run build:widget-examples",
"clean": "rimraf dist && yarn run clean:lib && yarn run clean:labextension && yarn run clean:nbextension",
"clean:lib": "rimraf lib",
"clean:labextension": "rimraf buckaroo/labextension",
"clean:nbextension": "rimraf buckaroo/nbextension/index.*",
"lint": "eslint 'js/**/*.{ts,tsx}'",
"lint:check": "eslint 'js/**/*.{ts,tsx}'",
"lint:fix": "eslint 'js/**/*.{ts,tsx}' --fix",
"prepack": "npm run build:labextension && npm run build:nbextension",
"prepack": "yarn run build:labextension && yarn run build:nbextension",
"test": "jest --verbose --passWithNoTests",
"watch": "npm-run-all -p watch:*",
"watch:lib": "tsc -w",
Expand All @@ -59,8 +59,13 @@
"dev": "webpack-cli serve --config docs/webpack.typescript.localdev.ts --mode=development --env development --open"
},
"dependencies": {
"@jupyter-widgets/base": "^2 || ^3 || ^4 || ^6.0.0",
"@jupyterlab/apputils": "^3.0.2",
"@jupyter-widgets/base": "6.0.6",
"@jupyterlab/apputils": "^3 || ^4",
"@lumino/application": "^1 || ^2",
"@lumino/coreutils": "2.1.2",
"@lumino/widgets": "2.3.2",
"@types/backbone": "^1.4.19",
"@types/lodash": "^4.17.0",
"ag-grid-community": "^31.0.3",
"ag-grid-react": "^31.0.3",
"lodash": "^4.17.21",
Expand All @@ -74,7 +79,7 @@
"@babel/core": "^7.6.3",
"@babel/preset-env": "^7.6.11",
"@babel/preset-typescript": "7.16.7",
"@jupyterlab/builder": "^3.0.1",
"@jupyterlab/builder": "^4.0.5",
"@types/jest": "^28",
"@types/node": "^10.11.6",
"@types/react": "^18.0.0",
Expand All @@ -93,8 +98,8 @@
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"fs-extra": "^7.0.0",
"fork-ts-checker-webpack-plugin": "^6.1.0",
"fs-extra": "^7.0.0",
"html-loader": "^2.1.2",
"html-webpack-plugin": "^5.0.0",
"jest": "^28",
Expand All @@ -110,9 +115,9 @@
"prettier-standalone": "^1.3.1-0",
"prism-themes": "^1.6.0",
"prismjs": "^1.28.0",
"react-bootstrap": "^2.0.0",
"react-router": "^6.3.0",
"react-router-dom": "^5.2.0",
"react-bootstrap": "^2.0.0",
"rimraf": "^3.0.2",
"sass": "^1.53.0",
"sass-loader": "^13.0.2",
Expand Down
8 changes: 3 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[build-system]
requires = [
"hatchling",
"jupyterlab~=3.0",
"jupyterlab~=4.0",
]
build-backend = "hatchling.build"

[project]
name = "buckaroo"
description = "Buckaroo - GUI Data wrangling for pandas"
readme = "README.md"
requires-python = ">=3.7"
requires-python = ">=3.9"
authors = [
{ name = "Paddy Mullen" },
]
Expand All @@ -27,8 +27,6 @@ classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
]
Expand Down Expand Up @@ -119,7 +117,7 @@ build-function = "hatch_jupyter_builder.npm_builder"
path = "."
build_cmd = "build"
npm = [
"npm",
"yarn",
]

[tool.isort]
Expand Down
12 changes: 9 additions & 3 deletions tests/unit/polars_basic_widget_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ class SelectOnlyAnalysis(PolarsAnalysis):


def test_polars_all_stats():
"""the all_stats verify that PolarsBuckarooWidget produces the
"""
FIXME temporarily disabled to test other build stuff
the all_stats verify that PolarsBuckarooWidget produces the
same summary_stats shape tatha pandas does.
Since polars doesn't have an index concept, some things are a little different, but the summary_stats display essentiall depends on the index being present and displayed
Expand All @@ -56,13 +58,17 @@ class SimplePolarsBuckaroo(PolarsBuckarooWidget):
assert spbw.merged_sd == expected

assert spbw.df_data_dict['all_stats'] == [
{'index': 'mean', 'normal_int_series': 2.5},
{'index': 'null_count', 'normal_int_series': 0.0},
{'index': 'mean', 'normal_int_series': 2.5},
{'index': 'quin99', 'normal_int_series': 4.0}]
assert spbw.df_display_args['main']['df_viewer_config'] == EXPECTED_DF_VIEWER_CONFIG



def test_pandas_all_stats():
"""just make sure this doesn't fail"""
"""
just make sure this doesn't fail"""
from buckaroo.buckaroo_widget import BuckarooWidget
from buckaroo.pluggable_analysis_framework.pluggable_analysis_framework import (ColAnalysis)
import pandas as pd
Expand Down
Loading

0 comments on commit 3d3f788

Please sign in to comment.