Skip to content

Commit 3b159f3

Browse files
authored
move the app to apps/cli/ (#38)
* move the app to apps/cli/ * fix ci * fix CI * try to fix the CI
1 parent 02d9477 commit 3b159f3

27 files changed

+160
-120
lines changed
Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1-
name: CI
1+
name: CI in the cli app
22
on:
33
push:
4+
paths:
5+
- 'packages/components/**'
6+
- 'apps/cli/**'
7+
- '.github/workflows/ci_cli.yml'
8+
9+
defaults:
10+
run:
11+
working-directory: ./apps/cli
412

513
jobs:
614
lint:
@@ -12,12 +20,16 @@ jobs:
1220

1321
typecheck:
1422
runs-on: ubuntu-latest
23+
defaults:
24+
run:
25+
working-directory: ./
1526
steps:
1627
- uses: actions/checkout@v4
1728
- run: npm i
1829
- run: npm run build
1930
working-directory: ./packages/components
2031
- run: tsc
32+
working-directory: ./apps/cli
2133

2234
test:
2335
runs-on: ubuntu-latest
@@ -28,9 +40,13 @@ jobs:
2840

2941
buildcheck:
3042
runs-on: ubuntu-latest
43+
defaults:
44+
run:
45+
working-directory: ./
3146
steps:
3247
- uses: actions/checkout@v4
3348
- run: npm i
3449
- run: npm run build
3550
working-directory: ./packages/components
3651
- run: npm run build
52+
working-directory: ./apps/cli

README.md

Lines changed: 6 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,10 @@
1-
# hyperparam
1+
# Hyperparam monorepo
22

3-
[![npm](https://img.shields.io/npm/v/hyperparam)](https://www.npmjs.com/package/hyperparam)
4-
[![workflow status](https://github.com/hyparam/hyperparam-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/hyparam/hyperparam-cli/actions)
5-
[![mit license](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
6-
![coverage](https://img.shields.io/badge/Coverage-35-darkred)
3+
This is a monorepo for the Hyperparam project.
74

8-
This is the hyperparam cli tool.
5+
It contains the following package:
6+
- [`@hyparam/components`](./packages/components): a library of React components for building Hyperparam UIs.
97

10-
The hyperparam cli tool is for viewing arbitrarily large datasets in the browser.
8+
It also contains the following application:
9+
- [`hyperparam`](./apps/cli): a cli tool for viewing arbitrarily large datasets in the browser.
1110

12-
## Viewer
13-
14-
To open a file browser in your current local directory run:
15-
16-
```sh
17-
npx hyperparam
18-
```
19-
20-
You can also pass a specific file, folder, or url:
21-
22-
```sh
23-
npx hyperparam example.parquet
24-
npx hyperparam directory/
25-
npx hyperparam https://hyperparam-public.s3.amazonaws.com/bunnies.parquet
26-
```
27-
28-
## Chat
29-
30-
To start a chat with hyperparam:
31-
32-
```sh
33-
npx hyperparam chat
34-
```
35-
36-
## Installation
37-
38-
Install for all users:
39-
40-
```sh
41-
sudo npm i -g hyperparam
42-
```
43-
44-
Now you can just run:
45-
46-
```sh
47-
hyperparam
48-
```
49-
50-
or:
51-
52-
```sh
53-
hyp
54-
```
55-
56-
## Developers
57-
58-
To develop the CLI locally:
59-
60-
```sh
61-
npm i
62-
npm run build
63-
npm run serve
64-
```
65-
66-
When you make changes, make sure to rebuild:
67-
68-
```sh
69-
npm run build
70-
```
71-
72-
Then refresh the browser.

apps/cli/LICENSE

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
The MIT License (MIT)
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

apps/cli/README.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# hyperparam
2+
3+
[![npm](https://img.shields.io/npm/v/hyperparam)](https://www.npmjs.com/package/hyperparam)
4+
[![workflow status](https://github.com/hyparam/hyperparam-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/hyparam/hyperparam-cli/actions)
5+
[![mit license](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
6+
![coverage](https://img.shields.io/badge/Coverage-35-darkred)
7+
8+
This is the hyperparam cli tool.
9+
10+
The hyperparam cli tool is for viewing arbitrarily large datasets in the browser.
11+
12+
## Viewer
13+
14+
To open a file browser in your current local directory run:
15+
16+
```sh
17+
npx hyperparam
18+
```
19+
20+
You can also pass a specific file, folder, or url:
21+
22+
```sh
23+
npx hyperparam example.parquet
24+
npx hyperparam directory/
25+
npx hyperparam https://hyperparam-public.s3.amazonaws.com/bunnies.parquet
26+
```
27+
28+
## Chat
29+
30+
To start a chat with hyperparam:
31+
32+
```sh
33+
npx hyperparam chat
34+
```
35+
36+
## Installation
37+
38+
Install for all users:
39+
40+
```sh
41+
sudo npm i -g hyperparam
42+
```
43+
44+
Now you can just run:
45+
46+
```sh
47+
hyperparam
48+
```
49+
50+
or:
51+
52+
```sh
53+
hyp
54+
```
55+
56+
## Developers
57+
58+
To develop the CLI locally:
59+
60+
```sh
61+
npm i
62+
npm run build
63+
npm run serve
64+
```
65+
66+
When you make changes, make sure to rebuild:
67+
68+
```sh
69+
npm run build
70+
```
71+
72+
Then refresh the browser.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import typescript from 'typescript-eslint'
44

55
export default [
66
{
7-
ignores: ['public/build/', 'packages/', 'coverage/'],
7+
ignores: ['public/build/', 'coverage/'],
88
},
99
{
1010
plugins: {

apps/cli/package.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"name": "hyperparam",
3+
"version": "0.1.18",
4+
"description": "Hyperparam CLI",
5+
"license": "MIT",
6+
"main": "src/cli.js",
7+
"type": "module",
8+
"bin": {
9+
"hyp": "src/cli.js",
10+
"hyperparam": "src/cli.js"
11+
},
12+
"files": [
13+
"public",
14+
"src"
15+
],
16+
"scripts": {
17+
"build": "rollup -c",
18+
"coverage": "vitest run --coverage --coverage.include=src",
19+
"lint": "eslint",
20+
"serve": "node src/cli.js",
21+
"url": "node src/cli.js https://hyperparam.blob.core.windows.net/hyperparam/starcoderdata-js-00000-of-00065.parquet",
22+
"test": "vitest run --dir test"
23+
},
24+
"dependencies": {
25+
"highlight.js": "11.10.0",
26+
"@hyparam/components": "file:../../packages/components"
27+
},
28+
"devDependencies": {
29+
"@rollup/plugin-commonjs": "28.0.1",
30+
"@rollup/plugin-node-resolve": "15.3.0",
31+
"@rollup/plugin-replace": "6.0.1",
32+
"@rollup/plugin-terser": "0.4.4",
33+
"@rollup/plugin-typescript": "12.1.1",
34+
"@testing-library/react": "16.0.1",
35+
"@types/node": "22.8.4",
36+
"@types/react": "18.3.12",
37+
"@types/react-dom": "18.3.1",
38+
"@vitejs/plugin-react": "4.3.3",
39+
"@vitest/coverage-v8": "2.1.4",
40+
"eslint": "9.13.0",
41+
"globals": "15.11.0",
42+
"jsdom": "25.0.1",
43+
"react": "18.3.1",
44+
"react-dom": "18.3.1",
45+
"rollup": "4.24.3",
46+
"rollup-plugin-postcss": "4.0.2",
47+
"tslib": "2.8.0",
48+
"typescript": "5.6.3",
49+
"typescript-eslint": "8.12.2",
50+
"vitest": "2.1.4"
51+
}
52+
}

apps/cli/public/build/app.min.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)