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:
Vatan Aksoy Tezer
2020-07-07 22:10:28 +03:00
committed by GitHub
parent 4cd2262acc
commit 1bbeed7d3d
7 changed files with 83 additions and 6 deletions

View File

@@ -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/

View File

@@ -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>

View File

@@ -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
}]
})

View 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>

View File

@@ -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()

View File

@@ -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.

View File

@@ -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.