-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invoke typedoc to produce browsable JS API documentation #4757
Changes from all commits
abe8aad
bc8e69f
bf31ca7
2fdaa79
0b22425
365ae3b
6a77af2
7167461
d730039
219a667
1f17332
04c6841
0bccc97
26071d9
5e4c15e
c75f2d2
f0b47fd
091a8cf
665db2d
0950b0f
4ffdacd
76607ff
7b3c709
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,6 +65,57 @@ jobs: | |
remote_user: ${{ secrets.DOCS_USER }} | ||
remote_key: ${{ secrets.DEEPHAVEN_CORE_SSH_KEY }} | ||
|
||
typedoc: | ||
runs-on: ubuntu-22.04 | ||
concurrency: | ||
group: typedoc-${{ github.workflow }}-${{ github.ref }} | ||
# We don't want to cancel in-progress jobs against main because that might leave the upload in a bad state. | ||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup JDK 11 | ||
id: setup-java-11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '11' | ||
|
||
- name: Setup JDK 17 | ||
id: setup-java-17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
|
||
- name: Set JAVA_HOME | ||
run: echo "JAVA_HOME=${{ steps.setup-java-11.outputs.path }}" >> $GITHUB_ENV | ||
|
||
- name: Run typedoc on JS API | ||
uses: burrunan/gradle-cache-action@v1 | ||
with: | ||
job-id: typedoc | ||
arguments: --scan :web-client-api:types:typedoc | ||
gradle-version: wrapper | ||
- name: Upload JavaScript/TypeScript docs | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: typedoc | ||
path: 'web/client-api/types/build/documentation/' | ||
- name: Deploy JavaScript/TypeScript docs | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
uses: burnett01/[email protected] | ||
with: | ||
switches: -avzr --delete | ||
path: web/client-api/docs/build/documentation/ | ||
remote_path: deephaven-core/client-api/javascript/ | ||
remote_host: ${{ secrets.DOCS_HOST }} | ||
remote_port: ${{ secrets.DOCS_PORT }} | ||
remote_user: ${{ secrets.DOCS_USER }} | ||
remote_key: ${{ secrets.DEEPHAVEN_CORE_SSH_KEY }} | ||
|
||
pydoc: | ||
runs-on: ubuntu-22.04 | ||
concurrency: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
plugins { | ||
id 'com.bmuschko.docker-remote-api' | ||
id 'io.deephaven.project.register' | ||
} | ||
|
||
configurations { | ||
dts | ||
} | ||
dependencies { | ||
dts project(path: ':web-client-api', configuration: 'dts') | ||
} | ||
|
||
Docker.registerDockerTask(project, 'typedoc') { | ||
copyIn { | ||
from(configurations.dts) { | ||
into 'dist' | ||
} | ||
from 'tsconfig.json' | ||
from 'package.json' | ||
from 'package-lock.json' | ||
|
||
from('src/main/docker') { | ||
include 'theme.css' | ||
} | ||
} | ||
dockerfile { | ||
// share the common base image to keep it simple | ||
from 'deephaven/node:local-build' | ||
|
||
copyFile('.', '/project') | ||
|
||
runCommand('''set -eux; \\ | ||
cd /project/; \\ | ||
mv dist/types.d.ts dist/index.d.ts; \\ | ||
npm ci; \\ | ||
npm pack; \\ | ||
mkdir /out; \\ | ||
mv deephaven-jsapi-types*.tgz /out/; \\ | ||
node_modules/.bin/typedoc dist/index.d.ts \\ | ||
--out /out/documentation \\ | ||
--skipErrorChecking \\ | ||
--hideGenerator \\ | ||
--disableSources \\ | ||
--customCss theme.css; \\ | ||
''') | ||
} | ||
parentContainers = [ Docker.registryTask(project, 'node') ] // deephaven/node | ||
containerOutPath = '/out' | ||
copyOut { | ||
into "$buildDir/" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
io.deephaven.project.ProjectType=BASIC |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"name": "@deephaven/jsapi-types", | ||
"version": "1.0.0-dev1", | ||
"description": "Deephaven JSAPI Types", | ||
"author": "Deephaven Data Labs LLC", | ||
"license": "Apache-2.0", | ||
"type": "module", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/deephaven/deephaven-core.git", | ||
"directory": "web/client-api/types" | ||
}, | ||
"engines": { | ||
"node": ">=16" | ||
}, | ||
"devDependencies": { | ||
"typedoc": "^0.24.8", | ||
"typescript": "^5.1.6" | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"sideEffects": false, | ||
"publishConfig": { | ||
"access": "public" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
:root { | ||
--dark-color-background: #040427; | ||
--dark-color-background-secondary: #0d1b37; | ||
--dark-color-background-warning: #fffbef; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where are these colours coming from? This one in particular I can't see referenced anywhere else in the code base. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. deephaven.io colors. |
||
--dark-color-warning-text: #463b19; | ||
--dark-color-accent: #24405a; | ||
--dark-color-active-menu-item: #2f546c; | ||
--dark-color-text: #f0f9fb; | ||
--dark-color-text-aside: #d3d3d3; | ||
--dark-color-link: #65c6da; | ||
--dark-color-ts-project: #b7a9f6; | ||
--dark-color-ts-enum: #f4d93e; | ||
--dark-color-ts-variable: #b2e3ed; | ||
--dark-color-ts-function: #d5cdfa; | ||
--dark-color-ts-class: #93d7e5; | ||
--dark-color-ts-interface: #afd685; | ||
--dark-color-ts-type-alias: #f27596; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"files": ["dist/index.d.ts"], | ||
"compilerOptions": { | ||
"target": "es5", | ||
"lib": ["es5","es2015", "DOM"] | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if remote path needs to exist before this job is run, just FYI. Obv sync expectations w/ deephaven.io.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not following - how could this be omitted, where would the CI job rsync the data to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry - didn't mean to imply you don't need to set
remote_path
. I'm not sure if the physical "remote path" needs to exist or not before this job will succeed. Just commenting on the fact that there is some coordination w/ deephaven.io that will be necessary.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, will verify with docs team.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have a ticket for this in the docs repo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Running it creates the folder, nothing needs to be done. You should create a ticket to add a link in the sidebar back to this though once it merges though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will do that in a few minutes after seeing if I broke main...