Skip to content

Commit 2b3a9b3

Browse files
dsmmckenDon McKenzie
andauthored
feat: Add marketplace listing for plugins for website (#1369)
Adds marketplace.json which is the source of truth for deephaven.io/plugins to feature offical and community created plugins. Synced via s3. --------- Co-authored-by: Don McKenzie <donmckenzie@illumon.com>
1 parent 3ac48fb commit 2b3a9b3

17 files changed

Lines changed: 718 additions & 120 deletions

.github/workflows/marketplace.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Validates the plugin marketplace on every PR that touches it, and syncs
2+
# marketplace/ to S3 via salmon on merge to main.
3+
name: Marketplace
4+
5+
on:
6+
pull_request:
7+
branches:
8+
- main
9+
paths:
10+
- 'marketplace/**'
11+
- 'tools/validate-marketplace.mjs'
12+
- '.github/workflows/marketplace.yml'
13+
push:
14+
branches:
15+
- main
16+
paths:
17+
- 'marketplace/**'
18+
- 'tools/validate-marketplace.mjs'
19+
- '.github/workflows/marketplace.yml'
20+
21+
jobs:
22+
# Schema + link validation for marketplace.json.
23+
marketplace-validate:
24+
runs-on: ubuntu-24.04
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
29+
- name: Setup Node
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version-file: .nvmrc
33+
cache: npm
34+
35+
- name: Install dependencies
36+
run: npm ci --ignore-scripts
37+
38+
- name: Validate marketplace.json
39+
run: npm run validate-marketplace
40+
41+
# Publish to S3 only after a marketplace change lands on main.
42+
marketplace-sync:
43+
needs: marketplace-validate
44+
if: github.event_name == 'push'
45+
runs-on: ubuntu-24.04
46+
permissions:
47+
id-token: write # Auth to AWS with OIDC
48+
contents: read
49+
steps:
50+
- name: Checkout
51+
uses: actions/checkout@v4
52+
53+
- name: Sync marketplace to S3
54+
uses: deephaven/salmon-sync@v1
55+
with:
56+
source: marketplace/
57+
destination: deephaven/deephaven-plugins/marketplace/
58+
production: true
59+
temporary: false
60+
aws-role: ${{ vars.DOCS_AWS_ROLE }}

marketplace/README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Plugin marketplace
2+
3+
`marketplace.json` is the source of truth for the plugin directory shown at [deephaven.io/plugins](https://deephaven.io/plugins). On merge to `main` this folder is synced to S3 and the website reads it from there, so a merged PR is all it takes to list, update, or remove a plugin.
4+
5+
## Add your plugin
6+
7+
1. Add an entry to the `plugins` array in [`marketplace.json`](./marketplace.json). The fields are documented in [`marketplace.schema.json`](./marketplace.schema.json); editors that understand `$schema` will autocomplete and validate as you type. The required fields are `name`, `description`, `author`, `repo`, and `image`:
8+
9+
```json
10+
{
11+
"name": "My Plugin",
12+
"description": "One sentence describing what it does, shown on the card.",
13+
"author": "your-github-handle",
14+
"repo": "https://github.com/your-github-handle/your-plugin",
15+
"image": "/marketplace/images/my-plugin.png",
16+
"registry": {
17+
"kind": "pypi",
18+
"package": "deephaven-plugin-my-plugin",
19+
"url": "https://pypi.org/project/deephaven-plugin-my-plugin/"
20+
},
21+
"tags": ["python"]
22+
}
23+
```
24+
25+
2. Add a card image to [`images/`](./images) and reference it as `/marketplace/images/<file>.png`. It must be a PNG committed to that folder (external URLs are not allowed); keep it under 300 KB and roughly 16:9 (600×338 works well).
26+
27+
3. Validate locally, then open a PR:
28+
29+
```sh
30+
npm run validate-marketplace
31+
```
32+
33+
CI runs the same check on every PR that touches this folder and blocks merge until it passes. Use `npm run validate-marketplace -- --skip-links` to skip the (slower) external link checks while iterating.
34+
35+
## What the validator enforces
36+
37+
Beyond the JSON schema, [`tools/validate-marketplace.mjs`](../tools/validate-marketplace.mjs) checks that:
38+
39+
- plugin names are unique,
40+
- the `repo` owner matches the `author` (the author drives the official badge),
41+
- the `official` tag and `preInstalled` flag are reserved for Deephaven-owned plugins,
42+
- each plugin's `image` is a PNG that exists directly in `images/` and is under 300 KB,
43+
- no image in `images/` is orphaned (unreferenced by any plugin), and
44+
- every link resolves: `repo`, `href`, `registry.url`, and the author's GitHub profile.
45+
46+
## Reserved fields
47+
48+
`author: "deephaven"` plugins get the official badge automatically, and only they may set `preInstalled: true`. Don't add the `official` tag by hand; it is derived from the author.

marketplace/images/ag-grid.png

37.2 KB
Loading
11.6 KB
Loading

marketplace/images/matplotlib.png

41.2 KB
Loading

marketplace/images/microphone.png

43.9 KB
Loading

marketplace/images/notebook.png

13.1 KB
Loading
13.8 KB
Loading
33.1 KB
Loading

marketplace/images/theme-pack.png

172 KB
Loading

0 commit comments

Comments
 (0)