Skip to content

Commit d40abeb

Browse files
committed
Merge branch 'main' into yogesh-41-skeleton
# Conflicts: # chartlets.py/CHANGES.md
2 parents 24deaa8 + e18dc5c commit d40abeb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1756
-236
lines changed

.github/workflows/backend-ci.yml

Lines changed: 42 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,46 @@ on:
1111
- chartlets.py/**
1212

1313
jobs:
14-
backend:
15-
runs-on: ubuntu-latest
16-
steps:
17-
- name: git-checkout chartlets
18-
uses: actions/checkout@v4
19-
20-
- name: Set up Micromamba
21-
uses: mamba-org/setup-micromamba@v1
22-
with:
23-
environment-file: chartlets.py/environment.yml
24-
25-
- name: Run unit tests
26-
shell: bash -l {0}
27-
run: |
28-
cd chartlets.py
29-
pytest --cov=chartlets --cov-report=xml
14+
python-tests:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
python-version: ["3.10", "3.11", "3.12", "3.13"]
20+
defaults:
21+
run:
22+
working-directory: chartlets.py
3023

31-
- name: Upload coverage reports to Codecov
32-
uses: codecov/codecov-action@v4
33-
with:
34-
fail_ci_if_error: true
35-
directory: chartlets.py/
36-
flags: backend
37-
verbose: true
38-
token: ${{ secrets.CODECOV_TOKEN }}
24+
steps:
25+
- uses: actions/checkout@v3
26+
27+
- name: Set up Python ${{ matrix.python-version }}
28+
uses: actions/setup-python@v3
29+
with:
30+
python-version: ${{ matrix.python-version }}
31+
32+
- name: Install dependencies
33+
run: |
34+
python -m pip install --upgrade pip
35+
pip install .[dev,demo]
36+
37+
- name: Lint with flake8
38+
run: |
39+
# stop the build if there are Python syntax errors or undefined names
40+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
41+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
42+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
43+
44+
- name: Run unit tests
45+
shell: bash -l {0}
46+
run: |
47+
pytest --cov=chartlets --cov-report=xml
48+
49+
- name: Upload coverage reports to Codecov
50+
uses: codecov/codecov-action@v4
51+
with:
52+
fail_ci_if_error: true
53+
directory: chartlets.py/
54+
flags: backend
55+
verbose: true
56+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/frontend-ci.yml

Lines changed: 77 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -10,58 +10,80 @@ on:
1010
paths:
1111
- chartlets.js/**
1212

13-
jobs:
14-
frontend:
15-
runs-on: ubuntu-latest
16-
steps:
17-
- name: git-checkout chartlets
18-
uses: actions/checkout@v4
19-
20-
- name: Set up Node.js
21-
uses: actions/setup-node@v4
22-
with:
23-
node-version: '18.x'
24-
25-
- name: Install common dependencies
26-
run: |
27-
cd chartlets.js
28-
npm install
29-
30-
- name: Lib lint
31-
run: |
32-
cd chartlets.js/packages/lib
33-
npm run lint
34-
35-
- name: Lib tests
36-
run: |
37-
cd chartlets.js/packages/lib
38-
npm run test
39-
40-
- name: Lib coverage
41-
run: |
42-
cd chartlets.js/packages/lib
43-
npm run coverage
44-
45-
- name: Upload coverage reports for lib to Codecov
46-
uses: codecov/codecov-action@v4
47-
with:
48-
fail_ci_if_error: true
49-
directory: chartlets.js/packages/lib/coverage/
50-
flags: frontend
51-
verbose: true
52-
token: ${{ secrets.CODECOV_TOKEN }}
53-
54-
- name: Lib build
55-
run: |
56-
cd chartlets.js/packages/lib
57-
npm run build
58-
59-
- name: Demo lint
60-
run: |
61-
cd chartlets.js/packages/demo
62-
npm run lint
63-
64-
- name: Demo build
65-
run: |
66-
cd chartlets.js/packages/demo
67-
npm run build
13+
jobs:
14+
npm-tests-lib:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
node-version: [18.x, 20.x]
19+
# See supported Node.js release schedule at
20+
# https://nodejs.org/en/about/releases/
21+
defaults:
22+
run:
23+
working-directory: chartlets.js/packages/lib
24+
25+
steps:
26+
- uses: actions/checkout@v3
27+
- name: Use Node.js ${{ matrix.node-version }}
28+
uses: actions/setup-node@v3
29+
with:
30+
node-version: ${{ matrix.node-version }}
31+
cache: 'npm'
32+
cache-dependency-path: chartlets.js/package-lock.json
33+
34+
- run: npm ci
35+
- run: npm run lint
36+
- run: npm run test
37+
38+
- run: npm run coverage
39+
- name: Upload coverage reports for lib to Codecov
40+
uses: codecov/codecov-action@v4
41+
with:
42+
fail_ci_if_error: true
43+
directory: chartlets.js/packages/lib/coverage/
44+
flags: frontend
45+
verbose: true
46+
token: ${{ secrets.CODECOV_TOKEN }}
47+
48+
- run: npm run build
49+
50+
npm-tests-demo:
51+
runs-on: ubuntu-latest
52+
steps:
53+
- name: git-checkout chartlets
54+
uses: actions/checkout@v4
55+
56+
- name: Set up Node.js
57+
uses: actions/setup-node@v4
58+
with:
59+
node-version: '20.x'
60+
61+
- name: Install common dependencies
62+
run: |
63+
cd chartlets.js
64+
npm install
65+
66+
- name: Lib lint
67+
run: |
68+
cd chartlets.js/packages/lib
69+
npm run lint
70+
71+
- name: Lib tests
72+
run: |
73+
cd chartlets.js/packages/lib
74+
npm run test
75+
76+
- name: Lib build
77+
run: |
78+
cd chartlets.js/packages/lib
79+
npm run build
80+
81+
- name: Demo lint
82+
run: |
83+
cd chartlets.js/packages/demo
84+
npm run lint
85+
86+
- name: Demo build
87+
run: |
88+
cd chartlets.js/packages/demo
89+
npm run build

.github/workflows/publish-backend.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
python-version: ["3.10", "3.11", "3.12"]
14+
python-version: ["3.10", "3.11", "3.12", "3.13"]
1515
defaults:
1616
run:
1717
working-directory: chartlets.py

.github/workflows/publish-frontend.yml

Lines changed: 45 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
node-version: [16.x, 18.x, 20.x]
13+
node-version: [18.x, 20.x]
1414
# See supported Node.js release schedule at
1515
# https://nodejs.org/en/about/releases/
1616
defaults:
@@ -35,7 +35,7 @@ jobs:
3535
uses: codecov/codecov-action@v4
3636
with:
3737
fail_ci_if_error: true
38-
directory: coverage/
38+
directory: chartlets.js/packages/lib/coverage/
3939
flags: frontend
4040
verbose: true
4141
token: ${{ secrets.CODECOV_TOKEN }}
@@ -44,35 +44,52 @@ jobs:
4444

4545
npm-tests-demo:
4646
runs-on: ubuntu-latest
47-
strategy:
48-
matrix:
49-
node-version: [16.x, 18.x, 20.x]
50-
# See supported Node.js release schedule at
51-
# https://nodejs.org/en/about/releases/
52-
defaults:
53-
run:
54-
working-directory: chartlets.js/packages/demo
55-
5647
steps:
57-
- uses: actions/checkout@v3
58-
- name: Use Node.js ${{ matrix.node-version }}
59-
uses: actions/setup-node@v3
48+
- name: git-checkout chartlets
49+
uses: actions/checkout@v4
50+
51+
- name: Set up Node.js
52+
uses: actions/setup-node@v4
6053
with:
61-
node-version: ${{ matrix.node-version }}
62-
cache: 'npm'
63-
cache-dependency-path: chartlets.js/package-lock.json
64-
65-
- run: npm ci
66-
- run: npm run lint
67-
- run: npm run build
54+
node-version: '20.x'
55+
56+
- name: Install common dependencies
57+
run: |
58+
cd chartlets.js
59+
npm install
60+
61+
- name: Lib lint
62+
run: |
63+
cd chartlets.js/packages/lib
64+
npm run lint
65+
66+
- name: Lib tests
67+
run: |
68+
cd chartlets.js/packages/lib
69+
npm run test
70+
71+
- name: Lib build
72+
run: |
73+
cd chartlets.js/packages/lib
74+
npm run build
75+
76+
- name: Demo lint
77+
run: |
78+
cd chartlets.js/packages/demo
79+
npm run lint
80+
81+
- name: Demo build
82+
run: |
83+
cd chartlets.js/packages/demo
84+
npm run build
6885
6986
npm-deploy:
7087
name: Publish TS-React Package to npmjs
7188
runs-on: ubuntu-latest
7289
needs: [npm-tests-lib, npm-tests-demo]
7390
defaults:
7491
run:
75-
working-directory: chartlets.js/packages/lib
92+
working-directory: chartlets.js
7693

7794
steps:
7895
- uses: actions/checkout@v4
@@ -85,8 +102,11 @@ jobs:
85102
cache: 'npm'
86103
cache-dependency-path: chartlets.js/package-lock.json
87104

88-
- run: npm ci
89-
- run: npm run build
90-
- run: npm publish --access public
105+
- name: Install dependencies, build, and publish (packages/lib)
106+
run: |
107+
cd packages/lib
108+
npm ci
109+
npm run build
110+
npm publish --access public
91111
env:
92112
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
[![CI](https://github.com/bcdev/chartlets/actions/workflows/frontend-ci.yml/badge.svg)](https://github.com/bcdev/chartlets/actions/workflows/frontend-ci.yml)
44
[![codecov](https://codecov.io/gh/bcdev/chartlets/graph/badge.svg?token=zJBPMFvnpg&flag=frontend)](https://codecov.io/gh/bcdev/chartlets)
5-
[![npm](https://badge.fury.io/js/chartlets.svg)](https://npmjs.org/package/chartlets)
5+
[![NPM Version](https://img.shields.io/npm/v/chartlets)](https://www.npmjs.com/package/chartlets)
66

77
[![CI](https://github.com/bcdev/chartlets/actions/workflows/backend-ci.yml/badge.svg)](https://github.com/bcdev/chartlets/actions/workflows/backend-ci.yml)
88
[![codecov](https://codecov.io/gh/bcdev/chartlets/graph/badge.svg?token=zJBPMFvnpg&flag=backend)](https://codecov.io/gh/bcdev/chartlets)
99
[![PyPI](https://img.shields.io/pypi/v/chartlets)](https://pypi.org/project/chartlets/)
10+
[![Anaconda-Server Badge](https://anaconda.org/conda-forge/chartlets/badges/version.svg)](https://anaconda.org/conda-forge/chartlets)
1011

1112
Chartlets is a software framework that allows websites developed with
1213
React to be extended by server-side UI contributions programmed in Python

chartlets.js/CHANGES.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,26 @@
1-
## Version 0.1.0 (in development)
1+
## Version 0.1.5 (in development)
2+
3+
* Add `multiple` property for `Select` component to enable the selection
4+
of multiple elements. The `default` mode is supported at the moment.
5+
6+
7+
## Version 0.1.4 (from 2025/03/06)
8+
9+
* In `chartlets.js` we no longer emit warnings and errors in common
10+
situations to avoid too much spam in the browser console.
11+
12+
* New (MUI) components
13+
- `DataGrid`
14+
- `Dialog`
15+
- `Table`
16+
17+
## Version 0.1.3 (from 2025/01/28)
18+
19+
* **Chore:** Version bump to align CI process with GitHub release flow.
20+
No functional changes. This release ensures proper triggering of the CI
21+
pipeline for publishing and NPM.
22+
23+
## Version 0.1.0 (from 2025/01/14)
224

325
* Reorganised Chartlets project to better separate demo from library code.
426
Using monorepo layout for `chartlets.js` with workspaces `lib` and `demo`
@@ -38,6 +60,7 @@
3860
- using `return` object with `schema` property for callback return values
3961

4062
* New (MUI) components
63+
- `Divider`
4164
- `LinearProgress`
4265
- `RadioGroup` and `Radio`
4366
- `Switch`

chartlets.js/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![CI](https://github.com/bcdev/chartlets/actions/workflows/frontend-ci.yml/badge.svg)](https://github.com/bcdev/chartlets/actions/workflows/frontend-ci.yml)
44
[![codecov](https://codecov.io/gh/bcdev/chartlets/graph/badge.svg?token=zJBPMFvnpg&flag=frontend)](https://codecov.io/gh/bcdev/chartlets)
5-
[![npm](https://badge.fury.io/js/chartlets.svg)](https://npmjs.org/package/chartlets)
5+
[![NPM Version](https://img.shields.io/npm/v/chartlets)](https://www.npmjs.com/package/chartlets)
66
![](https://img.shields.io/badge/Linting-TypeScript%20%26%20Prettier-blue?logo=typescript&logoColor=white)
77

88
Chartlets is a software framework that allows websites developed with

0 commit comments

Comments
 (0)