mirror of
https://github.com/PhotonVision/photonvision
synced 2026-07-02 02:51:40 +00:00
Add offline docs and respective CI tasks (#19)
* Add gradle javadocs task * Add task for copying resources * Add docs tab * Add online docs * Add offline docs * Change gitignore * Remove web resources * Fix .gitignore * Fix lint error * Fix lint error * Add CI tasks for offline docs * Hoepfully fix CI * Hoepfully fix CI * Fix lint checker * Checking on CI * Fix CI fetch * Fix EOF and CI repo Co-authored-by: Vatan <vatan.tezer@polonom.com>
This commit is contained in:
committed by
GitHub
parent
4cd2262acc
commit
1bbeed7d3d
45
.github/workflows/main.yml
vendored
45
.github/workflows/main.yml
vendored
@@ -81,8 +81,42 @@ jobs:
|
||||
with:
|
||||
file: ./photon-server/build/reports/jacoco/test/jacocoTestReport.xml
|
||||
|
||||
build-offline-docs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
# Checkout docs.
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
repository: 'PhotonVision/photonvision-docs.git'
|
||||
ref: master
|
||||
|
||||
# Install Python.
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.7'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install sphinx sphinx_rtd_theme sphinx-tabs
|
||||
sudo apt install -y texlive-latex-recommended texlive-fonts-recommended texlive-latex-extra latexmk texlive-lang-greek texlive-luatex texlive-xetex texlive-fonts-extra dvipng graphviz
|
||||
- name: Check the docs
|
||||
run: |
|
||||
ls
|
||||
make linkcheck
|
||||
- name: Build the docs
|
||||
run: |
|
||||
make html
|
||||
|
||||
# Upload docs artifact.
|
||||
- uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: built-docs
|
||||
path: build/html
|
||||
|
||||
|
||||
build-package:
|
||||
needs: [build-client, build-server]
|
||||
needs: [build-client, build-server, build-offline-docs]
|
||||
|
||||
# Let all steps run within the photon-server dir.
|
||||
defaults:
|
||||
@@ -104,7 +138,7 @@ jobs:
|
||||
# Clear any existing web resources.
|
||||
- run: |
|
||||
rm -rf src/main/resources/web/*
|
||||
mkdir -p src/main/resources/web/
|
||||
mkdir -p src/main/resources/web/docs
|
||||
|
||||
# Download client artifact to resources folder.
|
||||
- uses: actions/download-artifact@v2
|
||||
@@ -112,6 +146,13 @@ jobs:
|
||||
name: built-client
|
||||
path: photon-server/src/main/resources/web/
|
||||
|
||||
# Download docs artifact to resources folder.
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: built-docs
|
||||
path: photon-server/src/main/resources/web/docs
|
||||
|
||||
|
||||
# Print folder contents.
|
||||
- run: ls
|
||||
working-directory: photon-server/src/main/resources/web/
|
||||
|
||||
@@ -25,6 +25,9 @@
|
||||
<v-tab to="settings">
|
||||
Settings
|
||||
</v-tab>
|
||||
<v-tab to="docs">
|
||||
Docs
|
||||
</v-tab>
|
||||
</v-tabs>
|
||||
</v-toolbar-items>
|
||||
</v-app-bar>
|
||||
|
||||
@@ -2,9 +2,9 @@ import Vue from 'vue'
|
||||
import Router from 'vue-router'
|
||||
import Camera from "./views/PipelineView";
|
||||
import Settings from "./views/SettingsView";
|
||||
import Docs from "./views/DocsView";
|
||||
Vue.use(Router);
|
||||
|
||||
|
||||
export default new Router({
|
||||
// mode: 'history',
|
||||
base: process.env.BASE_URL,
|
||||
@@ -19,5 +19,9 @@ export default new Router({
|
||||
path: '/settings',
|
||||
name: 'Settings',
|
||||
component: Settings
|
||||
}, {
|
||||
path: '/docs',
|
||||
name: 'Docs',
|
||||
component: Docs
|
||||
}]
|
||||
})
|
||||
|
||||
23
photon-client/src/views/DocsView.vue
Normal file
23
photon-client/src/views/DocsView.vue
Normal file
@@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<div style="overflow:hidden;height:100%;width:100%" height="100%" width="100%">
|
||||
<iframe src="docs/index.html" frameborder="0" style="overflow:hidden;height:100%;width:100%" height="100%" width="100%"></iframe>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- <iframe src="test.html" frameborder="0" style="overflow:hidden;height:100%;width:100%" height="100%" width="100%"></iframe> -->
|
||||
|
||||
<style scoped>
|
||||
.videoClass {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.videoClass img {
|
||||
padding-top: 10px;
|
||||
height: auto !important;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.colsClass {
|
||||
padding: 0 !important;
|
||||
}
|
||||
</style>
|
||||
@@ -112,6 +112,12 @@ buildAndCopyUI.dependsOn copyClientUIToResources
|
||||
copyClientUIToResources.dependsOn runNpmOnClient
|
||||
copyClientUIToResources.shouldRunAfter runNpmOnClient
|
||||
|
||||
task generateJavaDocs(type: Javadoc) {
|
||||
source = sourceSets.main.allJava
|
||||
classpath = sourceSets.main.compileClasspath
|
||||
destinationDir = file("${projectDir}/build/docs")
|
||||
}
|
||||
|
||||
spotless {
|
||||
java {
|
||||
googleJavaFormat()
|
||||
|
||||
@@ -37,7 +37,7 @@ public class ShellExec {
|
||||
|
||||
/**
|
||||
* Execute a bash command. We can handle complex bash commands including multiple executions (; |
|
||||
* && ||), quotes, expansions ($), escapes (\), e.g.: "cd /abc/def; mv ghi 'older ghi '$(whoami)"
|
||||
* and ||), quotes, expansions ($), escapes (\), e.g.: "cd /abc/def; mv ghi 'older ghi '$(whoami)"
|
||||
*
|
||||
* @param command Bash command to execute
|
||||
* @return true if bash got started, but your command may have failed.
|
||||
|
||||
@@ -39,8 +39,8 @@ public class VisionRunner {
|
||||
private long loopCount;
|
||||
|
||||
/**
|
||||
* VisionRunner contains a <see cref="Thread">Thread</see> to run a pipeline, given a frame, and
|
||||
* will give the result to the consumer.
|
||||
* VisionRunner contains a thread to run a pipeline, given a frame, and will give the result to
|
||||
* the consumer.
|
||||
*
|
||||
* @param frameSupplier The supplier of the latest frame.
|
||||
* @param pipelineSupplier The supplier of the current pipeline.
|
||||
|
||||
Reference in New Issue
Block a user